Wednesday, June 24, 2020

33209: Straits -- Status Display

Chapter 13.2: Straits -- Sabbath

Chapter 13.3: Straits -- Status Display


"Okay, guys, I have to focus on Julia's computer, so let's all work on our keyboard controllers on our own for a while."

"Focus on your girlfriend, huh?" Tanya was apparently feeling a little catty.

"So you're finally owning up to it!", Suzanne pouted. "What did it take?"

"Oh, shutup, Suzanne," Mike grumbled. "I, for one, don't want to hear about it."

Wallace also complained. "Leading us on, and then jumping ship for your girlfriend?"

Winston admonished, "We can handle this. Bob and Jennifer almost have it worked out, anyway."

Jennifer shook her head. "It's time for us all to work on our own for a bit. That's what we're here for."

"Should you just abandon everyone for me?" Julia asked.

"I'm not abandoning anybody, and Jennifer's right."

Doctor Brown just watched in amusement.

There was more grumbling, and some of the members of the group parked themselves where they could watch as I used scratch paper to show Julia how the display translation tables would be put together. But I ignored them and proceeded to recreate a diagram from Saturday.
                 

"Others have theirs wired up differently, but the way you ended up wiring yours is the same order as the diagram I drew. Bottom left is the high bit, and decimal is the low bit. Let's name those."

"Name them?"

"Give them names in the program."

"Okay."

"We'll call the bottom left segment BLS, and it will be binary 10000000."

"You and Dad both told me about converting to hexadecimal four bits at a time, so that's 1000 and 0000, which comes out as $80?"

I gave her a thumbs-up and scrawled
BLS EQU $80 ; 1000 0000
"Instead of BLS, BLT would not be a good name?"
Julia and I chuckled at her joke, and so did the students who were listening.

"No?"

"Well, I was thinking S for segment, but why not? T for the last letter of 'bit'. How about the rest?"

"Like this?" Julia wrote out code, intuiting the permutations from the line I'd written:
BLT  EQU $80 ; 1000 0000
BT   EQU $40 ; 0100 0000
BRT  EQU $20 ; 0010 0000
MT   EQU $10 ; 0001 0000
TLT  EQU $08 ; 0000 1000
TT   EQU $04 ; 0000 0100
TRT  EQU $02 ; 0000 0010
DT   EQU $01 ; 0000 0001
"Yep."

"Oh, maybe T is a little confusing."

"It's okay. We'll keep it. As long as we can read it and understand it."

"Then we'll need comment lines to help us remember?"

"Such as?"

She wrote,
* T FOR BIT:
* BOTTOM, TOP, MIDDLE
* LEFT, RIGHT, DECIMAL
"Looks good, and it keeps it short for the screen we're working on."

"Do the last four EQU lines need the dollar sign and the zero?"

"No, they're the same in decimal and hex, with or without the leading zero. But simplifying them would make the form less obvious, so let's keep them this way. So, now let's use those to make a table of segments, like we figured out on Saturday. The zero will be the first entry. Which bits does it use?"

"All but the middle and the decimal?"

"Okay. We can use '.OR.' to put bits together, so it can look like this:"
TABLE
    FCB BLT.OR.BT.OR.BRT.OR.TRT.OR.TT.OR.TLT
"That's not going to fit in the 32 column screen."

"True, but that's okay. Wrapping won't hurt. Oh, but it's also ugly -- hard to read, and that is not okay. Maybe I can think of something to help."

After a little thought, I wrote
CUP EQU BLT.OR.BT.OR.BRT
CAP EQU TRT.OR.TT.OR.TLT
*
TABLE
    FCB CUP.OR.CAP
"It sort of helps."

"Heh. Okay, there's zero. One is easy."

She scribbled her guess, "BRT.OR.TRT". "Is that it?"

"Right."

With a bit of scribbling, erasing, and rescribbling, we had this:
BCUP EQU BLT.OR.BT.OR.BRT
TCAP EQU TRT.OR.TT.OR.TLT
ONET EQU BRT.OR.TRT
TRCUP EQU TT.OR.TRT.OR.MT
BLCUP EQU MT.OR.BLT.OR.BT
BRCUP EQU MT.OR.BRT.OR.BT
TCUP EQU TLT.OR.MT.OR.TRT
TLCUP EQU TT.OR.TLT.OR.MT
BCAP EQU BLT.OR.BT.OR.BRT
VBAR EQU TLT.OR.BLT
*
SEGTBL
    FCB BCUP.OR.TCAP ; 0
    FCB ONET ; 1
    FCB TRCUP.OR.BLCUP ; 2
    FCB TRCUP.OR.BRCUP ; 3
    FCB TCUP.OR.BRT ; 4
    FCB TLCUP.OR.BRCUP ; 5
    FCB TLCUP.OR.BCUP ; 6
    FCB TT.OR.ONET ; 7
    FCB BCUP.OR.TCAP.OR.MT ; 8
    FCB TCAP.OR.BRCUP ; 9
    FCB TCAP.OR.BCAP ; A
    FCB VBAR.OR.BRCUP ; b
    FCB BLCUP ; c
    FCB BLCUP.OR.ONET ; d
    FCB TCAP.OR.BLCUP ; e
    FCB VBAR.OR.TLCUP ; F
"I can sort of see what the table is, but how does that get into the LEDs?" Julia asked me.

"I've been avoiding that question for a whole week. I want to use a parameter stack, but we're a little tight on both RAM and registers. I guess we're not going to be trying to run two displays at once, so global variables should work."

Julia looked at me with a blank expression.

I proceeded anyway. "We'll have a variable for the current number to display and a variable for the current column to display in, and --" I scribbled:
NUMDSP RMB 1
CLMDSP RMB 1
"We can squeeze those into a single byte if we need to, but let's do it simple first."
PUTDIG
    LDX NUMDSP ; HIGH BITS ZERO!
    LDA SEGTBL,X
    LDX CLMDSP ; HIGH BITS ZERO!
"I'm lost."

The lab erupted in applause, and I looked around and realized that everyone was gathered around listening, and Mark, Jeff, Mike, and even Bob and Jennifer had been taking turns transferring our scribblings and musings to the chalkboard so they could all take notes.

I looked over at Doctor Brown, and he gave just gave me a "Who, me?" look.

I chuckled in embarrassment.

"Okay. Maybe we should do this as a group after all, and then you can all adjust it for how you wired yours. But I guess we need to use teamwork on the notes and explanations. Who followed how we put the table together?"

Bob, Jennifer, Mark, Jeff, and Mike said they were good on it, some of the others raised their hands hesitantly. There was a lot of doubt.

"I don't seem to do hexadecimal math in my head," George apologized. "Can someone explain it?"

Mike started scribbling on some scratch paper. "It's like this, --"

Doctor Brown suggested, "Mike, could you do that at the board for those who need some review?"

After a moment of hesitation, Mike stood up to the chalkboard and quickly wrote out a conversion table:

decimal
hexadecimal
binary
0:$00=0000 0000
1:$01=0000 0001
2:$02=0000 0010
3:$03=0000 0011
4:$04=0000 0100
5:$05=0000 0101
6:$06=0000 0110
7:$07=0000 0111
8:$08=0000 1000
9:$09=0000 1001
10:$0A=0000 1010
11:$0B=0000 1011
12:$0C=0000 1100
13:$0D=0000 1101
14:$0E=0000 1110
15:$0F=0000 1111
16:$10=0001 0000
17:$11=0001 0001
21:$15=0001 0101
32:$20=0010 0000
37:$25=0010 0101
128:$80=1000 0000
133:$85=1000 0101

"We got groups of four binary digits on the right, and they match up with single digits of hexadecimal in the middle. It's not a coincidence. It's a rule."

After a bit of discussion, George just shrugged. "I guess I'm just not seeing something. Maybe we should keep going."

I concurred. "Mike can help you, and we'll be showing a lot of examples, I think. Let's see if moving ahead works."

"Joe."

"Julia?"

"Let me try." She stood up.

"I'm going to enjoy this."

She gave me a sharp look, but I just grinned.

"The LED's in our seven-segment displays are laid out to show the shapes of pieces of numbers when they're lit, okay?"

George nodded hesitantly.

"Let's ignore those shapes for now. Instead, we'll make each LED, each individual LED, a binary digit, or a bit. That's a place, or a column, or a position, in a binary number. If the LED lights, that's a binary one for that place in the number -- for that bit. If it doesn't light, that's a zero."

"I'm lo--"

Julia gave him an eyeroll.

"-- Lost, but I'll try to keep up anyway."

"There you go. So we take this seven-segment display and straighten out the LEDs in our minds, so they can form binary numbers that are not the same as the shapes when they make numbers. And we can use those numbers to figure out which bits of the port to set to one to make the display show the number."

"Maybe I'm seeing something."

"So the binary number that lights up the segments to make a '1' is zero-zero-one-zero, zero-zero-one-zero, which is hexadecimal two-two." She wrote "0010 0010" on the chalkboard, then turned and looked at me. "At least, as Joe keeps saying, in the circuit Joe and I have been making."

I nodded.

"In decimal," she continued, "that would be 34. But we aren't thinking in decimal. We don't care that 34 is smaller than 35 or bigger than 33. We use the hexadecimal numbers because they help us remember which LEDs are lit. It's easy ... well, sort-of easy to remember that two in binary is one-zero. Or, if you write it with four bits, zero-zero-one-zero."

George still looked doubtfully at Julia, but he said, "I think I'm seeing something now. Thanks. This might help me understand those examples Joe was talking about."

Julia gave me look that said, "I tried," and sat down.
"Thanks, Julia," I said. "I think that helps. Sometimes it takes a different approach."

After making new arrangements to make sure Julia would not be so busy taking notes that she couldn't think and ask questions, I started over, working through the elements of 6805 assembly language as I used them.

"'E-Q-U' is short for equate. It equates the label on the left to the expression on the right. Hopefully we don't need to know when the expression is evaluated, because I don't know and I don't want to waste time figuring that out."

Nobody complained about what I had said, so I continued

