The Novels

Economics 101, a Novel (Rough Draft) -- My first sustained attempt at a novel, two-thirds finished in rough draft, and heading a little too far south.
What would you do if you and your study partner, with whom you had been seriously discussing marriage, suddenly found yourselves all alone together on a desert island? Study economics?
Sociology 500, a Romance (Second Draft) -- The first book in the Economics 101 Trilogy.(On hold.)
Karel and Dan, former American football teammates and now graduate students, meet fellow graduate students Kristie and Bobbie, and the four form a steady study group.

Featured Post

Sociology 500, a Romance, ch 1 pt 1 -- Introducing Bobbie

TOC Well, let's meet Roberta Whitmer. Bobbie entered the anthropology department office and looked around. Near the receptionis...

Tuesday, June 16, 2020

Backup: 33209: Straits -- Bringing Up Flex

Backup of https://joelrees-novels.blogspot.com/2020/06/33209-straits-bringing-up-flex.html.


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 the drives do their exercises all night, and they didn't mess up so bad that a retry wouldn't fix it. So now you can load this operating system into memory."

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

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

"Maybe I'm wrong and it might. 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 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 variation. And that means I get to try to figure it out. Oh. I think I found something here."

"What?"

"Hang on." I scanned again through several pages in the manuals I had on my lap. "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."

"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 just overwrite the vectors that are there for linking through. That should minimalize 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 and hugged her.

"It's sure noice to have someone to talk with while I'm down in the rabbit hole. I'll show you where the vectors are when I get things put together."

"I'm looking forward to it."

"I guess my first project is to 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 over?"

I showed her the write protect notch on the floppy cover and a strip of write-protect tape 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."

"Doubt your own work?"

"Yeah. I haven't actually made it protected in hardware."

"Well, maybe you should. 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. You know, some computers implement write-protect in the driver software instead of the controller hardware, so I could make my drives work the way I prefer. But 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 a bit of the controller I/O here, I can make the controller respect the write-protect notch by default, but allow the controller to invert the sense."

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

"Keep it simple. That's actually an engineering principle wih 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.

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

I dropped my head 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."

 "Uh-huh."

"No, seriously."

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

"Heh."

"So, the write-protect circuit."

"Keep it simple. I have the sensor hooked into the controller's CPU, although the controller ignores it now. I could do this in the controller's firmware, and that would mean I wouldn't be depending on the driver software in the computer. I did hook the sensor up to a port bit, so that should work okay."

"Does that mean re-programming the controller?"

"Yeah. Hmm. While I'm in it, I think I'll 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 it to duplicate one of my test floppies. Then I tried to used my disks 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 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 up at my stereo tuner.

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

"Without words. Not the same FM, I guess? And 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.

"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."

"I guess 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 disks TSC had sent. 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 now the throw-away loader."

"Throw-away?"

"If it works, I'll only use it once to load Flex into memory without the drivers. Then we'll be running Flex, and I'll use Flex to make a bootable disk that contains the drivers. I will probably base the boot loader on it later. Since it's throw-away, I can write it to run anywhere. Maybe I should just put it after my drivers, 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?

Okay, I liked it. And it wasn't just a quick buss.

"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 a more complete explanation of the vision Joseph Smith Jr. had when he was fourteen. I will mention that the interested reader will find it in The Pearl of Great Price, "Joseph Smith -- History", but otherwise leave it out of the story here.

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?"

"So," she paused. "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 on 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 back 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. 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 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.

"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.

With the Micro Chroma 68 running Flex, I was able to load and run Motorola's cross assembler for the 6805, allowing us to assemble and test code.

We took a look at several attempts at decoding the keyboard. Everybody seemed focused on using the 6805's bit I/O instructions, and we kept running into similar blind alleys.

Bob and Jennifer were working together, and Jennifer typed in their code with Bob reading over her shoulder, 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 many copies of the 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.

Neither Dr. Brown nor I commented, but I had a suggestion.

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

"Real output?"

"So far, all we are doing is lighting up segments. Let's make routines 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 all still lost. Except for Mike.

Mike joined Bob and me at the chalkboard, 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. 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, 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 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."

"Yeah. 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 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 until Helen broke my heart in the real world for his first kiss, 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 and her family went home, Denny called.
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 want to fly you out, but I explained that you would probably want to visit the surplus shop on Saturday. So they agreed to pay your gas instead of your plane fare, if you can make it by five."

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

"Monday morning."

Chapter 13.2: what?

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


No comments:

Post a Comment

Keep it on topic, and be patient with the moderator. I have other things to do, too, you know.