"When we write
BLT  EQU $80 ; 1000 0000
"that could mean bacon, lettuce, and tomato is flagged by bit seven, or it could mean the bottom left segment bit is bit seven."

That got some chuckles.

"'.OR.' is the logical-or operator. It performs a column-by-column logical or, keeping the column results in their columns. That means that'
ONET EQU BRT.OR.TRT
"equates the label ONET to the result of 00100000 or-ed with 00000010, which is 00100010, or hexadecimal 22."

I wrote on the chalkboard,
0010 0000
0000 0010
-------------
0010 0010

"And if we put $22 on the segments port and hold the anode of one of the displays down to 0, it should make the top and bottom right segments light up, showing us a '1'. If we want to see that, we could try something like"
START
    LDA #22
    STA CATHODES
    LDA #FE
    STA ANODES
WAITLP
    BRA WAITLP
"'LDA loads a small value into the accumulator, STA stores the value in the accumulator to memory or I/O space, BRA means branch always and forever, and it does so, looping to itself, letting us see the results. This is a CMOS 1468705, so I think we could use a WAIT instruction here, but this loop forever to itself will do what we need with most CPUs. So it's a good thing for everyone to see, at least once."

I decided to stop and demonstrate it. I added the reset vectors, then asked Julia to type it in, assemble it, and burn it into her 68705, and power it up to run the short program. When it produced a 1 on the rightmost seven segment display, George and some of the other students seemed to gain a bit more confidence of what they were looking at

"Hopefully everybody's working out your own equate definitions for your own circuits while we do this. I guess we should put the definitions Julia and I came up with on the chalkboard, but remember yours will be somewhat different." And as I copied to the chalkboard, I added more comments, showing the expected bit values:
* BOTTOM, TOP, MIDDLE
* LEFT, RIGHT, DECIMAL
* SEGMENT BIT T
BLT  EQU $80 ; 1000 0000
BT   EQU $40 ; 0100 0000
BRT  EQU $20 ; 0010 0000
MT   EQU $10 ; 0001 0000
TLT  EQU $08 ; 0000 1000
TT   EQU $04 ; 0000 0100
TRT  EQU $02 ; 0000 0010
DT   EQU $01 ; 0000 0001
*
BCUP EQU BLT.OR.BT.OR.BRT
* 1110 0000 $E0
TCAP EQU TRT.OR.TT.OR.TLT
* 0000 1110 $0E
ONET EQU BRT.OR.TRT
* 0010 0010 $22
TRCUP EQU TT.OR.TRT.OR.MT
* 0001 0110 $16
BLCUP EQU MT.OR.BLT.OR.BT
* 1101 0000 $D0
BRCUP EQU MT.OR.BRT.OR.BT
* 0111 0000 $70
TCUP EQU TLT.OR.MT.OR.TRT
* 0001 1010 $1A
TLCUP EQU TT.OR.TLT.OR.MT
* 0001 1100 $1C
BCAP EQU BLT.OR.BT.OR.BRT
* 1110 0000 $E0
VBAR EQU TLT.OR.BLT
* 1000 1000 $88
*
SEGTBL
    FCB BCUP.OR.TCAP ; 0
    FCB ONET ; 1
    FCB TRCUP.OR.BLCUP ; 2
    FCB TRCUP.OR.BRCUP ; 3
    FCB TCUP.OR.BRT ; 4
    FCB TLCUP.OR.BRCUP ; 5
    FCB TLCUP.OR.BCUP ; 6
    FCB TT.OR.ONET ; 7
    FCB BCUP.OR.TCAP.OR.MT ; 8
    FCB TCAP.OR.BRCUP ; 9
    FCB TCAP.OR.BCAP ; A
    FCB VBAR.OR.BRCUP ; b
    FCB BLCUP ; c
    FCB BLCUP.OR.ONET ; d
    FCB TLCUP.OR.BLCUP ; E
    FCB VBAR.OR.TLCUP ; F
"The FCB that we use to construct the table of constants stands for 'Form Constant Byte or some such, and it is used to store a constant value into the program object code. By putting them into a table in the object code, we make the patterns available for look-up.

"Now, if we shift the anode bit, we can light up one digit at a time, but it's going to happen so fast it will look like they're all lit up at once. The LSL instruction shifts the argument one bit to the left, so we'll use it to pick which which digit to light."

Eyes were glazing over, so I wrote another bit of demonstration code, directly using the constants I had defined earlier:
PAUSE
     DECX ; IDLE COUNT
     BNE PAUSE
     RTS
*
START
    CLRX
    LDA #FE
    STA ANODES
    LDA #ONET
    STA CATHODES
    BSR PAUSE ; LET PORT SETTLE
    LSL ANODES
    LDA #TCAP
    STA CATHODES
    BSR PAUSE
    LSL ANODES
    LDA #VBAR
    STA CATHODES
    BSR PAUSE
    LSL ANODES
    LDA #BLCUP
    STA CATHODES
    BSR PAUSE
    LSL ANODES
    LDA #TRCUP
    STA CATHODES
    BSR PAUSE
    LSL ANODES
    LDA #TCUP
    STA CATHODES
    BSR PAUSE
    LSL ANODES
    LDA #BCAP
    STA CATHODES
    BSR PAUSE
    BRA START
"The PAUSE routine uses the X register as an idle counter. DEC counts X down one, and BNE loops back to count again until X is zero. 'B' for Branch. 'NE' for Not Equal, or in other words, not zero. I suppose I'll have to explain that more later. Anyway, we turn a digit on, then we pause for a bit so the human eye can register it."

"And get your minds out of the gutter, guys, BRA really is a BRanch Always. so when we have displayed all the patterns, one place at a time, we go back and do it again.

Suzanne complained, "I suppose some male engineer thought that mnemonic up."

"You suppose right. Apparently more than one. I do not defend them. In a little bit, I'll show you how to use a macro definition to give that instruction a better mnemonic name."

"I don't suppose anyone will forget the original mnemonic," Bob commented, and Jennifer slapped him over the head.

Doctor Brown watched this in amusement, taking no sides.

Again, Julia typed it in, assembled it, and burned it, this time into a 68705 she borrowed from Jeff while hers was in the eraser.


She was rather dissatisfied with the cryptic output, so she got back on the computer and added equates for each digit, using the equates in the table itself:
N0 EQU BCUP.OR.TCAP ; 0
N1 EQU ONET ; 1
N2 EQU TRCUP.OR.BLCUP ; 2
N3 EQU TRCUP.OR.BRCUP ; 3
N4 EQU TCUP.OR.BRT ; 4
N5 EQU TLCUP.OR.BRCUP ; 5
N6 EQU TLCUP.OR.BCUP ; 6
N7 EQU TT.OR.ONET ; 7
N8 EQU BCUP.OR.TCAP.OR.MT ; 8
N9 EQU TCAP.OR.BRCUP ; 9
NA EQU TCAP.OR.BCAP ; A
NB EQU VBAR.OR.BRCUP ; b
NC EQU BLCUP ; c
ND EQU BLCUP.OR.ONET ; d
NE EQU TLCUP.OR.BLCUP ; E
NF EQU VBAR.OR.TLCUP ; F
*
SEGTBL
    FCB N0 ; $EE 1110 1110
    FCB N1 ; $22 0010 0010
    FCB N2 ; $D6 1101 0110
    FCB N3 ; $76 0111 0110
    FCB N4 ; $3A 0011 1010
    FCB N5 ; $7C 0111 1100
    FCB N6 ; $FC 1111 1100
    FCB N7 ; $26 0010 0110
    FCB N8 ; $FE 1111 1110
    FCB N9 ; $7E 0111 1110
    FCB NA ; $EE 1110 1110
    FCB NB ; $F8 1111 1000
    FCB NC ; $D0 1101 0000
    FCB ND ; $F2 1111 0010
    FCB NE ; $DC 1101 1100
    FCB NF ; $9C 1001 1100
Then she modified the test code to use her new equates:
START
    CLRX
    LDA #FE
    STA ANODES
    LDA #N0
    STA CATHODES
    BSR PAUSE ; LET PORT SETTLE
    LSL ANODES
    LDA #N1
    STA CATHODES
    BSR PAUSE
    LSL ANODES
    LDA #N2
    STA CATHODES
    BSR PAUSE
    LSL ANODES
    LDA #N3
    STA CATHODES
    BSR PAUSE
    LSL ANODES
    LDA #N4
    STA CATHODES
    BSR PAUSE
    LSL ANODES
    LDA #N5
    STA CATHODES
    BSR PAUSE
    LSL ANODES
    LDA #N6
    STA CATHODES
    BSR PAUSE
    BRA START
And she tried it again, borrowing a 68705 from Mark this time.


I think everyone cheered.

"But I have a question," she said.

"Yeah?"

"I don't think my code is actually using the table in this test."

"True. And I could get a swelled head and imagine I taught you that, but I think you've done more figuring out than I've done teaching."

"Oh, give her a kiss," Winston said. "She deserves it."

"No es para ...," I began, but Julia shook her head just perceptively enough for me to see.

"Whether I reward him with a kiss or not is my business," she said.

Wolf whistles and other unnecessary noises of appreciation ensued, and Julia and I cleared our throats simultaneously, with lopsided grins.

Mike did not join in the circus. 

"Back to work," Julia said.

I continued. "So now we need to try actually using the table. We'll use the X register to pick the pattern to display:"
    ORG $40 ; VARIABLES
PAUSER RMB 1
    ORG ROM ; CODE
PAUSE
    CLR PAUSER
PAUSELP
    DEC PAUSER
    BNE PAUSELP
*
START
    LDA #$FE
    STA ANODES
    LDX #1
    SEC
DISPLP
    LSL ANODES
    LDA SEGTBL,X
    STA CATHODES
    BSR PAUSE
    INCX
    CPX #8
    BNE DISPLP
    BRA START
"ORG means origin, and it sets the address where the next part is assembled. RMB Reserves a Memory Byte in low memory, which we will use instead of X as the idle loop counter. We label that byte PAUSER. CLR clears the variable in memory here, and DEC decrements it by 1, so it's much the same as using X for the idle count, just slower.

"The indexed addressing mode used in 'LDA SEGTBL,X' adds the constant address of the base of the SEGTBL table to the value in X and uses the result as the address from which we load the accumulator.

"With a 0 in X, the argument 'SEGTBL,X' points to the bit pattern to display a zero. With a 1 in X, it points to the bit pattern to display a one. And so forth."

I stopped to diagram it on the chalkboard:

SEGTBL,X(@SEGTBL+X)
SEGTBL+0:11101110(N0=$EE)
(X=1)=>SEGTBL+1:00100010(N1=$22)
SEGTBL+2:11010110(N2=$D6)
SEGTBL+3:01110110(N3=$76)
SEGTBL+4:00111010(N4=$3A)
SEGTBL+5:01111100(N5=$7C)
SEGTBL+6:11111100(N6=$FC)
SEGTBL+7:00100110(N7=$26)
SEGTBL+8:11111110(N8=$FE)
SEGTBL+9:01111110(N9=$7E)
SEGTBL+A:11101110(NA=$EE)
SEGTBL+B:11111000(NB=$F8)
SEGTBL+C:11010000(NC=$D0)
SEGTBL+D:11110010(ND=$F2)
SEGTBL+E:11011100(NE=$DC)
SEGTBL+F:10011100(NF=$9C)

"So we start with X equal to 1, then count X up with INC each time through the loop, after we display the number in that digit for a fraction of a second.

"We're only displaying seven numbers, so we use CMP to CoMPare X to 8, and BNE Branches back to do another as long as X is Not Equal to 8 at that point in the loop."

I looked at Julia, and she nodded hesitantly.

"I think it sort of makes sense. Should we let someone else do the programming this time?"

Freddie volunteered, so Julia traded places with her to let her take a turn typing and burning, but we still used Julia's circuit so the wiring would be right. By this time, Julia's 68705 was erased and ready to use, so she used it, and this demonstration produced the numbers 1 through 7 on the displays.

When the test proved successful, Freddie returned to helping take notes.

Mark and Jeff were keeping track of how long each MCU was in the eraser.

(As I write this, I don't have hardware to make sure I'm not forgetting something, but the programs should look something like what I'm giving here.)

"Anybody who's not comfortable with all of that, try out some of your own variations later. For now we need to write the real display code. Bob, Jennifer, are you up to picking up from here, to give everyone a break from me?"

Bob looked questioningly at Jennifer, and they stood, hesitantly.

Jennifer asked, "I guess we need a variable to hold the number, and a routine to convert from binary to hexadecimal?"

I thought carefully how hard I wanted to push them, and actually stopped just long enough to pray for help, before responding with, "I wonder how much time we'll have to do conversions during the interrupt routines."

"Not much?" Bob asked.

Doctor Brown spoke up. "Before worrying about that, let's see what you would do."

I decided I agreed with Doctor Brown. "Go with what you have in mind and see how it works. I need to go deliver newspapers pretty soon."

They took over, and I sat down next to Julia.

She took my hand under the lab table and whispered, "This is hard!"

"You're not the only one who thinks so," I whispered back.

"Are we going to need to do decimal numbers?" Jennifer asked from the chalkboard.

"Somebody might, but, for now, let's just do hexadecimal," I suggested

Bob and Jennifer took separate panes of the chalkboard and both started writing:
    ORG $40
WAITCT RMB 1 ; IDLE COUNTER
CMDOUT RMB 1 ; CMD to DSP
BYTOUT RMB 1 ; BYTE to DISP
ADROUT RMB 2 ; ADR TO DISP
*
    ORG $80
* HI BIT DP
* CLOCKWISE FROM TOP
* LO BIT MIDDLE SEG
SEGTBL
    FCB $7E ; 0 0111 1110
    FCB $30 ; 1 0011 0000
    FCB $6D ; 2 0110 1101
    FCB $79 ; 3 0111 1001
    FCB $33 ; 4 0011 0011
    FCB $5B ; 5 0101 1011
    FCB $5F ; 6 0101 1111
    FCB $70 ; 7 0111 0000
    FCB $7F ; 8 0111 1111
    FCB $7B ; 9 0111 1011
    FCB $77 ; A 0111 0111
    FCB $1F ; b 0001 1111
    FCB $3D ; d 0011 1101
    FCB $0D ; c 0000 1101
    FCB $4F ; E 0100 1111
    FCB $47 ; F 0100 0111
*
*
BITTBL
    FCB 1
    FCB 2
    FCB 4
    FCB 8
    FCB $10
    FCB $20
    FCB $40
    FCB $80
*
DSPCMD
    LDA CMDOUT
GTXNIB
    ANDA  #$0F
    TAX
    LDA SEGTBL,X
    RTS
*
DSPBYT
* HI NIB
    LDA BYTOUT
    LSRA
    LSRA
    LSRA
    LSRA
    BSR GTXNIB
    STA CATHOD
    LDX #5
    LDA BITTBL,X
    STA ANODE
* LO NIB
    LDA BYTOUT
    BSR GTXNIB
    BSR WAIT
    STA CATHOD
    LDX #4
    LDA BITTBL,X
    STA ANODE
    BSR WAIT
    RTS
*
DSPADR
*WAIT
    CLR WAITCT
WAIT0
    INC WAITCT
    BNE WAIT0
    RTS
*
INIT
* INIT PORTS
START
    LDA #$0C
    STA CMDOUT
*    BSR DSPCMD
    LDA #$5A
    STA BYTOUT
    BSR DSPBYT
    LDA #$10
    STA ADROUT
    LDA #$00
    STA ADROUT+1
*     BSR DSPADR
    BRA START
*
    ORG $1FFE
    FDB INIT
    END
(Yes, I'm fudging a little, not showing the initialization code.)

When they got to this point, Bob and Jennifer both put their chalk down and turned around, and Bob said, "Filling in the two undefined display routines feels awkward, and it's going to be a lot of modifying code as we copy, which is an easy place to make mistakes."

Doctor Brown spoke up again. "Let's go ahead and walk us through that and test it, and see if we get any good ideas while we're typing and testing."

Jennifer pointed out, "Our segments are wired differently from Joe's and Julia's."

I commented, "I think your wiring makes it a bit easier to visualize the connection between bits and display segments than the wiring I came up with for Julia."

Julia snickered and poked me in the ribs.

"Theirs does follow a more common pattern," Mike pointed out. "Mine uses the same as theirs."

Tanya asked, "Is WAIT a legal label?"

"Labels and op-code mnemonics are in a different symbol space in the assembler, so it's okay," I explained. "Might confuse humans, though."

"Maybe we should use WAITLP like you do," Bob continued. "Other than the wiring differences, we're just following the same program flow pattern you've been following. All we've added is splitting up the byte into four-bit halves, and shifting things into place, and masking the high bits off so the array reference into the table stays in the table."

Jennifer added, "The LSR instruction does a logical shift right, meaning it's dividing by two but ignoring the sign. It fills the top bit with a zero. The AND instruction masks off the top byte, for when you do the lookup without shifting first."

"I'm doing something completely different than that," Mike asserted.

"When Bob and Jennifer have tested theirs, how about you taking a turn, Mike?" I suggested.

He seemed a little surprised that I suggested it, but agreed.

And I excused myself to go deliver newspapers. Before I left, I mumbled something to Julia about hoping Mike had jumped ahead to just storing the segments in a display buffer, but she just shrugged her shoulders.

"Sorry, you've lost me again. Tell me what you mean when you get back."

By the time I got back, Mike was describing his first step.

Julia gave me an update in a low voice. "Bob and Jennifer got theirs working, but we all helped. Torrence noticed that their bit table was inverted before they burned their first program in, and the fix's on the chalkboard."

The corrected bit table looked like this:
BITTBL
    FCB $FE
    FCB $FD
    FCB $FB
    FCB $F7
    FCB $EF
    FCB $DF
    FCB $BF
    FCB $7F
"They had a typing mistake bug, too, and Doctor Brown showed us how to play computer and do a group walk-through to find it."

"Valuable experience."

"Helped me a lot."

"Let's see what Mike's got."

Mike was describing how he planned to test his understanding of the built-in hardware timer by using it to interrupt the CPU so it could make the segments flash between 1 and E at a fairly precise one second rate. (Again, I'm fudging a little, not actually giving you his initialization code. Init code is easy to get wrong if you don't test, and I can't test. It's also fairly straightforward in cases such as this, if you can get the hardware and are inclined to try it yourself.)
    ORG $40
LONGP RMB 1
    ORG $100
INIT
* SET UP PORTS
* SET TIMER PRESCALE TO 64
* SET TIMER COUNT TO 125
    LDA #125
    STA LONGP
    LDA #$FE
    STA ANODE
    LDA #30 ; 1
    STA CATHOD
    WAIT
TIMINT
    BCLR TIMCR7 ; INT FLAG
    DEC LONGP
    BNE TIMDUN
    LDA #125
    STA LONGP
    LDA CATHOD
    XORA #$FF ; 1 INVERTS TO E
    STA CATHOD
TIMDUN
    RTI
*
    ORG $1FF6
    FDB TIMINT; CMOS MODE TIMER INT
    FDB TIMINT ; ORDINARY TIMER INT
    FDB INIT ; INTERRUPT
    FDB INIT ; SWI
    FDB INIT ; $1FFF RESET
    END
"Using the timer prescaler value of 64 and the timer count of 125, then counting a hundred twenty-five interrupts, we should get a count of 125 times 125 times 64, which is a million. So if the CPU clock is exactly one meghertz, this should be exactly a one second flash rate.

"WAIT clears the CPU's interrupt mask before it puts the CPU in a WAIT state, but lets the timer keep running.

"The exclusive-or with hex FF instruction toggles all the bits in the accumulator, which should show E and the decimal point. And we can see if the BCLR bit clear instruction works and clears the timer interrupt flag."

After Theresa, another of the more quiet students, typed the code in and burned it, Mike's test worked as advertised, and Mike proceeded with his next step.

"What I'm going to do is have a buffer for the digits to display. I'll just have the timer generate a one millisecond interval interrupt, and it will sequence through displaying each digit for a millisecond. I'm going to steal Bob and Jennifer's code for the bit table and the segment table, if they don't mind."

"No problemo."

And he proceeded to show his code:

    ORG $40
CURDIG RMB 1 ; 1-7
DIGBUF RMB 7 ; 7 DISPLAYS
*
ORG $100
* BIT AND SEGMENT TABLES
TIMINT
    BCLR TIMCR7
    LDA CURDIG
    ANDA #07 ; SAFE MASKING
    STA CURDIG
    TAX
    LDA BITTBL,X
    STA ANODE
    LDX CURDIG
    LDA DIGBUF,X
    ANDA #$0F ; SAFE MASKING
    TAX
    LDA SEGTBL,X
    STA CATHOD
    RTI
*
START
    LDA #5
    STA DIGBUF
    LDA #3
    STA DIGBUF+1
    LDA #7
    STA DIGBUF+2
    LDA #7
    STA DIGBUF+3
    LDA #3
    STA DIGBUF+4
    LDA #8
    STA DIGBUF+5
    LDA #0
    STA DIGBUF+6
    WAIT
Burning the code in produced close to the desired results, but not quite, and we proceeded, as a group, to debug it, and shortly had it working.

It was getting close to dinner time, so I asked everyone, "Should I offer some wrap-up comments about interrupt routines now, or should we go home in a euphoria?"

Mike looked at me in resignation. "Hit me with it."

I laughed and looked at Doctor Brown, and he said, "Just keep it short."

So I turned to the students. "We've done some really good work today, keeping the steps small and working together to fix bugs. Doctor Brown will tell us again why bugs are good tomorrow, I think. A couple or three things to think about tonight -- Is it better to clear the timer interrupt flag at the front of the interrupt routine or the end? What could we do with Mike's code to keep the digits available to look at, but make the interrupt routine itself shorter? And how do we fit the keyboard code into the framework Mike has given us?"

I paused, deliberately, and then added, "By the way, I couldn't have paid Mike, Bob, or Jennifer to give us better code to work with."

*****

Julia leaned against my shoulder across the transmission well, looking out the window at the twilit sky.

"Either you aren't the jealous kind or you have supreme confidence about my feelings for you."

"I trust you to figure out what you want." I lifted my hand from the gearshift and gave her a quick hug.

"Supremely confident."

I chuckled. "And if I disagree, I'm going to be in a world of hurt."

She turned and bit my shoulder. Gently.

*****

After dinner and home evening, we sang my recital song in duet, English first, then Julia following along with my pronunciation as I sang in Japanese for a verse. I wrote out the Romanization, and we sang the Japanese together. (I've mentioned Latinization before. In Japanese, it's called ローマ字 -- Rōmaji -- or Romanization.) Then we sat down and worked on homework. After homework, Julia looking over my shoulder while I worked through the TMS 9940 documentation.

"I'm not seeing it."

"What?

"The description of the instruction to call a subroutine. I found the return instruction, but not the call, and I want to get a look at it."

Julia gave me a blank look.

"It's actually a full context switch on this processor, generating a linked list of contexts instead of a straight stack."

 She raised her hands with a smile that said, "I have no idea what you are talking about."

I grinned back. "Just pretend like your listening to something that makes sense."

"Hah."

"I'm going to pretend I'm explaining it to you, but I'm explaining it to myself."

"Uh, huh." She snickered.

"The TMS 9900 has a really unusual register scheme. All the computational registers are actually in memory, pointed to by the working set register."

"Last week, I would have been lost when you said scheme and register."

"What's a register?"

"Registers are where the poor little thing does all those calculations, and RAM is where she stores her results after working so hard."

"Very good. The 9900 uses RAM for registers. And TI calls the RAM it uses for registers the context, or working set. And it can keep a link to the previous working set in a memory cell of the current context."

"I can pretend I might understand that someday."

We both laughed. "Thank you. Now you have to know where your registers are, so the 9900 has one real register that points to the working set. It's called WP."

"Working set pointer?"

"Careful. You might actually understand this."

"Hah."

"You also have to know where the instructions are, so the 9900 has a register for that. It's called IP."

"Instruction pointer."

"Nice. Anyway, when you call a new procedure or routine, you usually want to know how to get back to where you were. That's what the link to the previous context working set is."

"I could see that. Someday."

"So the 9900's call instruction holds onto the old IP and WP, loads a new WP to point to a new working set, and stores the old ones in the top of the new working set."

Julia frowned. "You know that almost makes sense."

"Almost. I don't think it's ideal. I haven't mentioned the status register. I think it's the status register. But it saves that, too."

"Now I'm lost again."

"That's okay. The status register is where it remembers such things as whether the last operation resulted in zero or a negative number. I want to see the instruction that sets up the new context frame, so I'm looking for the call instruction, and I can't find it. I can find the return, but not the call. It's called BLWP, for branch and link WP."

I thumbed through the datasheet pages again, with Julia looking over my shoulder again.

"These are jumps?" She said.

"Yeah. Conditional jumps. It's not there."

I thumbed back and forth a bit more.

"Single operand instructions. How many operands does this branch and link, uhm, WP  instruction have?"

"That's actually what I want to find out."

"B for branch."

"Yeah."

"BL."

"Branch and link, but without WP. It's a quick call."

"BLWP," we said in unison.

"Op code 17."

"Where? I don't see any seventeen anywhere near BLWP."

"Binary." I pointed to it. "One zero zero zero one."

"Ah. Yeah." She shook her head.

Shortly I was satisfied for the night with what I had learned about the 9940, so I dug out the Forth implementation package.

"You're finally going to look at that other package?" Julia yawned.

"Been putting it off too long." I opened it up and scanned through it.

Julia fell asleep on my shoulder while I tried to make sense of it, and then I drifted off, as well. Giselle woke us up about 10:30, and I drove Julia home.

"So, what if I decide to reward you with a kiss?"

We had stopped on her front porch to talk.

"Who am I to turn down a reward?"

It was a nice, sweet reward, giving and getting, but not too much.


[Second version backed up at https://joel-rees-economics.blogspot.com/2020/06/bk01-33209-straits-status-display.html.
First version backed up at https://joel-rees-economics.blogspot.com/2020/06/bk-33209-straits-status-display.html.]


Tuesday, June 23, 2020

33209: Straits -- Sabbath

Chapter 13.1: Straits -- Bringing Up Flex

Chapter 13.2: Straits -- Sabbath


Sisi met me at the door. "Mom wants to know why you were such a bad boy with Julia last night."

I glanced over her head at Julia, who shrugged at me through their kitchen door, then at her mother, who was curled up on their couch with the newspaper. Mrs. Cisneros gave me a look that said I should have known better.

Then I turned back to Sisi. "Good question. I guess a hug wasn't much of a way to say good-night. Of course, I could give you a good morning kiss, instead."

I made a kissy face at her and she giggled and backed away.

"Mo-om!"

Ms. Cisneros laughed.

Julia gave us all a smirk from the kitchen.

I followed Sisi in and made my way over to the kitchen, with a stop to give Mrs. Cisneros a hug and an air-kiss to the cheek. She patted me on the back and gave me an approving nod with her kiss.

I gave Julia a hug and we spontaneously air-kissed both cheeks. As we went went cheek-to-cheek the second time, she whispered, "Mom's horrified."

I chuckled, then without checking her mother's expression, drew back so we could give each other a quick peck, lip-to-lip.

Behind me, her mother cleared her throat. "That's a little better. Not much."

"Let me help you with those tortillas," I suggested, still grinning. Pretty soon we had a decent Sunday breakfast set out, and Julia's father wandered in.

"Julia's putting you to work already? You need more pay. Nice looking spread." He sat down and proceeded to put together a breakfast taco.

I laughed, and Julia rolled her eyes, so I snuck my arm around her waist and drew her in for another, more prolonged kiss.

"You need a little practice on that, too, Son."

Julia's shoulders fell, and she turned to face him. "No Papá. No es para sus entretenimiento. We'll kiss how and when we want."

"Heh. I'm afraid that one was at least partly for their entertainment, or I would have given it better attention."

Julia snickered and relaxed back into my arms, and her dad gave me a stern look before breaking into a chuckle.

"We'd better eat breakfast if we intend on making your church on time." I held a chair for her and she sat down. I took a chair next to her, and we started putting our breakfast tacos together.

Her mother came in and sat down, still chuckling, and Sisi and her brothers followed, and her dad asked me to say grace.

After I asked a blessing, we dug into our tacos.

"By the way, Denny called last night to tell me Motorola wants to talk with me some more down in Austin next Friday."

"What about classes?" Julia asked between bites.

"In the evening. I can leave right after classes and eat lunch on the road. They offered to fly me in, but Denny pointed out that I'd want to visit the surplus shop on Saturday, and they said they could pay my mileage if I wanted to drive."

Julia chewed thoughtfully for a few moments and swallowed. "Are you going to stay the night with your brother?"

"That's the plan."

"Do I get to come, too? -- to look at disk drives. I can sleep on their living-room floor in a sleeping bag, if they'll let me."

I looked up to see what her parents thought, and they seemed to be waiting for my response.

"I'll ask Denny. It would be kind of fun to wander around the surplus shop with you."

Her dad shook his head and gave her mom an inquiring look. "¿Qué prioridades tienen?"

She shrugged, "Dejarlo a ellos."

"¿Tienen un templo Mormón en Austin?"

"Dang. Eloping does sound kind of fun. But no, no temple in Austin. And eloping to a temple is kind of hard to do, anyway, since we'd have to ask the bishop for permission and stuff. Ouch."

Julia was snickering, but she poked me again.

"Hey. Just answering your dad's question."

Sisi and Mario looked a little lost. Tito rolled his eyes. Julia's parents joined Julia and me in laughing comfortably at the joke.

Then her mother asked, "So was that a proposal?"

Julia closed her eyes. "Mom, Dad, patience. We have to work through a lot of things before we can really seriously consider getting married. We may have known each other for several months now, but we've only been seriously dating for a little more than a week."

I gave her a hug, and she leaned her head on my shoulder. I kissed her forehead.

"I guess it is beginning to seem like we've been friends forever."

She nodded.

*****

"It looks like they slipped out already."

Pat and George had sat in the back during the sermon, but they were now nowhere in sight.

"Julia! Are you bailing out on choir this Easter?" Their choir director, Valerie Jones, approached.

Julia looked over at me, and I looked back.

"Choir?" I raised my eyebrows and Julia raised hers back, giving her head a tilt.

Valerie looked from Julia to me. "You know, you have a good voice, and we can use men. You're welcome to join."

So we stayed after and practiced with their choir, and made a tentative commitment to sing with them for Easter.

*****

"I'm sure I saw Mike around here." Julia looked both ways down the north hall of the meetinghouse we shared with the other ward, but, if he had been there, he wasn't any more.

"Should we check every classroom?"

"I guess, if he doesn't want to talk to us, we shouldn't."

"Ah, Joe, you've been making yourself scarce."

I turned around. "Sister Fulmer. I guess I have. Sorry."

"I'll forgive you if you can join us for Easter."

Julia laughed with me.

"Julia, Sister Fulmer is leading our choir this year."

"Am I invited, too?"

"Sure! We'd love to have you. I was listening to your beautiful voice during the hymns. You can sing both soprano and alto, right?"

"I can."

"Wonderful. We need altos."

And we stayed after for choir in my ward, as well, tentatively committing to the ward's Easter cantata.

*****

Back at my house after the young adult evening, I got on the phone in the kitchen and dialed Denny's number. Julia went to the extension in Dad's study.

"Reeves Mortuary. You stab 'em, we slab 'em."

"Denny!" we heard Denise chide on the other end of the call.

"Mpphh." Julia suppressed a snort.

"Hey, can I reserve a couple of lockers for next Friday?" I joked back.

"I'm not sure I like this analogy," Julia complained, laughing.

"Two?" Denny questioned.

Julia answered, "I can bring a sleeping bag and sleep on the floor somewhere."

"I guess you're the beautiful Julia we've been hearing about."

Julia leaned around the corner and mouthed at me, "Beautiful?"

"Dad," I mouthed back.

"Well, I am Julia, whether I'm beautiful or not ..."

"Yeah, she is," I confirmed.

"Sleeping bag, huh?"

"I get to meet Julia?" Denise's voice filtered in from the background. "She can have the couch. Joe can sleep on the floor with the boys."

"Ya heard that?" Denny asked.

"I get the floor in the boys' room and Julia gets the sofa."

"That means you're coming to talk with my boss's bosses on Friday?"

"Sure. Any idea what they want to talk about?"

"I'm not supposed to say."

"Come as I am, then."

"Yep."


[Backed up at https://joel-rees-economics.blogspot.com/2020/06/bk-33209-straits-sabbath.html.]


Tuesday, June 16, 2020

33209: Straits -- Bringing Up Flex

Chapter 13.0: Straits -- Getting Julia Booted Up

Chapter 13.1: Straits -- Bringing Up Flex


Julia waited patiently while I disappeared down the rabbit hole again.

"So you let those drives do their exercises all night last night, until you got back from delivering your newspapers this morning."

"Yep."

"And they didn't mess up so bad that a retry wouldn't fix it."

"Uh huh."

"Which means now you can load this operating system into memory, right?"

"Yeah, now we can be fairly confident that we can load the OS into RAM with these disk drives."

"But even if you write a program to read the operating system into memory in the place it's supposed to go, it's not going to run?"

"Maybe I'm wrong and it might run after all. But it looks like it will either run off a cliff when it calls I/O routines that it expects to be there but aren't, or it will go looking for those routines, not find them, and give up. And I'm not sure how we'll know which is happening, beyond that it doesn't do what we expect it to."

"That's not very friendly."

"I'm sure they don't have manpower to handle every hardware variation guys like me could dream up. And that means I get to try to figure it out."

"Why don't they just give you the code?"

I dug around in the manuals and found the license text and showed it to her.

"They don't think people will pay for their copies, so they make it, uhm, hard to use?"

"Companies like Smoke Signal Broadcasting and Southwest Technical Products Corporation pay for the engineering work, and those companies pass the cost on to their own customers."

"How much?"

"A lot. Several engineers, often several hundred hours of work to get it fully running right with all the hardware."

"So they're not just being rude."

"I think there are other ways to be sure people pay for what they get, but, no, they are not just being rude."

"So even if it works, it might not work well?"

"Maybe."

I continued scanning the manuals in my lap, and Julia didn't say anything more for a moment.

"Oh, I think I found something here."

"What?"

"Hang on." I scanned the pages I had open again. "This entry shows an area where the standard disk drivers are, and there are vectors that they can be called through at the beginning. If my drivers imitate drivers for Western Digital controllers closely enough, I should be able to overwrite those vectors with jumps to my own code."

"I'm lost."

"Vectors are like pointers to where the drivers are actually stored. These are jump vectors, so programs call them and the jump instruction sends them on to the actual driver routines."

"Oh-kay. So you have to write new drivers and put them where the existing drivers are?"

"I'm thinking I'll put them outside the memory Flex uses and overwrite just the vectors that are there for linking through. That should minimize potential for damage."

"As if I knew anything about the question I just asked, much less what you just said."

She laughed, and I leaned over to where she sat on the bench seat and gave her a hug.

"It's sure nice to have someone to talk with while I'm down in that rabbit hole. I'll show you those vectors when I get things put together and running."

"I'm looking forward to it."

We both chuckled at the mixed irony in her tone.

"I guess my first project is to do what the manual suggests and copy the disks they sent me, so that, if I mess something up, we have a backup."

"Good idea. How are you going to do that?"

"The test routines should help. But it's a little scary. I'm worried that my drives will malfunction."

"Isn't there some way to prevent the originals from being copied onto?"

I showed her the write protect notch on the floppy cover and the strips of write-protect tape tabs from the box of floppies I'd bought in Austin. "This is backwards of good engineering, but if I cover this notch with this tape it should protect the disk -- if the drive electronics function correctly."

She smirked. "Doubt your own work?"

"Yeah. I haven't actually implemented the protection in the hardware."

"Well, maybe you should. But why is it backwards?"

"Uhm, I guess maybe it depends on how you look at things, but I'd rather it be protected if the tape falls off."

"I guess that makes sense."

"You know, some computers implement write-protect in the driver software instead of the controller hardware, so you just can change the drivers to make your drives work the way you prefer. But I think you're right, I should add the write-protect circuitry."

I dug up my diagrams, and drew in some additional logic. "If I add a few gates here, and connect it to the controller I/O here, I can make the controller respect the write-protect notch by default in the hardware, but allow the driver to invert the sense."

"Make it complicated? Why not just do it normal and keep it simple?"

"Keep it simple. Didja know that's actually an engineering principle?"

"Engineering principle?" She gave me a lopsided smile of curiosity.

"It has  an acronym: K-I-S-S."

"Okay." She leaned over and gave me a peck on the lips. "And that's three times, now."

I grinned. "And I'm not complaining."

"So -- what's the second 'S'?"

I looked at the floor and coughed. "Erm, you have to understand, it's a special bit of engineering jargon. It sounds a little, uhm, stupid, but it has special meaning."

"Okay. So tell me."

"It's 'stupid'."

"You said that."

"Quote stupid un-quote."

"Oh." Now she gave me a sharp look.

"It means, not trying to be too smart. Trying to be too smart makes things not simple."

"Uh-huh."

"No, seriously."

"I believe you." She laughed. "But I think I'll remember this one."

"Heh."

"So, the write-protect circuit, right? How do you keep it simple?"

"Well, I already have the sensor hooked into an input bit of the controller's MCU, but the controller ignores it for now. Instead of adding hardware, I could do this in the controller's firmware, and that way I wouldn't be depending on the driver software in the computer for protection."

"Does that mean re-programming the controller?"

"Yeah. Hmm. While I'm in it, I could add a switch to allow it to switch between FM and MFM on the fly."

Julia watched and asked questions, and listened to my answers, while I put a 68701 in the EPROM eraser, loaded the floppy controller source code from tape, added the code to handle write-protect and the FM/MFM switch, and programmed the new controller.

For a test, I wrote a quick routine to duplicate and check a single-sided disk in the second drive to the first drive and used the routine to duplicate one of my test floppies. That worked, so I tried to use my disk drives to duplicate the OS disk.

"Error."

"What kind of error?"

"It won't read TSC's floppy."

We both sat and thought for a minute.

"Can you do it with Giselle's computer?"

"Worth a try."

We went in to Giselle's room, and she agreed to set the project she was working on aside long enough to let me try to make a copy. I attached one of my drives to her Color Computer controller as a second drive and wrote a quick program in EDTASM+, then inserted the disks.

"Error."

"Could the disk be bad?"

"Let me look up the error code." I thumbed through Giselle's manual. "Format error. But I'm reading it in raw format, so that shouldn't make a difference."

I thanked Giselle, and we took our stuff back to my room.

"I guess I'm going to have to wait 'til Monday and give them a call."

"TSC?"

"Yeah."

"Nobody in the office today?"

I gave her a quizzical look. "Might be. Worth a try. It's even not the most expensive time to call. But let me make sure what I'm going to ask before we do."

And I dug back into the manuals.

"Oh, look at this."

"What?"

"The disk they sent is FM."

Julia looked pointedly at my stereo tuner.

"You've been waiting a whole week to say that." I laughed, and she laughed.

"Without words. But not the same FM, I guess? And there's no AM?"

"AM. The bit clock is the carrier, so 0 is absence of clock and 1 is presence. Ick."

I reached for some paper, but she put her hand on mine and stopped me.

"I was just joking about the AM."

"Okay, okay, I'll see if I can puzzle that one out later."

The changes to duplicate the FM disk were quick, and the copy proceeded without further error. "And that was verify-after-write, so it should be gold."

"So -- my suggestion to call wasn't necessary?"

I wrinkled my brow and leaned over and gave her a peck on the lips, but stayed close. "It was part of the conversation, and kept me from getting stalled." My eyes searched hers.

She returned my searching look. "Just to be safe, make another?"

"Good idea." I sat back, with some regrets, and made the second copy, then copied the second of the two OS disks TSC had sent, the utilities disk, "Just for good measure."

We shared a hug.

"Okay, now I need to write the drivers."

Because I'd been constructing the controllers to emulate the Western Digital controllers, the basic drivers were a straightforward extract from my test code. And I showed Julia where the vectors were and how I'd over-write them.

"And now the throw-away loader."

"Throw-away?"

"If it works, I'll only use it once to load Flex into memory without using the drivers. Then I'll load my drivers from tape and overwrite the driver vectors, and call the OS's cold boot routine. Then we'll be running Flex, and I'll use Flex itself to make a bootable disk that contains Flex with my drivers."

"Finally running the OS?"

"Yeah. Exciting, huh? I'll probably base the boot loader on the throwaway, so it won't be completely throwaway. But since the first one's throw-away, I can write it to run anywhere. Maybe I should just put it after my drivers anyway, so I can keep the drivers and the loader together."

I was in good form, the loader ran the first time, and I was able to boot Flex. Flex's prompt came up on the screen.
FLEX  2.1            
+++                      
I turned to Julia with a hand outstretched for a slap of the palm, but she wrapped her arms around me and gave me a しっかりした kiss.
Shikkari. 
When I was a new missionary, I hated that word. It seemed to mean whatever fit the speaker's sense of what was right, and it seemed to ignore the right of the person being spoken to to have any sense.
しっかりした体格 shikkari shita taikaku -- proper build/physique (solid build)
しっかりしなさい! Shikkari shinasai! -- Do it right! (Hold it together! or Hang in there!)
Righteous kiss? Proper kiss? Solid kiss? Who has a right to judge a kiss? It's not a sporting event.

Okay, I liked it. And it wasn't just a quick buss. Somehow, "shikkari" fits.

"Ahem," Giselle's voice interrupted. "I hate to interrupt, but, uhm, the missionaries are here?"

We broke apart and turned in unison to give Giselle a guilty look.

She smirked. "Well, it's none of my business, but, since the missionaries are here, maybe you two should save that."

We both stood up a little unsteadily, left the computer at the Flex prompt, and went to meet the missionaries.

*****

The discussion we had with the missionaries was pretty straightforward. At the time, the first lesson in most of the culturally Christian world was an explanation of the vision Joseph Smith Jr. had when he was fourteen, somewhat more complete than I had given her to that point. I will mention here that the interested reader will find it in The Pearl of Great Price, "Joseph Smith -- History", but otherwise leave it out of this story.

Giselle joined the discussion, and, after the discussion, I invited the missionaries to stay for lunch. But they were on their way to see Julia's family, and Mrs. Cisneros had invited them for lunch there.

Julia and Giselle and I ate lunch together, just the three of us.

"They're awfully young." Julia thoughtfully arranged salad on a second slice of bread spread with peanut butter.

She hadn't even commented when I suggested one of our family's mainstay quick lunches. Well, she did comment on the crunchy, no-sugar, no-additive peanut butter we bought in bulk from the co-op. She said she liked being able to taste the peanuts.

"Only a year younger than you and Joe are."

"Okay, they seem young. That wasn't really all that persuasive a presentation."

Giselle reached out and took Julia's hand, and gave her a searching look. "We aren't sending missionaries out to convert the whole world."

"No?"

"No. We are sending them out to teach people who are ready to listen."

"Oh."

*****

On the way to the lab, Julia reached over to where my hand rested on the shift lever, and hesitantly, tentatively covered my hand with hers.

"Mmm?"

"Uhm," she started hesitantly.

"Mmmm?"

"What if I'm not ready to listen?"

I turned my hand over and gave hers a squeeze. "Whether you join the church and whether you and I end up getting together are two separate questions." Then I had to turn my hand back over to shift gears.

She kept her hand over the back of mine, but was silent until we turned right on University Avenue.

"But if I don't convert, then ..."

I waited for her to complete the sentence, but she didn't.

"We'll ask God what to do then. The missionaries have six discussions they present. When we get through those, you'll have the basic understanding of what to do if you're ready. Until then, don't worry about it."

"Will you still like me?"

"Too late to ask that question. I already do."

"I mean, enough to ..."

"Ask you to marry me anyway?"

We were both silent until I parked the car in the west parking lot, and we started unloading our stuff from the back of the Colt.

"Well?" she asked.

I put the Micro Chroma 68 back down in the bed of the compact station wagon, took her in my arms, and we stood face to face, lost in each other's eyes. I nuzzled her nose, and she giggled. Then I gave her a shikkari shita kiss.

I suppose it was at least a half minute later when we heard Mike say, in a voice dripping with sarcasm, "Well if it isn't two love-birds engaged in a little PDA."

I felt Julia start, and stiffen, but I kept my arms around her, and she relaxed before turning to say with a smile, "Yeah. I guess it is."

Pat and George were behind Mike, and neither of them seemed comfortable. Mike looked openly angry, but he seemed to be trying to keep his anger in check. He shook his head and walked past us with no further comment, followed by Pat and George, neither of whom said anything.

"Whenever you're ready, tell me about Mike."

Julia leaned into me and buried her face against my shoulder, and mumbled.

"I didn't understand any of what you just said, but if you're not ready, I'll wait."

She leaned back and held my gaze with her eyes, letting me see her fear. "I guess it wouldn't be fair to you."

I said, as gently as I could, "It's your choice when to tell me. I won't act on information I don't have."

I thought I saw her lower lip quiver before she pulled her face into a tight, wrinkled, hesitant smile.

"We dated really seriously in high school. Dad wasn't happy, but Mike and I promised ourselves to each other. Then Mike seemed to think promises meant more than I thought they did, and I broke it off."

"I can see him not being happy with that."

"He blamed my faith, and I told him point-blank that I would not accept that from him. We could still be friends, but I wasn't going to trust him like that any more."

I smiled and nodded and gave her what I hoped was a reassuring caress.

"He tried to take me too far. I can't let that happen. Not before marriage."

I nodded again, still searching her eyes. After a moment, I guessed, "But there are still some leftover feelings."

She looked down. "Yes, there are."

"He's a good-looking guy."

"You think so?"

"Absolutely. Watch which of the women in our group are watching him today in the lab."

"What about ...?"

"Of course, looks aren't everything. Still, if he's behaved decently towards you since then, I would be lying to deny that it's another point in his favor."

She still hesitated, then seemed to get courage to be more plain. "What about his race?"

"African, I suppose."

"You don't seem to hold that against him, either."

"Cultural issues are much more important than race. If I'm not going to hold religious culture as an issue between you and me, I would be somewhat lacking to hold race, whatever that is, as an issue with anybody."

"You're not jealous?"

"God only knows what the future holds for him, for me, and for you. At this point, I can see several paths ahead. If God tells you and me to get together, and if you are agreed, I'm game. If you aren't, or if God says no, we'll figure that out when it's time."

She wrapped herself around me, and I nuzzled the back of her neck.

"But let's get to the lab before anybody can make up any really egregious rumors about us."

We both giggled as we grabbed our stuff.

*****

Neither Pat nor George, nor Mike, had mentioned the scene in the parking lot when we got to the lab, and we just set the computer up and got started. The lab session turned out to be quite productive.

Mark and Jeff helped Suzanne and Winston with their mainboards while everyone else discussed the keyboard/trainers. I put another diagram up on the chalkboard to help the discussion.



"Those buffers may be internal to the MCU," I commented as I finished the diagram.

Since I hadn't saved an OS image with a complete boot loader, I had to stage load the OS again using the throw-away loader. But it was just an extra couple of steps, and several in the group were very interested in watching me go through the steps.

"I use the TV-BUG L command to load the drivers into place from tape." The code was short, so even though I had saved it to slow tape, it loaded quickly. "My throw-away loader is with the drivers, so I use the TV-BUG G command to jump to it, and it loads the Flex OS, then returns to the monitor so we can check it using the E command. E for examine, I guess."

Wallace complained, "That's just a bunch of hex numbers."

"Well, it's good enough to check Flex's driver vectors and overwrite them with the M command." I did so. "M for modify. And now we can use the G command again to go jump through Flex's cold boot vector and boot Flex."

Flex booted, and we got the prompt again.
FLEX  2.1            
+++                      
With the Micro Chroma 68 running Flex, I was able to load and run Motorola's cross assembler for the 6805. That allowed us to assemble and test code, so several of the students started writing assembly language code the old-fashioned way, with pencil and paper. There were several comments about being glad that they wouldn't have to hand-assemble their programs now, but others noted that we all had to share my computer for a while.

Everybody seemed focused on using the 6805's fancy bit I/O instructions.

Bob and Jennifer were working together, and Jennifer typed in their code while Bob read it to her and checked it over her shoulder, then assembled it and burned it into a 68705 to test. They got their expected output, but then they were stuck on how to generalize their code without making multiple copies of blocks of code, changing each copy a little at a time.

"This isn't just tedious, it's going to be error-prone, isn't it?" Bob commented, Jennifer nodding her head in agreement.

Dr. Brown and I agreed.

We took a look at several other attempts at decoding the keyboard, but they also ran into the same problem of needing to use copy/paste techniques to deal with the whole keyboard matrix.

Neither Dr. Brown nor I seemed inclined to point them to a different approach, but I had a different suggestion.

"Tell you what. Let's take a break from the keyboard decoding and look at getting real output on the LEDs."

"Real output?" Kyle asked.

"So far, all we are doing is lighting up segments. Let's make routines we can call to put actual multi-digit numbers on those LEDs."

There were some complaints, but most of the group shifted gears with me. By this time, Suzanne and Winston's mainboards were giving output, and they joined us, too.

I redrew the display block diagram by itself.


"Is everyone clear on the idea that we will be enabling, or strobing, one digit at a time?"

Sheryl raised her hand. "No?"

Bob stood up and went to the chalkboard. Pointing to the lines coming out of the left buffer, he said, "All these lines -- wires -- are shared -- connected to each display." Then, pointing to the lines connecting each display to the buffer along the bottom. "These lines are not shared. We have to demux them somehow."

"Yep," I agreed. "Maybe I should draw a diagram of one of the digit elements."


"No buffers, no latches, just light emitting diodes in those seven segment LEDs."

Sheryl's forehead wrinkled. "That's common anode, I guess."

"Right."

"And if we have seven banks of those with cathodes connected in parallel, ...," she thought out loud.

"Ah!" Freddie exclaimed. "You have to activate the anode of each digit separately, or they'll all show the same pattern."

There was tentative agreement among the electronics students, but the data processing group and Julia were still lost.

Except Mike wasn't.

Mike stood up at the chalkboard where Bob and I were, and started sketching out the segment matrix. When Bob saw what he was doing, he started helping.

I also raised chalk, but Mike pushed my hand away. "Too many cooks," he grumbled.

I grinned and stepped back. Then I looked over at Julia with my eyebrows raised, but she wasn't looking at us. She was checking the reactions of the other women in the room.


"Nicely done," I said when they were done, and started to reach out for a slap of the palms, but it didn't look like Mike was going to respond to that. So I gave them a thumbs-up, and Mike gave me a dirty look.

Bob looked at me questioningly, so I gave him and Mike a nod, and they took over the explanation. When they were done, everyone was satisfied that activating the strobe for all digits at once would put the same pattern on every digit, and that it might work to strobe them one at a time. But there was considerable concern about flicker.

Dr. Brown got out his TI programmable calculator with LED readout and had Wallace turn out the lights. then he walked around the room waving the calculator so that everyone could see the flicker. Many of the students commented on having noticed the flicker. I think it was Tanya who related it to TV flicker.

I reminded them of the TV refresh rate, and from there we started calculating the refresh rate for the seven segment displays. It was agreed that scanning the entire set of digits thirty times a second should present a somewhat stable display, which would mean each digit should get a seventh of that interval, or 1/210 of a second -- between four and five milliseconds.

With the lights back on, we talked about setting the 6805's timer to interrupt at that rate, and pretty soon several groups were putting code together. By the time Dr. Brown suggested we shut down for the day and go home, all the groups were able to display arbitrary digits on their displays, and two of the groups were able to output bytes in hexadecimal.

Some of the students were curious about brightness, and I tried to venture into duty cycle, but Bob suggested we'd had enough for a day, and I had to agree.

*****

"Are you up for some singing tonight?"

"What?" Julia was lost in thought on the road home.

"I need to practice for my recital."

"Recital," she said absently. "You were right. I think every women in that group has some kind of a crush on Mike."

"Some of the guys, too."

"I'm not going to pretend to understand that. What's this about a recital?"

"The singer's diction course I'm taking."

"Oh, that. You haven't been practicing."

"Not enough. I probably need to practice a half hour a day for the next two weeks."

"I love to sing."

"I know."

"And I can play the piano for you, too."

And that was what we did that night. Julia called her family, and they came over and we had dinner together, played some rounds of Pit and Uno, and had a two-family sing-along, leaving computers and other difficult questions behind for an evening.

Julia and Mom played some four-handed music. And they let me squeeze in some practice. We sang the hymn, "O God, the Enternal Father" in English and Spanish before I practiced it in Japanese.

(Just as a reminder, Julia is a composite of several of the women I knew in College. If this story went at the pace of my real life, it would be turgid, and I'm sure not nearly as interesting to read about. Also, if the fantasy version of me waited for his first kiss until Helen broke my heart in the real world, he would also likely be waiting another four years before digging into computers for real. Events around me would not allow that, for the purpose of this story.)

*****

After Julia gave me a good night hug and went home with her family, Denny called.

"You up for a trip here next Friday?"

"What's up?

"Management wants a bit of your time without the distractions. They wanted to fly you in, but I pointed out that it would be just as fast for you to drive as to catch a flight, and you'd probably want to visit the surplus shop on Saturday. They said they could pay mileage instead of plane fare, if you can make it by five or six."

"Hmm. When do I need to have an answer?"

"Monday morning."



[Second version backup at https://joel-rees-economics.blogspot.com/2020/06/bk01-33209-straits-bringing-up-flex.html.
Original backed up at https://joel-rees-economics.blogspot.com/2020/06/bk-33209-straits-bringing-up-flex.html.
Some more notes at https://joel-rees-economics.blogspot.com/2020/06/notes-33209-straits-bringing-up-flex.html.]


Monday, June 8, 2020

33209: Straits -- Booting Up

The chapter you're looking for is here: https://joelrees-novels.blogspot.com/2020/06/33209-straits-getting-julia-booted-up.html.

33209: Straits -- Getting Julia Booted Up

Chapter 12: Storm Warnings, and Exercising Diskette Drives and Controllers

Chapter 13.0: Straits -- Getting Julia Booted Up


When we got to the house, we set the Micro Chroma 68 up on the magazine table in the living room and set it to work exercising the disk drives again.

"Magazine table?"

"Tea table, coffee table, same thing. No tea or coffee in our house. Sometimes we emphasize that fact by calling the coffee table a magazine table."

Julia laughed softly as we went into the kitchen to see if we could lend a hand with dinner.

"Sorry about the plain fare," Mom apologized.

"Do-it-yourself grilled cheese sandwiches with whole wheat bread, green beans, lettuce, tomatoes, and onions. Good food. I feel right at home," Julia replied with a grin as she flipped her sandwich in the frying pan. "Can I say grace this time? I mean, ask the blessing."

I shrugged. "Don't see why not."

Giselle added, "I don't object."

Dad was working late, and wasn't home yet.

Mom nodded. "Please. And we don't mind if you call it grace."

Julia hesitated.

"Just the way you would at home." I gave her a nudge. "We're all Christians here."

So she offered grace her way, and Mom and Giselle gave her hugs. I had to wait my turn.

"Does everyone have to give me a hug?"

"Any excuse'll do."

She laughed, and hugged me back.

And we all ate, fixing more sandwiches as we ate.

After eating, Julia and I returned to the living room and checked the drives. There were no errors, but since they had been running for less than an hour, I hadn't really expected any.

I shut the tests down so we could use the computer, and we took turns using Tiny BASIC as a calculator and using the text editor. Homework took us both a bit over an hour.

When Julia finished her homework, we moved our stuff to my room, and she got out her Micro Chroma board and started working on it again at my desk. She used my anti-static straps to protect the circuits.

We set my Micro Chroma 68 on the corner of the desk, between us, and I sat on the car seat and finished my homework.

When I put it away, Julia said, "I'm curious about those packages you got yesterday."

"So am I." I reached over to pick them up from my desk.

"But I think they can wait."

"Oh?"

"We do need to talk about religion."

I sat back. "If I get those out, I'll be back down that rabbit hole again."

"Exactly. I need you to be here, to talk to me."

"Okay, I'll just listen. Go ahead."

She worked silently for about half a minute. "Feels funny."

"Why?"

"I don't need you looking at me. Don't laugh." She was smiling.

"I can't help it."

"Laughing or looking at me?"

Now we were both chuckling.

"Both."

"Find something to do."

"Okay." Still chuckling, I dug in my parts bin. But, instead, I got out paper, pencil, ruler, and eraser. "I think I can talk while I doodle."

"Watcha gonna doodle?"

"Memory selection."

"Tell me what that means later."

"Switching pieces of memory between RAM and ROM, mostly."

"I sort of understand that."

We both chuckled, then worked in silence for a few minutes.

"So. Religion," I prompted.

"Mom and Dad like you."

"My parents like you, too." I thought for a moment. "But your parents don't really know me all that well. And what does that have to do with religion?"

"They think it's okay if I become a Mormon."

"Ideally, these would be separate topics of discussion."

"This is the real world. Reverend Johansen has been over to the house three times this week."

"When have you been home to talk with him?"

"I haven't. He talks with my parents, instead."

"Oh."

"They aren't impressed."

"Why's that?" I set my pencil and paper down and shut down the Micro Chroma 68.

"He thinks we should apply pressure to you to give up Mormonism."

"Okay, I need to tell you my opinion of something here." I started undoing screws and connectors so I could remove the mainboard.

"What are you doing?"

"Just going to finish out the memory selection circuit, so I can switch RAM in anywhere in the memory map, and even switch out the monitor ROM."

"Switch out the monitor ROM?"

"So if I put a 68701 in it I can boot it from the 68701's internal EPROM."

"Why?"

"Flexibility. Maybe. I have a hunch that I need the flexibility."

"Oh. So what about your opinions on something?

"First, Mormon was a prophet. Prophets testify about Jesus Christ. Therefore, people who follow Mormon's teachings should be following Jesus' teachings. People call us Mormon, but we're really Christians."

"That's your opinion?"

"That's fact, or something close to fact, and doctrine."

She put the soldering iron down and scratched her head.

I continued, "There is something I call cultural Mormonism."

"People who are members from birth, not because they believe it?" She picked the iron back up and continued her work.

"That too, but more general -- We have a history, and we have a culture. Some people confuse our culture with our religion, our tradition with doctrine."

"Outward church?"

"Yeah, it's tangled up in that, too."

"All churches have that."

"True. Can I borrow that iron for a moment?"

"Sure."

She set the soldering iron in its holder, then watched as I picked it up and applied solder to hold an IC socket in place. I set the iron back down, and she picked it back up.

"So I don't exactly recommend becoming Mormon," I added.

"You're talking about cultural Mormon."

"Right."

"Okay, I'll try to figure out the difference between tradition and what you actually believe. But how do I find out what you guys believe?"

"Ah, the missionaries can teach you that. We can arrange for you to meet with them."

"You've been a missionary. Can't you teach me?"

"It's no longer my calling."

"Hmmph." Julia was not impressed.

"And I'll tend to wander off on side topics."

She chuckled. "I can believe that." She thought for a minute. "If I meet with them, can you be there, too?"

"Of course. It's what I should do, but I wouldn't want to miss it."

"Okay."

"And I think I should study a bit of what Reverend Johansen wants me to study, too."

"Why?"

"Because it's an important part of your life."

"Okay. I'm glad."

We both worked in silence for a bit, taking turns with the soldering iron.

"Can you give me an overview or something?"

"Well, a boy named Joseph Smith, back in the early 1800s, wanted to know which church he should join. He prayed, and had a vision in which he was told not to join any. All the churches back then had strayed too far away from true doctrine."

"All?"

"When I read what we know of our histories, it's fairly clear to me that religion was too mixed up in politics, science, the arts, education, just about everything. Too much about the Church trying to be the ultimate answer to everything, too much about control, not enough room for the Holy Spirit to guide. I think you've seen some of how that happened in your research for your classes."

"Yes, I have. This country has been a big influence in making it possible for people in this modern world to practice their religion independent of their community and cultural affiliations, hasn't it?"

"Definitely. People need to be free to work out their religion for themselves, or religion isn't much use for its real purpose. So Joseph Smith was told to join none, and he was also told that he would play a part in restoring true religion to the world. When he was older, he had another vision, and he was shown where he could find some ancient records like the Bible, but from the Americas instead of the middle east."

"Is that the Book of Mormon?"

"Right. And, as you now know, we use it as a companion to the Bible."

"And it teaches about Jesus Christ."

"Very much so." I put the iron back down, checked my work, and started putting the mainboard back in place.

"So, are the native Americans the other sheep Jesus had?" She picked the iron back up.

"The other sheep mentioned in John 10, yes, in part. But he also told the people here that he had more other sheep than they, even."

"More sheep. As in other countries?"

"Yeah."

"Not just the people Paul went to teach."

"Right."

"So does the Book of Mormon teach that the gospel is for everyone in the whole world?"

"Oh, yes. It definitely teaches that." I plugged the Micro Chroma 68 in, and it booted up okay. "So far, so good. But I'll have to write code to test it, to be sure it's really working."

"Other preachers didn't take kindly to all of that, I guess?"

"No."

She put her work down for a minute and thought. "So I guess that's at least part of the reason why there has to be a different church organization -- a new church."

"Jesus called new apostles, so we have twelve apostles. And we have a lay ministry, where all the members receive calls, and sort of take turns teaching and being leaders."

"Being leaders?"

"Teaching, being bishop, presiding over quorums, that kind of thing."

"Could you be a bishop?"

"If I were called."

"Could I?"

"There are apparently some cultural issues about that. Some people think it's doctrinal issues, but I think they misunderstand."

"What do you mean?"

"The way I understand what we do in the temple, men and women should share the priesthood callings. But we have a bunch of false traditions from the cultural background that make it difficult."

"Such as?"

"Hard to explain, but there's a lot of confusion about what the priesthood is. And it's really easy for members to overreach their responsibilities. We have the women and the men organized in separate, somewhat parallel organizations. It's an imperfect fit, but it seems to invite less misunderstanding this way."

Julia frowned. "Hmm. So what is priesthood?"

"We say it's the authority and power to act in the name of God, but the power is faith, and everyone should have faith. Authority is permission. I sometimes say it's our excuse to do God's work, to do good things."

"We need an excuse?"

"Men seem to, more so than women, I think."

"That's not making sense. Women do bad things, too."

"Priesthood is not something magic that prevents us from doing bad things, or that automagically makes what we do good and right. We still have to discern and follow the Holy Spirit and not some other spirit. Too many people think what we call priesthood is the same as witchcraft."

"Witchcraft? Magic?"

"Priesthood operates by faith. Faith is belief in things that are true, especially things that are not seen but are true, and the actions that such belief induces."

"Paul says, 'Faith is the substance of things hoped for, the evidence of things not seen.'"

"Hebrews 11, starting at the first verse. Exactly."

"And Witchcraft is?"

"Near as I understand it, trying to bring things which are not real into existence by force of will and deception."

She was shaking her head. "Okay. Not okay. What about science? Which is that?"

"Good science tends to operate on principles of faith, bad science tends to work like witchcraft."

She rested her forehead in her palm and sighed. "What about magic tricks?"

"Sleight of hand?"

"So, deception?"

"Entertainment, unless the magician is trying to pervert the faith of the audience. In my opinion, of course. But we've managed to stray far away from the overview and the basics we need to be focusing on."

She thought for a moment. "Do you think it would cause even more problems with other churches?"

"What?"

"Calling women as bishops."

"Hah. I'd forgotten where we got sidetracked. Probably cause worse problems among our members."

"How so?"

"Too many of our good men operate under the model of the tie-breaking vote being the man's. Too many of our women happily respond by asserting themselves in the kitchen, the bedroom, and with the kids. And that puts us right back in Machiavelli's world."

Now she closed her eyes in frustration. "So. Who gets the tie-breaker?"

"Heh. It would be easy to just say, 'God'. But that would fail to answer. If we are not one, we are not God's. So there is no tie-breaker. Just prayer and trying to understand each other, and trying to understand God's will."

Her face screwed up in thought. "What happens when you are sure you are right?"

"Argument, and loss of access to the Spirit of God."

Now she nodded. "I guess that's what would happen if I were to sure I were right, too."

"Strong opinions are not bad, we just have to be willing not to chase the Holy Spirit away."

Julia continued to nod as she set her mainboard on my desk. "Well, I think I'm finished with this." Then she turned to me and took my hands. "Somehow, we're making the theory real between us."

I think, for a moment, our hearts beat as one.

"What about other races?" she asked.

"The gospel is to all people, bond or free, black or white, man, woman, child, whatever."

"Scripture?" She let my hands go so I could get my scriptures out, and I did so.

"Several places, one is 2nd Nephi 26." I opened to the chapter in the Book of Mormon, and she took the book and set it in her lap, and we read it together, silently, me reading upside-down.

She said, somewhat to herself, "The law is given by Christ."

"As in the sermon on the mount."

"I can see that."

We continued to read.

"Verse 13. He goes and reveals the gospel to every nation."

"And there are other places where it says that."

"This book in verse 17, is it the Book of Mormon?"

"In this specific case, that's how I understand it."

"In this specific case?"

"Patterns get repeated in God's work."

"Oh."

We kept reading.

"We talked a little about churches built up for power, I guess."

"Yeah."

"Verse 28. All are privileged, none are forbidden."

I nodded in agreement and we continued to read.

"Last verse. Black and white, bond and free, male and female, ... the heathen, Jew and Gentile, all are alike unto God."

I didn't say anything.

"So why did your church restrict blacks for so long? It's only been in the last year or so that the restriction was changed, right?

"We aren't perfect, unfortunately. I think this is another case where God has been willing to overlook the faults of many of the members of the Church so that the Church itself could grow. We have to trust God to make it up to those who were restricted so long, and we have to actively reach out now."

"Jesus is our Savior and our Redeemer, so He can make it up."

"Exactly. Although the white members have lost quite a bit for the wait, more than the black members have lost, when I look at it from the eternal point of view. Not to make light of what black people of faith have lost, but white people of faith will lose their essential faith if we don't reach out and change things."

"I'm part hispanic."

"I know."

"And part African."

"And I am part native American and part Swedish." I shrugged my shoulders and grinned. "If we get married, you have a right to hit me up-side the head if I try to exercise any kind of unrighteous dominion, race based or otherwise. Shoot. Even if we don't get married. Let's see your mainboard boot up."

We hooked her mainboard to the TV, and to the power supply in the Micro Chroma 68, and powered her mainboard up. It showed the TV-BUG prompt right away, so we turned the power back off and plugged the ribbon cable from my keyboard into her mainboard, and we powered it up again and played around with the TV-BUG commands.

I knelt beside her while I explained the commands and what they did. She reached around my waist and gave me a hug. And I hugged her back.

"Can you call the missionaries and make an appointment?"

"Good idea. We somehow got way out in the wilderness." I checked the clock. "Still a little time before curfew, maybe we can still arrange something tonight for tomorrow."

So we went into the kitchen to use the phone, and arranged for her first meeting the next morning, before lunch.

*****

"It doesn't play games!" Tito voiced the general disappointment in the Micro Chroma among her siblings. We didn't have a keyboard with us, so it basically did nothing but display the TV-BUG prompt.

"Not yet, anyway. We'll be working on that. Or maybe you can." I chuckled.

"How many times have you kissed?" Sisi asked. She was sitting between us on the couch.

"We haven't," I replied.

Julia looked at me, and I saw her amusement and read her thought. She leaned across in front of Sisi, and I leaned forward to meet her.

"Hey!" Sisi's shout was muffled.

"Once." Julia said with a grin, as our lips parted.

"Gross!"

"We'd better be careful or Sisi'll be calling the Society for the Prevention of Cruelty to Little Sisters," I joked.

"Hmmph."

"Don't ask questions you don't want answers to," Julia smirked.

Julia's mother cleared her throat.

"So are you going to come get Hoot again tomorrow morning?" Tito asked.

"I need to help Joe get his disks running so we can make the keyboard for this thing work."

"I'll bet you won't even touch the computer all morning!"

"Mario!" Mrs. Cisneros reprimanded.

"No, much to my regret," I sighed, "I'm pretty sure we'll only be taking a break from the computer for an hour or so before lunch."

"What for?" Sisi asked.

"I'm going to listen to their missionaries."

"Oh. That could be interesting." Julia's father looked at his wife. "Do you think we should sit in on this?"

"I think we should let Julia do this herself. Maybe we can have them come tell us what they've told her later."

Mr. Cisneros looked over to me. "You think they'll have time tomorrow afternoon?"

"I'll ask. They've turned into pumpkins by now. Can I give them your phone number in the morning?"


[Backed up at https://joel-rees-economics.blogspot.com/2020/06/bk-33209-straits-getting-julia-booted-up.html.
Some more notes at https://joel-rees-economics.blogspot.com/2020/06/notes-33209-straits-booting-up.html.]


33209: Discovering the 6800 -- Parents and Polygamy

A Look at the 8080/TOC "Whoa, Merry, look who's here!" Jim said, sotto voce. He, Roderick, and I were at our lab table ...