Thursday, September 25, 2025

3809/2801: Register Sets for 8080, 6800, and 6502

2801
Register Sets for
8080, 6800, and 6502

CPU, RAM, I/O
TOC

(I know some of my audience will think this chapter is a little dry, but important stuff happens in here, so give it a read anyway.) 

Mr. Mori turned back to the projector. 

"The 8080 derives from their initial 8008 CPU, which is based on the Computer Terminal Corporation's Datapoint series controller implemented at lower scale integration -- the central processor is on a printed circuit card rather than a chip. 

"This is the published register set for the 8080:" 

8080 Register Set 

"The 8080 has 7 sort-of general purpose 8-bit registers plus a dedicated status register that can sometimes be treated in pairs as 16-bit registers -- sort-of. It also has a 16-bit stack pointer that you can use to keep track of data in memory, and a 16-bit instruction pointer that keeps track of which instruction the CPU will perform next. 

Cyndy raised her hand.

"I'm sorry to ask, but I'm not quite sure what 8-bit and 16-bit mean. Is that the number of binary digits the register can, uhm, hold?"

"Correct. Barry, what's the biggest number register A can hold?"

"Signed or unsigned?"

"Yes."

"Unsigned, 0 to 255. Signed, wait. Does the 8080 run in two's complement?"

"Yes."

"Signed values range from minus 128 to 127."

"Very good. Chuck, what's the range for H and L together as a 16-bit pair?"

"Uhm," Chuck stalled with a lopsided grimace. "From zero to two to the 16th power minus one for unsigned numbers, and," he slowed, but continued carefully as if he were checking facts in his mind as he recited them, "for signed, minus two to the fifteenth to two to the fifteenth minus one."

512
1,024
2,048
4,096
8,192
16,384
32,768
65,536

I watched over Cyndy's shoulder as she started writing out powers of two from 512 in a margin. Hec and Rick noticed, too.

"You're having trouble remembering these numbers?" Mr. Mori asked with a patient smile.

"Thirty-two thousand something and sixty-five thousand something."

There was a bit of snickering from various members of the class.

"Close enough for now," Mr. Mori nodded. The snickering quieted.

Cyndy interjected, "Okay, the exact ranges are 0 to 65,535 and minus 32,768 to 32,767, right?" 

Eleven pairs of eyes and the heads that owned them turned and stared.

Bob complained, "If you knew, why did you ask?"

Hec replied for her. "She just worked it out right now." 

"Once Chuck confirmed it for her in the power of two forms, she understood, I think. Right, Miss Mills?"

"Yes, Mr. Mori."

"Remind the class what this means, Rick?"

"Why not ask Merry?" Rick grumbled under his breath, giving me a sideways look before answering. "Eh, when you put two registers together, uhm, that'll increase the number of columns, and the maximums are based on the power of two to the number of columns, adjusted because of zero or because of the minus range. Did I get that right, Joe?"

"Yeah, that's the way I understand it."

Rick tilted his head back without looking at me. 

"Mary?" Cyndy questioned under her breath.

None of the three of us in hearing range elucidated. 

"Everybody comfortable with that?" asked Mr. Mori.

There was a chorus of yahs.

"Okay, moving on, A is the register that is primarily used for recording arithmetic and logic results. It's called the accumulator because results tend to accumulate there. But for 16-bit arithmetic, especially address arithmetic, the H:L pair can often be used. B:C and D:E can hold addresses for moving data around, and H:L can also hold addresses -- point to operands for more general purposes than just moving data. None of which probably makes sense yet, but it will when we look at the instruction sets.

"One particular 8-bit register doesn't have a name because it can't really be directly accessed. It can't be used as a general purpose register because it records the condition, or status, codes -- information about the most recent operations, such as whether a carry or borrow has occurred in arithmetic; whether the current result is zero or not; whether it has the most significant bit, the sign bit in two's complement, set or not; and whether the current operation resulted in even or odd parity. We'll get to which operations set what, when, and what it all means later. 

"The condition codes are paired with the accumulator as the program status word, PSW, because they usually represent the current status of computation in the CPU. The entire PSW is basically accessed when you save it or restore it with a push or pop.

"And pushes and pops in the 8080 happen in pairs -- the register pairs shown."

I raised my hand.

"Yeah, Joe?"

"I don't think 16 bits is enough for floating point numbers, is it?" I asked.

"Depends on the floating point precision, but if you are talking about Hec's calculator, no, it's definitely not."

Hec had a programmable Hewlett Packard calculator his dad had given him in payment for some work he had done for his dad. I think it was his dad's old HP-65. It had the magnetic card reader, and he had been studying how to program it.

He volunteered, "The user's manual says it uses 64 bits, I think."

"That sounds right," Mr. Mori continued. "But this cheap 4-function calculator on my desk probably uses just forty bits. Supercomputers might use 128 bits or more."

"What about the 8080?" asked Bill.

"The 8080 doesn't do floating point unless you program it to, so it depends on the floating point software. But 32, 40, and 48 bits are common sizes."

"Is the 8080 slow?" Karl asked.

"Depends on the software. It's likely faster at floating point than many calculators. But some calculators actually use the 8080, often at slower clock speeds than a computer would. The others we will look at today, also, either have been or could be used in calculators." 

Cyndy commented, "The total number of bits in the 8080's data registers isn't enough to do floating point in registers, is it?"

"That's right," Mr. Mori nodded, "pretty much. 32-bit floating point -- you might fit one operand in B:C and D:E together, but it might not help." 

"So floating point numbers have to be stored in RAM, right?"

"Good point. Not just floating point, but strings of text and many other kinds of complex data will be stored in RAM, and pieces of them will be brought into the registers to work on.

"By the way, when you store 16-bit quantities in memory or load them from memory on the 8080, the less significant byte is at the lower address. You may feel that is backwards. I think so. But Intel thought it would save them some critical nanowatts or nanoseconds or development time or something, and, as long as the CPU is consistent with itself, the CPU doesn't care what humans think."

"One more thing, some of the registers in the 8080 tend to have specific purposes, according the instructions that operate on them, and are less useful outside those purposes. That is, there are certain operations that can only be done with certain registers. That allowed Intel's engineers to support more functionality using fewer of the available op-codes. 

"And we want to talk more about instructions and addressing when we examine some actual code. But I think we want to get a look at the register sets of some of other CPUs that are reasonably available first." 

He reached for his box of transparencies. 

I looked over at Cyndy's notes again and grinned. "Your notes are much better than mine."

"You want to copy them, Joe?" She was being coquettish again.

"That's okay. I'm not much for taking notes."

"Yeah, Joe doesn't really need to take notes," Rick commented. "He has a mind like a trap. Sometimes it's really hard to get him out of that trap, too." He grinned sardonically.

I gave him a lopsided grin. "I can't argue with that." 

"You can compare notes with me," Hec offered.

"I'm not interested, Hector." 

Mr. Mori cleared his throat, and the conversations at all the lab tables died down. 

"Here's the register set for the 6800." 

Karl snorted. "That's a register set? What can you do with that?"

Mr. Mori chuckled. "Compared to most minicomputers and mainframes, the 8080 has a pretty limited register set. Yeah, you could accuse the Motorola team of trying to find a minimal useful register set, and I think they got close. But if you think this is too few, wait until we get a look at the 6502 and the 9900. Anyway let's look at what the 6800 has to offer."

Chuck said, "It has a stack pointer, like the 8080." 

"Right. We'll look at the differences later."

Cyndy said, "The program counter is the equivalent of the instruction pointer, right?" 

"Very good. Maybe I can let you guys teach the class." Mr. Mori grinned.

Bill volunteered, "The index register X would be like the 8080's H:L pair?"

"Right. But the 6800 handles indexing differently -- which we'll discuss more when we discuss operators and addressing. And the differences do make up somewhat for the dearth of registers."

"Two accumulators?" Mark asked. "That's not so minimal?" 

"Having two accumulators allows one to be used as a counter or such while the other is accumulating results in a loop of repeated operations."

"I could see that," Mark nodded. 

Barry asked, "Can A and B be paired for 16-bit math?"

"Sometimes it's useful to use them that way, but Motorola didn't provide a single instruction that will do it in the 6800. I wish they had."

(In the real world, Motorola was working at the time on MACSS, which gave us the 68000 -- and 6809 as a byproduct. The 6801, which would fix several small issues like this with the 6800, but retain compatibility with the 6800, would come out of the work on the 6809, and would end up released before the 6809. And if you are interested in such things and haven't looked at the 6805, you should.) 

Rick glanced over at my notes. "Joe thinks CCR is the 6800's PSW."

Mr. Mori raised his eyebrows. "What do you think, Rick?" 

I added a couple of marks to my notes where Rick could see them. 

"Condition codes, program status, it sounds like the same thing, uhm," he check the marks, "but without the accumulator?"

"That's why I don't let people copy my notes," I grumbled.

We exchanged lopsided grins. 

"Right. There's also a bit in the 6800 condition codes that is not present in the 8080 condition codes, used to disable some interrupts. And we'll talk more about that later, too." 

Out of the corner of my eye I watched Cyndy checking my notes, then Ricks, and then Hec's.

"We'll need to talk more about accessing the condition code register on the 6800 later," Mr Mori continued.  

I scrawled out some more notes on that. 

"And this next part is actually about addressing modes, but this is something that is relevant in considering the dearth of registers -- the 6800 has a direct page shortened addressing mode that treats the first 256 bytes of RAM as special locations in memory, making them almost as useful as registers, but not quite."  He swapped out transparencies:

"We almost might want to call the first 256 bytes pseudo-registers."

Frank laughed. "That's a lot of almost."

"True," Mr. Mori replied with a wry grin. "But I don't want to spend much time on why I say almost until we talk about addressing."

Barry asked, "Would this direct page be a good place to work on floating point numbers?"

"Good question. I'm not sure I know a good general answer to that. One problem with that would be what would happen if a program doing floating point calculations got interrupted and some other code tried to use the same locations."

Barry nodded. "I could see that screwing up calculations."

But Mr. Mori deflected. "We need to talk about saving stuff before you use it, too, later. 

"Oh, and while we are talking about data in memory on the 6800, it stores and reads 16-bit values in memory with the more significant byte first, which I think would get my eyes crossed less than the 8080. I just want y'all to know." 

He sighed. 

"But right now I think we have enough time to talk about the registers in the 6502 before we take a break." He swapped transparencies again: 

There were noticeable vocalized expressions of surprise from various parts of the room. 

"I think you can see the influence of the 6800, which isn't really surprising, since the team that designed the 6502 is basically a group of the 6800 team engineers that left Motorola to do so. They worked on a shoe-string budget, and the design is rather minimal, but quite powerful." 

Frank said, "So the stack is located at a specific place, and is limited in size to 256 bytes. That might be reasonable. But, ..."

I pursed my lips. "Two index registers looks good, maybe a good tradeoff for one of the accumulators. But 8-bit index registers? What's the trick for getting 16-bit addresses out of them?"

(Yeah, Joe is a bit ahead of me, catching on to this so quickly. But the whole class is a bit ahead, too.)

"X and Y are used in different ways, which we will talk about when we talk about addressing modes. But, yeah, the 6502 provides powerful addressing modes which compensate for the width of X and Y and even somewhat for having so few registers.

"In the 6502, the first 256 bytes of address are called the Zero Page. They are very clearly intended to be used as pseudo-registers, and are supported in that use by the instruction set and addressing modes. And the 6502 instructions are a bit more cycle-efficient than the 6800 instructions -- a bit faster, so that the 6502 can keep up with or even beat the 6800 and 8080 at the same memory speeds.

"And, just for the record, the 6502 is, like the 8080, little endian. It stores the less significant byte first for 16-bit values." 

Mr. Mori took the transparency sheet off the projector and turned it off.

"We're too close to the break to pick up the COSMAC 1802 and the TI TMS9900, so I think I should let you guys check your notes, discuss them in your groups, and ask questions until the bell." 

Not that I should have noticed, but Cyndy was looking a little uncomfortable.

I leaned against the table and stared at the whiteboard, and subvocalized to myself, "I wonder if it would be too way out there for any other girls to decide to join our class, too." 

I didn't think I intended it to have been loud enough for anyone to hear. But Rick responded, beneath his breath, "I know who you're thinking of. Wishful thinking man." 

Cyndy shouldn't have been able to hear, either. I wasn't really watching her, but I saw, out of the corner of my eye, her face show a reaction I couldn't read. 

Rick said out loud, to no one in particular. "Joking aside, should we compare notes?" 

Cyndy relaxed a bit, and joined us as we did exactly that.

While we were comparing notes, Bob came over and grabbed an unused chair. 

"Hey, Cyndy, anytime you want to join our table, Scott's willing to give up his chair."

"Whoa!" Scott picked up his books and moved them to the neighboring empty table. "Cyndy, you can join me at my new table."

Cyndy replied, "Guys, give me a minute and I'll come over and look at your notes."

Scott grabbed his notes and came over and Bob went back to get his, and pretty soon the whole class was gathered around our table comparing notes -- and joking around a bit, of course. 

When the bell rang, Cyndy excused herself and left, and the rest of us broke up for the ten minute break.

I wandered up to the shelves at the front of the room, and picked up the datasheet for the 6800, somewhat at random, from a pile of data sheets and spec sheets. Rick joined me, picking up a copy of Radio Electronics and flipping through it. Hec also came up and browsed the magazines.

Some of the other guys joined us, as well. Harvey, in particular, seemed to be searching for something in the magazines.

Rick showed me an ad for the SWTPC 6800 computer and the terminal they were selling at the time. "I could pay for this with a couple of month's wages."

"Looks interesting." I looked over his shoulder as he continued thumbing through the magazine. I saw a page advertising the MEK6800D1 evaluation kit.

"Wait. Hold that page." I grabbed a pencil and piece of paper and wrote down the contact information for Motorola shown in the ad, then Hec joined us in looking for ads for evaluation kits for the other processors Mr. Mori had mentioned. We had contact information for Motorola, MOS Technology, Intel, RCA, and TI by the time Cyndy came back.

She didn't say why, but she didn't bother changing tables for the second period of the class.

TOC
Next


Sunday, September 14, 2025

3809/2801: CPU as a Calculator, RAM as Paper, and Display as Output Device

2801
CPU as a Calculator,
RAM as Paper,
and Display as Output Device

Prologue
TOC

"I told you guys I wanted to let you choose which microcomputer we build as a class, but, after doing more research over the weekend, I'm at a loss." Mr. Mori, our teacher, cleared his throat as he prepared the overhead projector. "Too many options that I'm not sure even I understand. No way I can explain enough for you guys to make a decision this term, and we need to start building it before next term. Preferably get it built and running before next term."

Rick looked at Hec, Hec looked at me, and I shook my head and shrugged. We looked around at the other students.

Bob spoke up from one of the lab tables behind us. "So just make the decision for us?"

"It won't hurt you to get an overview of the possibilities, but I'm not going to be able to tell you enough that you can make a real informed decision."

Hec said, to no one in particular, "Chicken and egg. We can't really know until we know."

"The school board is pressuring me to make the 'safest bet'. That would be the Altair 8800, according to at least one of them. Yes, Scott?"

"That's the one my dad likes."

"So I'm voting against that one," Barry grumbled from a table on the other side of the room. 

Bob snorted. "Intel invented the microprocessor."

Chuck laughed. "My dad was telling me rumors about some unknown company delivering microprocessors to the military in late '69. Top secret stuff that no one is supposed to know about."  

Karl let out a derisive "Huh. If it's top secret and your dad knows something about it, how come he's telling you?" 

Ted volunteered, "TI almost beat Intel with the 0100." 

(For the record, this page: https://www.righto.com/2015/05/the-texas-instruments-tmx-1795-first.html has a fairly decent timeline and discussion of who was -- not really --first. Pretty much everybody in the industry knew where we were heading and was trying hard to get there. Intel just got the almost-single-chip microprocessor on the general market a few months before anyone else, and bet their farm on it -- in our timeline and this.) 

"There's a company called Apple selling kits for an apocalyptic price," volunteered Harvey. 

Mr. Mori grinned wryly and waited a moment, but no one asked what Harvey meant by apocalyptic. 

There were fourteen of us spread between the lab tables at the front of the room in two rows of three tables that could each seat four. Ordinary desks where we could study on our own were in the back of the room. Everything about the lab was new.

"Guys. I'm glad there's some enthusiasm here. But we're technically one warm body short of making the class, so I'm probably going to go with the board recommendation. Don't want to give them a reason to cancel the class."

Mark commented, sardonically. "One short, even with Joe and Rick coming over from the crosstown trashpit."

"Hey!" Rick interjected with a smirk.

Everybody laughed.

"Sorry." Mark gave us a lopsided grin. "With them coming over from our esteemed crosstown rivals, I doubt the school board is going to just drop the class if we choose another one." He turned and grinned at us. "Thanks, guys." 

Mr. Mori sighed. "I really appreciate you guys working out your differences outside of class."

Hec replied, "Some of us went to Hood with Joe and Rick. We're okay."

(Real world: John B. Hood Junior High School is now Wilson and Young Medal of Honor Middle School. Happened in 2015. I'm not sure how I feel about that.)

Lots of grunts in agreement, and Mark gave us a thumbs-up. 

Rick and I tilted our heads and gave him a lopsided grin back.

"Anyway, let's get a look at the CPUs I think are possible for us to get." Mr. Mori laid a transparency on the projector, showing a register diagram of the 8080 on the screen.

There was a knock at the open door. Everyone looked over. 

Cyndy was standing there, carrying her books. She glanced at Hec and then at me before addressing the teacher. I lifted my fingers in a half-wave, but she didn't respond.

"May I come in, Professor Mori?"

"You decided to join us after all! Of course. Come on in." Mr. Mori grinned broadly. "Guys, say hello to our fifteenth man."

The class erupted in applause, wolf whistles, and a few cat-calls, and Cyndy looked a little embarrassed.

"Knock it off, guys." Mr. Mori chastised.

Bob called out, "She can sit by me, Teach!"

Mr. Mori looked at Cyndy. "I think, just for today, anyway, you should sit with the table that was not being rowdy. Joe, Rick, Hec, no complaints?

"Nah!" Rick was quick to respond.

"Huh, uh." I shook my head.

"Nope." Hec stood up and pulled a seat out for her at our lab table.

She frowned, but came over and put her books down. "I can handle my chair myself, Hector," she muttered. Hec ducked his head apologetically and sat down.

"Mori just doesn't want any more interruptions today," Rick apologized.

"You can come to our table anytime!" Mark offered.

Cyndy gave him a coquettish grin as she took her class transfer form to Mr. Mori.

"Okay. Yep. Entered in the roll. Cynthia Lucinda Mills. And you go by Cindy?"

"That's me." 

"Okay, Miss Mills, would you care to tell the class what you told me two weeks ago about why you want to take this class instead of the regular electronics class?"

"Dad thinks microprocessors are going to be in everything in the future. And he's told me some of the things he thinks they can do."

Several of the guys clapped slowly, then we all applauded.

"Thank you. I think we are all in the same frame of mind. But what are you sacrificing for it?"

"Yeah, I'm going to have to keep my participation in cheer dance to after school."

"Oh, man, that's tough," I tried to commiserate in the silence that ensued.

She gave me an unreadable look and sat down.

Hec asked, "Is your dad really okay with this?"

She glared, but nodded. "Mom, too, if it's any of your business." 

"Sorry." 

Mr. Mori cleared his throat again and drew our attention to the screen at the front of the room, which was showing the register set layout for the 8080.

"So don't get any ideas." Cyndy included me in her stern glare. Then she turned to Rick and said, "And you, neither, uhm ...?"

"Rick. Rick Stanton." Rick blinked with a straight face. "Don't worry. My mind is a blank already." 

"Mine too," Hec chimed in.

She gave them both dirty looks before turning on me. 

I gave her a "Who, me?" look back. 

Mr. Mori cleared his throat again. "May we proceed?"

"Sorry. Please," she shuffled through her books. "What book are we in?" 

Hec lifted his notebook. "Notebook. We're taking notes."

"Oh. Thanks." 

"Thank you Hec. The 8080 is the brains, so to speak, of the Altair 8800."  

Mr. Mori paused. 

"I really don't like calling the CPU the brains of the computer, but it sure is a common analogy. Oh, I think I'd better do this, first."

He moved to the whiteboard and proceeded to draw --

"We see this diagram a lot. 

"RAM -- random access memory -- is a place where data and results are kept. But the data in it usually disappears when the power gets turned off.

"I/O -- input/output -- devices are devices like printers and keyboards and such for people, and thermometers and mechanical relays and other transducers for measuring and controlling things, and tape and disk storage for memory that is more permanent than RAM. 

"And the CPU -- central processing unit -- does the calculations, and moves data around in memory and between the computer and I/O devices. 

"But let's look at it this way:" He redrew the diagram to the side, with different labels:

"We can think of RAM as magic addressable paper. If we remember where we put data, we can find it again. And we can overwrite it with new data as often as we want without wearing a hole in the paper.

"And we can think of the CPU as the magic pen with a calculator inside that writes in the RAM, but that's pushing the metaphor too far. 

"Well neither of those diagrams are exactly accurate, and they're ignoring a lot of potential applications, like drilling equipment controllers and such. And I don't think we'll be able to hook our overhead projector up to our computer as a useful display device this year or next year. But maybe it's a little easier to visualize, for as incomplete and futuristic and metaphorical as it is. Any questions?"

"Calculator, not brains -- so, you're saying computers don't really think?" Cyndy asked.

"That's definitely part of what I'm saying. We'll need to talk more about that, but I think this gives us enough of a background to talk about different CPUs." 

"How long do you think it will be before we can display computer output on an overhead projector?" Bill asked.

Mr. Mori thought for a moment. "It shouldn't be too hard to rig a CRT display under the lamp and mirror of an opaque projector . I think something like that has been done, but it wasn't very pleasant to look at. And it probably takes a lot of tending while you're using it." 

Cyndy spoke up again, "CRT?"

"Cathode Ray Tube," Mr. Mori replied.

I added, "Like a TV tube, or oscilloscope screen." 

Frank volunteered, "CRT displays are another type of output device." 

"Oh." Cyndy blinked and wrote in her notebook.

"Anything else?" Mr. Mori asked.

We didn't seem to be asking more questions, so he said, "Let's get a look at the insides of several versions of that robot calculator CPU." 

I snuck a peek at Cyndy's notes, and she was doing a good job on them. 

TOC
Register Sets for 8080, 6800, and 6502


Thursday, September 4, 2025

3809 -- A Tale of MCUs and Time, Part 1, 2801

The bell rang the end of the last period of the first day of classes, and I pulled the practice sheet of paper from the platen of the Selectric typewriter in front of me, slipped it into the class folder, and tried not to be obvious about watching Sapphire collecting her books in the front row.

It didn't look like there was going to be a gap in her conversation with the girl sitting next to her, so I put my books together, stood up, and moved between the desks, making sure I would pass her desk.

She stood up and glanced my way as I approached. 

"Uh, Hi, Sapphire." I tried to sound and act natural, but I'm sure I didn't.

Before I could say, "You don't remember me, do you?", she smiled and said, 

"Hi, Joey. How did you manage to get into my typing class?"

"Ah, uhh, it was the only section that fit in my schedule."

"Oh?" 

I couldn't read whether she was playing with me or not. 

She collected her books, and the girl she had been talking to collected her books and stood as well. 

"Yeah," I almost stammered. "Typing is supposed to be a useful skill for working with computers."

"Oh, computers." She grinned a wry grin. "More math."

"Uh, Yeah."

"Oh, this is Cyndy. I don't think you've met."

"Hello Cindy. Nice to meet you."

Cyndy smiled. "Nice to meet you," she paused, her smile turned sly, and she put just a little too much emphasis on "too," and she smirked, but then paused again. "Uhm, ..."

I grinned back. "Joe."

"Not Joey?" 

"Well, either way." 

Sapphire turned and moved with her friend toward the door. Then she casually glanced back at me. "So how is it you're taking typing here?"

"Industrial electronics." I followed them toward the door. "The Industrial Electronics class here is doing microcomputers this year." 

"Always such a complete nerd. So smart."

"Eer ... uhm ...." High school senior and still not sure how to respond when girls called me smart.

At the door, they paused, and I moved through first, checking hall traffic.

"And cute." 

They followed after me. 

"We're heading this way." Saphire nodded one direction down the hall.

"Ah, I gotta go meet my buddy for my ride home." I glanced down the other direction, where Rick was just stepping into the hall from his class. He saw me and gave me a doubtful look.

Sapphire responded with a quizzical look.

"Rick Stanton. Maybe you remember him. He's also doing half-day here for the electronics class. We're splitting the lunchtime driving duties across town."

"Oh. I see." She paused and gave me a bright cheerleader smile that could have meant anything or nothing. "Well, I guess we'll see you next week."

"Yeah, I guess so." 

Cyndy nudged her as they walked away and she nudged back and they both giggled.

When I caught up to Rick, he shook his head. 

"You're reaching way too far out of your league."

”Yah, I know. But she's in the class. I had to say hi."

We made our way to the parking lot and got in his car. He started the engine and shoved Queen's Night at the Opera into the 8-track, clicked through the tracks, and "Death on Two Legs" blared from his speakers as we headed toward the exit. 

"7400, 8080, 6800, 6502, LSI, you got any idea what Mori's talking about?" Rick paused to focus on navigating the intersection at the parking lot exit.

"Probably no more than you. Lots of circuitry in a small package."

Rick looked down at his 8-track. "You think they can pack the circuit boards for my 8-track in one of them li'l ol' chips?"  

"The power stuff has to be separate, I think. And I'm not sure how the digital stuff fits with the analog stuff."

Rick slowed down for the red light at the next intersection, signaling and moving into the left turn lane. "Yeah, yeah, tell me again the difference between digital and analog." 

We waited for the light to change. 

"Digital is about discrete values and analog is about continuous values. You know that."

"Mmm, huh. Switches versus pots." He shook his head. "You think we can figure all that out this year?"

The light changed, and he moved the car forward. 

"Isn't that what college is for?"

Rick snorted. "You're always just along for the ride. Nothing fazes you." 

Oncoming traffic cleared, and we turned left.

 

Author's Preface

This may appear to be a pseudo-memoir. It isn't. Yeah, the world is (mostly) as it was at the beginning of my senior year in high school. And most of the characters are (more-or-less, loosely) based on (composites of) people I knew when I was a kid, names changed, etc. But the events of the plot, and their effect on the world, are almost completely whole-cloth fabrication. 

The narrator is not me. 

I definitely did not have the courage to talk to the young woman on whom Sapphire is sort of drawn on that first day in typing class, and Joe is way ahead of me on other fronts, as well.

He managed to avoid wasting a summer in junior high on Tom Swift Jr. fantasies, opting somehow to read instead from Heinlein and Clarke a bit earlier than I did, and he made time for the Book of Ether that summer, as well. He even read War and Peace and 1984 and other classics, along with the rest of his scriptures, during his sophomore and junior years in high school. (Well, I did read 1984 during my junior year, for the English class thesis. But not Animal Farm.) Way ahead of me.

Sapphire -- I have to admit, although I sort of carried a torch, for several years, for (the image in my mind of) the young woman who was the primary inspiration for Sapphire, I never really got to know her well enough to know whether I've steered clear enough away from portraying her. If I got too close, Sapphire, I apologize.

Rick, Hec, Cyndy, Mr. Mori, all the rest are also composites, constructed for the convenience of the story, and I apologize in advance to the violence I've done to their characters, as well. 

But this is really about the second microprocessor revolution that never happened, not Sapphire or me or our friends. And about the illusion we call the butterfly effect.

This belongs squarely in the class of alternate history fiction. 

* * * * *

 

3809

A Tale of MCUs and Time, Part 1

2801

Marion Joseph Reeves

Copyright 2025 Joel Matthew Rees 

Table of Contents 

 





Saturday, November 5, 2022

33209: Discovering the 6800 -- Parents and Polygamy

I am given to understand that Beryl, or the real-world young woman on whom Beryl was partially based, doesn't want to be associated with my fantasies like this, so I'm going to have to change her name, and the story will diverge even more from being a pseudo-memoirI apparently don't need to change the names further than they already were, but I need to be more emphatic that this is not a pseudo-memoir. More like an alternate history where even the characters are mostly composite if not whole-cloth. These two chapters are pretty close to whole-cloth fabrication anyway, so I'll be using some of the material here. And I'm still trying to decide if I need to change Marion Joseph Reeves's name, too. I do need to start over, however. 


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 working on more assembly language code.

Everybody looked up and then looked at the door, except me and Jim. I gave Jim a look, and he tilted his head towards the door and grinned.

"Hi guys." Beryl walked in.

"Hi!"

"Hey."

"Yo."

"Hi, Beryl." I stood up and reached for an empty stool, but Roderick grabbed it first and slid it over next to me.

Beryl came in and came over to our lab table, greeting Trina with a touch of the fingertips and a "Hi" before sitting down on the offered stool.

"How was practice?" I asked.

"Good enough. Whacha doin'?" Beryl looked at our scratch paper, where we had diagrammed what we understood of the problem and were writing tentative sequences of code.

"Working out how to add big numbers," Roderick answered before I could.

"Bigger than what fits in the eight bits we showed you yesterday," I added.

She looked at the diagrams with a bit of interest, then shrugged. "Geek to me." 

Chuckles came from various directions. 

"Got time to wait while we test this?"

"Sure. If it's not more than half an hour."

Todd looked up from where he and his group were helping Mr. Forrest test the serial I/O board in the computer. "Should we yield the field and let them try their code?" he asked.

Mr. Forrest nodded. "Time to take a break and see if we've figured anything out, anyway."

I gave Jim and Roderick a query with my eyes, and they both shook their heads. 

"Not my code," Roderick responded.

"Let's use yours," Jim said.

Todd, Chuck, Moose, and Mr. Forrest stood up and yielded place for us at the Altair's table.

I sat in front of the Altair 8800 and used the front panel interface to toggle in the code.

Beryl came over and stood behind me, resting her hands on my shoulders. I stopped working the switches long enough to give one of her hands a squeeze, using the time to squelching the nervous thrill that tried to stop my brain from working. I also ignored the snickers and murmurs around me. 

"So what are these numbers in real num -- uhm, decimal?" Beryl asked.

"123 million 456 thousand 789 plus 987 million 654 thousand 321."

"Ah. One billion, one hundred eleven million, one hundred eleven thousand, one hundred ten." 

More murmurs around us.

I turned and grinned at her. "And you pretend you don't know what we're doing here."

"Just an easy arithmetic problem." She grinned back.

Chuckles and quiet groans. Trina snickered. "Genius attracts genius?"

Beryl turned and they exchanged finger waves.

I looked at the ceiling. "How am I supposed to respond to that?" I muttered. I looked back at the computer.

Beryl gave my shoulders a squeeze. My stomach jumped, ever so slightly.

"Okay, let's see if it flies." I stepped through, reading the input numbers and results aloud.

00010101 plus
10110001 equals
11000110

I checked the status register LEDs. "-- with no carry. Good," I breathed.

11001101 plus
01101000 equals
00110101

"-- again, with no carry. Okay," I nodded, cautious.

01011011 plus
11011110 equals
00111010,

The carry bit in the status register array of LEDs lit up. 

"-- with a carry. So far, so good. Okay," 

The carry, plus
00000111 plus
00111010 equals
01000010

And everybody clapped.

"Let's see your code." Mr. Forrest checked my work. "Lots of repeated instructions. That's faster than a loop, but it takes more program space, and we only have 4K that we know is working just yet. Try a loop?" 

"Well, that's what Jim and Roderick were working on, but we weren't comfortable with where we put the loop count or with what happened to the carry while counting the loop."

"Let me see that, Jim." 

Jim handed Mr. Forrest his work, and he checked through it, nodded, and handed it back. "Want to give it a try?"

"No confidence."

"Results might be interesting?"

"I'm not sure I'd have any idea what went wrong."

"We can all think about it. Joe, write your code up on the board for everyone to look at. And Jim, you can write yours on the board next to Joe's. Try to line up instructions that do the same things."

Jim and I went to the board and put our code up. We consulted about what lined up where, leaving some empty lines in my code where the loop control went and putting the repeated code from his loop in parenthesis to show where it matched my code.

"Still hesitant to try it, Jim?" Mr. Forrest asked.

Jim went back to our lab desk and looked through the summary of 8080 machine code instructions and their effects which Mr. Forrest had handed out for each lab group. He looked up and said, "Sure. Why not?"

"Hot seat." Mr. Forrest indicated the stool I had vacated.

"Do I get a back rub from Beryl?" Jim asked, with a wink at me. I grinned and looked at Beryl. 

She grinned back. "Oh, since you're Joey's lab partner, why not?"

Jim looked surprised, but pleased, and sat down. Beryl stood behind him and rubbed his shoulders, then gave them a hard squeeze.

"Ouch. Feels good!"

Everyone laughed.

JIm's code ran successfully, as well, and we all applauded.

"Okay, I'm thinking we can leave the teletype for tomorrow and just let the rest of you try your code, and then maybe I can get home by midnight tonight. You can go when your code runs."

We all laughed.

After discussing the results we got with Jim and Roderick, I packed up my stuff and left with Beryl. We turned left out the door, and she slipped her hand into mine.

At the first cross hall, I started to turn the library and bumped into her. We both giggled as I corrected course. 

"This is the long way to the library?" I asked.

"Dad and Mom are home."

This time I couldn't squelch the butterflies in my stomach, and stopped.

Beryl turned back without dropping my hand, challenging me with her eyes. 

"Erm, okay." 

I started moving again, not quite feeling the faux granite floor under my tennis shoes. I couldn't say anything as we walked. 

Beryl gently but playfully swung my hand in hers. She was doing the swinging. My muscles wouldn't have obeyed me if I had tried.

"Cat got your tongue?" she asked as we left the south wing. 

It would be a few more years before the entire campus would be fenced in, se we headed unimpeded for the street where she lived, less than ten minutes away.

"The cat or the butterflies she's chasing."

She giggled. 

"Meeting your dad?"

"And Mom and Donna."

"Donna?"

"Kid sister."

"You've never told me about your family."

"You haven't told me much about yours. Your dad's a professor at the college, but other than that?"

"My mom, well, she teaches at church and volunteers at the Globe."

"Globe of the Great Southwest. Does she act?"

"Took the part of Juliet's nurse, and the witch in Macbeth."

"Do you act?"

"I did some sort of extra part in the Wizard of Oz. I'm the youngest of six. Four sisters and a brother. One sister's married to an Air Force codebreaker stationed in the Philippines, the others are working their way through school. Denny's working on an engineering degree."

 Beryl was suddenly quiet. "My big brother died when I was kind of young."

"Oh." I didn't know what to say to that. "Sorry to hear about that."

"I miss him sometimes. But I think he's happy in heaven."

"That's a good hope to have. I believe in the afterlife, too."

"Yeah. Heaven's a good place."

We came too soon to her house, and her dad faced me at the front door with an impassive expression. Her mother took Beryl's hand and pulled her inside, hugging her closely.

"So. This is the Mormon boy that has been stalking my daughter for four years."

He didn't seem to be joking.

"Dad?"

"Yes, sir." I said, not cracking a smile.

"What about this polygamy thing? How many wives besides my daughter do you plan on marrying?"

"No, sir. Beryl and I are not anywhere close to discussing marriage in the first place. Yeah, I've had a terrible crush on her since junior high, but we haven't been talking about the future at all. And, in the second place, Mormons don't do polygamy any more."

"Any more?" her mom asked.

"One of my great-great grandfathers lost his wife while crossing the plains to Utah, and when he got to Utah he married a widow with six kids who lost her husband on the way. With the second wife's permission, he married a third woman." 

"So, two living wives?"

"Yeah."

"And what do you think of it?" her father took over interrogation again.

"Don't really think about it much. The third wife, from what I understand, was not getting any offers for marriage on account of her health, and was having trouble supporting herself, so it was a way to provide for her without putting her on the street. But there were jealousies."

Beryl's parents looked at each other.

"But you don't do that any more?" her mom asked.

"Why is that?" her dad followed on, in a tone that broached no nonsense.

"Well, there are several reasons. One is that God told us that, rather than go to war with all the people who thought that polygamy should be a capital offense, polygamy would no longer be required of us."

"Required?" Beryl asked, puzzled.

"It was a different world. A single woman back then was looked on with suspicion and misunderstanding."

Her dad cleared his throat.

Beryl's puzzlement increased. "Huh?"

Beryl's mother hugged Beryl tighter, whispering something to her. 

Beryl's face drained color. She turned to her mother. "No!"

I continued, "Anyway, it did help prevent the worst options. When it worked well, it seemed to give women more and better options. And that was what the glory was supposed to be all about -- pure religion is when you help those who need help, and society didn't really have good ways to provide for single women back then."

"Still don't," her mom muttered, and her dad gave her a sideways glance.

"I think we at least have more options now," I continued. "Also, part of the principle was that, if a man were being abusive towards a wife, the wife wouldn't have to stay with him. That principle is still supposed to apply. It helps that modern law recognizes the rights of women better than it did then."

Beryl's mom relaxed a bit, and her dad's expression became a little less stern.

I continued. "Unfortunately, members with fundamentalist ideologies sometimes got things wrong about it and instead of being an opportunity to help, it became a focus of power struggles within those families, and a tool of abuse. Towards the end of the last century, that was happening too often. I tend to think that was the real reason the Lord let the government force us into a position where we had to quit. We weren't doing it right."

"So, you're saying no Mormons marry polygamously any more." Her dad was still pressing.

"There are still members who misunderstand which principles of the Gospel are fundamental, and some of them practice polygamy in secret, or leave the Church to practice it. If members who are doing it secretly are found out, they are excommunicated."

"Well, that could cause problems, too, couldn't it?" her mom questioned.

"Yeah. Unfortunately, we aren't very perfect. We should be making sure that, even if they are excommunicated, we still try to help them, but I think we have trouble doing that too often, as well."

"So, would you ever do it?" Her dad asked.

"Not planning on it. I'm not sure I could avoid the problems that often occur. I hope I don't have to face the question, but I also don't expect to."

"Why not?"

"According to my understanding of the scriptures, it's supposed to be only for exceptionally difficult times. We have scriptures that are pretty explicit about that."

Her dad frowned, and probably a full minute passed while he thought. Then he turned to his wife and something passed between them that I couldn't read. He turned back to me. "Son," her dad said, "I've heard enough good about you from Beryl that I'm going to give you a chance to prove yourself."

I took a deep breath. "I hope you will not be offended that I won't be trying to prove myself. I always do my best to live a moral life and treat all people with respect, and I'll just hope that will be good enough."

He grinned and reached out and shook my hand. "We'll see. We'll see. Well, come in so you and Beryl can study. That's what you came for, I think?"

"Yes, sir."

Donna was standing in the front room, watching the exchange with wide eyes, and Beryl introduced us. The two of them exchanged looks and giggles and grins, and Donna dragged Beryl off into the kitchen to talk for a minute. 

While they were gone, I introduced myself more properly to Karl and May, and they introduced themselves to me.

Then Beryl and Donna came back, and Beryl pulled me away from her parents and over to the couch, where we sat, spread our books out on the coffee table, and dug in.

TV or Not TV (Typewriter)


This is a minor revision of https://joelrees-novels.blogspot.com/2022/01/the-other-os-9-alternate-reality-calculations.html.

33209: Discovering the 6800 -- A Look at the 8080

I am given to understand that Beryl, or the real-world young woman on whom Beryl was partially based, doesn't want to be associated with my fantasies like this, so I'm going to have to change her name, and the story will diverge even more from being a pseudo-memoirI apparently don't need to change the names further than they already were, but I need to be more emphatic that this is not a pseudo-memoir. More like an alternate history where even the characters are mostly composite if not whole-cloth. These two chapters are pretty close to whole-cloth fabrication anyway, so I'll be using some of the material here. And I'm still trying to decide if I need to change Marion Joseph Reeves's name, too. I do need to start over, however. 

Preface: 

This is not a memoir. God has told me not to look back at the things I have done wrong in my life. But I'm not really looking back, if it's something I never did, right? 

;-)

My apologies to the real-life Roderick, Beryl, Trina, Todd, Mr. Forrest, Merry, and others that I drag into my alternate reality retro fantasy where I fix a few things that went south in our reality.

I still find myself daydreaming about a fictional world in which I got more actively involved in the microcomputer revolution. More than one fictional world, in fact. I keep trying to write stories that are too big. That bad habit is probably inherent in trying to revise history. 

(Cough.) (I know, God, I'm looking back. But real life ain't very fun any more.)

This time I'm going to try turning my senior year into a story of its own (instead of the start of a reboot). Except, it isn't my senior year, it's Merry's. And, instead of buying a cheap programmable TI calculator, he saves his money and buys something more useful to his future.


(33209 Book 0:)

Discovering the 6800

by Joel Matthew Rees
Copyright 2022, Joel Matthew Rees


Prologue, a Look at the 8080

Beryl looked over at me with puzzlement in her blue eyes. "The lights flash."

I nodded. 

She shook her head. "I don't get it."

Jim snickered. 

I sighed and looked aside, searching the wall of the electronics lab for clues.

"Your eyes just turned green." Beryl smiled at me with a quiet laugh.

Roderick laughed out loud. "Merry, buddy, you're wasting Beryl's time making her look at this Altair here."

"Shooash!" Trina let out in exasperation. "No, he's not. Beryl's trying to understand. Everyone just shut up and let Joe show her what we're doing."

"Who's Mary?" Beryl asked. "Oh." She looked back at me.

I looked at the ceiling and nodded. 

She frowned and turned to Roderick.

He backed off his stool, raising his hands in defense. "It's a nickname."

"Yeah," I laughed. "Only my best friends get to call me that." 

Roderick grinned and sat back down as Beryl turned back to query me silently, those blue eyes confusing me, as usual. 

I shrugged, and gave her a lopsided grin. She wrinkled her nose and her puzzled expression turned into a wry smile.

"Anyway, we start out putting forty-nine in the accumulator." I picked up the hand-written program listing again and indicated the line that did that.

 3E 31    MVI A, 49 ; 00110001

Then I used the microcomputer's front panel switches to set the starting address back to zero. "The LEDs that are lit are ones and the dark LEDs are zeroes, and that was binary 0-0 1-1-0 0-0-1 on these lights here after it did the first instruction." I stepped the processor through the first instruction and the lights that showed the accumulator value lit up again with the 00 110 001 pattern.

"You showed me how you convert forty-nine into base two and it turns into that long string of ones and zeroes." She pursed her lips and wrinkled her chin. "A is another name for the variable you call the accumulator."

"Yeah."

"Move to A, forty-nine. Deliberately backwards grammar."

"I guess some engineer at Intel thought it would make more sense to engineers or something." I shrugged apologetically.

Beryl shook her head. "I still don't get it, but I'll play along."

"Yeah," Chuck complained. "Play along. That's what we all do."

The students around us broke out in laughter, and Mr. Forrest, our teacher, chuckled. 

Beryl tilted her head. "And then you move the number from accumulator A to register B, right?" She put her finger on the next line.

 47    MOV B, A

I hit the step switch on the front panel. "Right. You're getting it."

"No I'm not." She pouted, then giggled.

Trina laughed. "That's the way, Beryl. Keep these guys in their place."

Beryl grinned and leaned over and bumped elbows with Trina.

Turning back to the listing, she continued. "And you move nineteen into the accumulator so I can see the pretty lights change." She pointed at the listing.

 3E 13    MVI A, 19

And I stepped the instruction. "Yeah. Binary 00 011 001." And that was what the accumulator output LED array showed.

"I guess I see that. Maybe. And you move it to register C to get it out of the way for some reason?" She pointed at the next line.

 4F    MOV C, A

I stepped it. "Pretty much exactly. I thought it would make it easier for us all to watch."

"And then you move the forty-nine in B back to the accumulator for the same reason."

 78    MOV A, B

"Right," I nodded, stepping again.

"And add the two numbers."

 81    ADD C

"Uh, huh."

"And stop so we can think about what the pretty lights say." She pointed to the last instruction.

 76    HLT

"And the result is binary," she read from the front panel, "01 000 100." She took a deep breath. "Which you showed me is sixty-eight."

 Todd showed her the conversion on his HP calculator again.

"Thanks, Todd."

"Any time you want to look at my calculator, just ask."

"Careful, Todd!" Chuck warned him. "Merry, I mean, Joe, might have something to say about that."

I gave Chuck a look. "Last I checked I don't give orders to anyone in this room." I looked back at Beryl apologetically.

She wrinkled her forehead and nose at me. "Thanks for the offer, Todd."

Some of the guys in the room started to give wolf whistles, but Mr. Forrest cleared his throat and they stopped.

"But I still don't see the point."

Mr. Forrest stood up. "Well, I think I've arranged for the university to loan us a teletype, and I got a package with the free software Tiny BASIC language interpreter on tape, so we might have something more interesting to look at in a few days."

"Thank you, Mr. Forrest. And thanks, everyone, for showing me what Joey gets all excited about."

"Whoa." Jack pulled his head back in mock horror. "Nobody gets to call him Joey."

I rolled my eyes again and raised my hands to the sky in mock resignation as the guys in the class broke out in laughter again.

Beryl gave me a wry smile and a wrinkle of the nose. "Now are you going to help me with the political science homework?"

"Sure. Let's go."

"Wooped. Just wooped," Frank commented, earning a dirty look from Trina while most of the guys in the class erupted in laughter.

I chuckled and shook my head as I put the listing away.

"Wait a minute, Joe." Mr. Forrest stood up. "The rest of you guys, too. I need to tell you all something."

We all quieted down.

"I have an opportunity to go to a microcomputer show in San Francisco, April 16th and 17th, and there's room in the car for a couple or three students to go with me. I've got permission from the school, but you'll need parental or guardian permission."

He looked around at us while we digested the information.

"If more than three of you want to go, we'll have to figure out a way to choose who goes. Maybe a programming or electronics problem to solve. We can talk about that tomorrow, but anyone who's interested, please check with your parents tonight."

"Whoa, yeah."

"Alright!"

"Cool!"

"I'm in!"

"Count me out."

I didn't say anything. 

Beryl looked at me with a question in her eyes as she picked up her books.

"Shoot yeah, I'm interested." 

I switched the power off on the microcomputer and picked up my books. Then I stopped. 

"Oh. Wait."

She looked down quickly as she stood up. "Well, let's go study poli-sci," she said, disappointment tinging her voice.

I followed her out of the electronics lab into the hall. "That's when the cheering squad's year-end competition is, isn't it?"

"Never mind." She didn't turn back to look at me. "If you need to go, you need to go."

She walked ahead as we headed to the library.


Chapters (tentative list):

  1. Parents and Polygamy
  2. Calculations and Revelations
  3. TV or Not TV (Typewriter)
  4. Faire Enough
  5. BASICally Proceed Forth
  6. Surveying the Field
  7. Sacrifice and Service


Parents and Polygamy


(This is a minor rewrite of https://joelrees-novels.blogspot.com/2022/01/the-other-os-9-alternate-reality.html.)

Sunday, January 16, 2022

The Other OS-9, an Alternate Reality -- Calculations and Revelations

[I think I'm going to repurpose this chapter and the story it began. See https://joelrees-novels.blogspot.com/2022/11/33209-discovering-6800-parents-and-polygamy.html. Also, I am given to understand that Beryl doesn't want to be associated with my fantasies like this, so I will have to change her name. This chapter is pretty much whole cloth fabrication anyway, so I'll be using it.]

Prologue/TOC

"Whoa, Mary, look who's here!" Jim said too loudly, pretend sotto voce. He, Roderick, and I were at our lab desk working on multi-byte addition in hand-written assembly.

Everybody looked at the door. I looked over at Jim instead, and he raised his hands with a grin, backing away on his stool.

"Hi guys."

I rolled my eyes and shook my head and turned to the door. "Hi, Beryl."

She came in and walked over, greeting Trina with a touch of the fingertips and a "Hi" on the way.

Roderick shifted over to an empty stool, and Beryl sat down by me.

"How was practice?" I asked.

"Good enough. Whacha doin'?" Beryl looked at the scratch paper where we had diagrammed what we understood of the problem and were writing tentative sequences of assembly language.

"Working out how to add big numbers," Roderick answered before I could.

"Bigger than what fits in the eight bits we showed you yesterday," I added.

She looked at the diagrams with a bit of interest, then shrugged. "Greek to me." 

Chuckles came from various directions. 

"Got time to wait while we test this?"

"Sure. If it's not more than half an hour."

Chuck looked up from where he and his group were helping Mister Forrest test the serial I/O board in the computer. "Can we let them try their code?" he asked.

Mr. Forrest nodded. "Time to take a break and see what we've figured out so far, anyway."

I looked at Jim and Roderick, and they both shook their heads. 

"Let's use your code," Jim said.

Todd moved an empty stool over for me and I sat down at their lab desk. Jim and Roderick stood at either side of me to watch while I used the front panel interface to toggle in the code. 

Beryl came over and stood behind me, resting her hands on my shoulders. I stopped working the switches long enough to give one hand a squeeze, deliberately squelching the nervous thrill that tried to course through me and stop my brain from working. I also ignored the murmurs around me. 

"So what are these numbers in real num -- uhm, decimal?"

"Decimal. 123,456,789 plus 987,654,321 equals --"

"One billion, one hundred eleven million, one hundred eleven thousand, one hundred ten," she finished for me.

More murmurs around us.

I turned and grinned at her. "And you pretend you don't know what we're doing here."

"Just arithmetic." She grinned back.

Chuckles and quiet groans. Trina snickered. "Genius attracts genius?"

Beryl turned and they exchanged finger waves.

I looked at the ceiling. "How am I supposed to respond to that?" I muttered, and looked back at the computer.

Beryl gave my shoulders a squeeze. My stomach jumped, ever so slightly.

"Okay, let's see if it flies." I stepped through, reading the input numbers and results aloud.

00010101 plus
10110001 equals
11000110

I checked the status register LEDs. "-- with no carry. Good," I breathed.

11001101 plus
01101000 equals
00110101

"-- again, with no carry. Okay," I nodded, cautious.

01011011 plus
11011110 equals
00111010,

The carry bit in the status register array of LEDs lit up. "-- with a carry. So far, so good. Okay," 

The carry, plus
00000111 plus
00111010 equals
01000010

And everybody clapped.

"Let's see your code." Mr. Forrest checked my work. "Lots of repeated instructions. That's faster than a loop, but it takes more program space, and we only have 4K that we know is working just yet. Try a loop?" 

"Well, that's what Jim is working on, but we weren't comfortable with where we put the loop count or with what happened to the carry while counting the loop."

"Let me see that, Jim." 

Jim handed Mr. Forrest his work, and he checked through it, nodded, and handed it back. "Want to give it a try?"

"No confidence."

"Results might be interesting?"

"I'm not sure I'd have any idea what went wrong."

"We can all think about it. Joe, write your code up on the board for everyone to look at. And Jim, you can write yours on the board next to Joe's. Try to line up instructions that do the same things."

Jim and I went to the board and put our code up. We consulted about what lined up where, and where I needed to leave empty lines so we could line things up.

"Still hesitant to try it, Jim?" Mr. Forrest asked.

Jim went back to our lab desk and looked through the summary of 8080 machine code instructions and their effects which Mr. Forrest had handed out for each lab group. He looked up and said, "It might work."

"Hot seat." Mr. Forrest indicated the stool I had been sitting on to use the computer.

"Do I get a back rub from Beryl?" Jim asked, with a wink at me. I grinned and looked at Beryl. 

She grinned back. "Oh, since you're Joey's lab partner, why not?"

Jim looked surprised, but pleased, and sat down. Beryl stood behind him and rubbed his shoulders, then gave them a hard squeeze.

"Ouch. Feels good!"

Everyone laughed.

JIm's code ran successfully, as well, and we all applauded.

"Okay, I'm thinking we can leave the teletype for tomorrow and just let the rest of you try your code, and then maybe I can get home by midnight tonight."

We all laughed.

After discussing the results we got with Jim and Roderick, I packed up my stuff and left with Beryl. We turned left out the door, and she slipped her left hand into my right.

At the first cross hall, I started to turn right and almost bumped into her. I corrected course quickly and followed her straight across. 

"This is the long way to the library." 

"My house tonight. Dad and Mom are home."

This time I couldn't squelch the butterflies in my stomach, and stopped.

Beryl looked up and back at me, challenging me. 

"Erm, okay." I started moving again, not quite feeling the faux granite floor under my tennis shoes. I couldn't say anything as we walked, Beryl gently but playfully swinging our hands between us. She was doing the swinging. My muscles wouldn't have obeyed me if I had tried.

"Cat got your tongue?" she asked playfully as we left the south wing. The fence wouldn't go up around the campus for another couple of years, and we headed unimpeded for the street where she lived, less than ten minutes away.

"The cat or the butterflies she's chasing."

She giggled. 

"Meeting your dad?"

"And Mom and Donna."

"Donna?"

"Kid sister."

"You've never told me about your family."

"You haven't told me much about yours. I remember you're the youngest and you have, what, four sisters?"

"And one brother."

"... and one brother." She paused, suddenly quiet. "My big brother died when I was kind of young."

"Oh." I didn't know what to say to that. "Sorry to hear about that."

"I miss him sometimes. But I think he's happy in heaven."

"That's a good hope to have. I believe in the afterlife, too."

"Yeah. Heaven's a good place."

We came too soon to her house, and her dad faced me at the front door. Her mother took Beryl's hand and pulled her in, hugging her closely.

"So. This is the Mormon boy that has been stalking my daughter for four years."

I couldn't tell if he was joking or not.

"Dad!"

"Yes, sir." I said, not cracking a smile.

"What about this polygamy thing? How many wives besides my daughter do you plan on marrying?"

"No, sir. Beryl and I have not discussed marriage in the first place. No plans about that at all at this time. And, in the second place, we Mormons don't do polygamy any more."

"Any more?" her mom asked.

"One of my great-grandfathers lost his wife on crossing the plains to Utah, and when he got to Utah he married a widow with six kids who lost her husband on the way. With the second wife's permission, he married a third woman."

"So why don't you do that any more?" her dad asked, in a tone that broached no nonsense.

"Well, there are several reasons. One is that God told us that, rather than go to war with all the people who thought that polygamy was a capital offense, polygamy would no longer be required of us."

"Required?" Beryl asked, puzzled.

"It was a different world. A single woman back then was looked on with suspicion and misunderstanding."

Her dad cleared his throat.

Beryl's puzzlement increased. "Huh?"

Beryl's mother hugged Beryl tighter, whispering something to her. 

Beryl's face drained color. She turned to her mother. "No!"

I continued, "Anyway, when polygamy worked well, it helped prevent the worst options. It didn't always work well, but the leaders of the Church were rather strict that a polygamous wife who felt that she was in a bad marriage could be released from the bad marriage and be free to seek someone better. In marriage. Without having to leave her children or her belongings behind."

Beryl's mom suddenly relaxed, and her dad's stern expression softened slightly.

I continued. "Unfortunately, the members with fundamentalist inclinations who sometimes leave us, leave us before they understand what polygamy was supposed to be. And that can cause some pretty abusive family situations for them. Which brings up a third reason we quit. By the end of the last century, too many of our regular members were beginning to practice it without understanding it."

Her dad and mom both relaxed at the same time. 

"Son," her dad said, "I've heard enough good about you from Beryl that I'm going to give you a chance to prove yourself."

I took a deep breath. "I hope you will not be offended that I won't be trying to prove myself. I always do my best to live a moral life and treat all people with respect, and I hope that will be good enough."

He grinned. "We'll see. We shall see. Well, come in so you and Beryl can study. That's what you came for, I think?"

"Yes, sir."

Donna was standing in the front room, watching the drama wide-eyed, and Beryl introduced us. The two of them exchanged looks and giggles and grins, and Donna dragged Beryl off into the kitchen to talk for a minute. 

While they were gone, I introduced myself to Karl and May, and they introduced themselves to me.

Then they came back, and Beryl dragged me over to the couch, where we sat, spread out our books on the coffee table, and dug in.

TV or Not TV (Typewriter)



Backed up here: https://joel-rees-economics.blogspot.com/2022/01/bk-the-other-os-9-alternate-reality-calculations.html.

Monday, January 10, 2022

The Other OS-9, an Alternate Reality

[I think I'm going to repurpose this chapter and the story it began. See https://joelrees-novels.blogspot.com/2022/11/33209-discovering-6800-look-at-8080.html. Also, I am given to understand that Beryl doesn't want to be associated with my fantasies like this, so I will have to change her name. This chapter is pretty much whole cloth fabrication anyway, so I'll be using it.]

Prologue, part I: 

God has told me not to look back at the things I have done wrong. He has not told me not to look back at things I haven't done wrong.

This story is something in the vein of the 33209 story, but with a simpler technology timeline than that. More like the one I laid out in this blogpost about the first OS-9: https://defining-computers.blogspot.com/2021/10/alternate-reality-early-microcomputer.html

I  think I'll use a simpler story and plot, as well, as well as the simpler technology roadmap. 

I'll go back to Japan almost immediately after my mission to chase Satomi, and end up meeting Chika while she is still in high school. And she will make herself obnoxious so that I have to invite her for a year of home-stay high school studies with my parents. And she will be one of the women who push me to develop my interest in the nascent microcomputer industry. 

And I'll have to push Jeff Raskin ahead on that text-based Apple IX in 1980 somehow. That's a tough one, but not nearly as tough as inventing reasons for Motorola to keep a double flagship market profile with the 68000 and 6809, and to evolve both more rapidly. 

In order to do that, and to clear up how the whole mess started, I guess I'll have to back up to my senior year in high school.

 

The Other OS-9
an Alternate Reality

by Joel Matthew Rees
Copyright 2022, Joel Matthew Rees


Prologue, part II:

Beryl looked over at me with puzzlement in her blue eyes. "The lights flash. I don't get it."

Jim snickered. 

I sighed and looked aside, searching the wall of the electronics lab for clues.

"Your eyes just turned green." Beryl smiled at me with a quiet laugh.

Roderick laughed out loud. "Mary, buddy, you're wasting Beryl's time looking at this Altair here."

"Shoosh!" Trina let out in exasperation. "No, he's not. Beryl's being patient, everyone just shut up and let Joe show Beryl what we're doing. Go ahead, Joe."

"Who's Merry?" Beryl asked me. "Oh. Wait. Marion. You."

I glanced at the ceiling and nodded. 

She frowned and turned to Roderick.

He backed off his stool, raising his hands in defense. "It's a nickname."

"Yeah," I laughed. "Only my best friends get to call me that." 

Roderick sat back down as Beryl turned back to query me silently, those blue eyes confusing me, as usual. I shrugged. She wrinkled her nose and her puzzled expression turned into a wry grin.

"Anyway, we start out putting forty-nine in the accumulator." I pointed at the hand written program listing again,

 3E 31    MVI A, 49 ; 00110001

and then used the microcomputer's front panel switches to set the starting address back to zero. "The shining LEDs are ones and dark LEDs are zeroes, and that was binary 0-0 1-1-0 0-0-1 on these lights here after it did the first instruction." I stepped into the first instruction and the lights that showed the accumulator value lit up again with the 00 110 001 pattern.

"You showed me how forty-nine decimal is that long string of ones and zeroes in base two. And for some reason," she pointed at the listing, "you write forty-nine after A, instead of before where it ought to be if it's going to be put in." 

"Intel's backwards assembler grammar," I shrugged apologetically.

Beryl shook her head. "I don't get it, but I'll play along."

"Yeah," Todd complained. "Play along. That's what we all do."

The students gathered around us broke out in laughter, and Mr. Forrest, our teacher, chuckled. 

She tilted her head. "And then you move the number from accumulator A to register B, right?" She put her finger on the next line.

 47    MOV B, A

I hit the step switch on the front panel. "Right. You're getting it."

"No I'm not." She pouted, then giggled.

Trina laughed. "That's the way, Beryl. Keep these guys in their place."

Beryl grinned and raised her elbow towards Trina, and they bumped elbows.

"And you move nineteen into the accumulator so I can see the pretty lights change," she continued.

She pointed at the listing,

 3E 13    MVI A, 19

And I stepped the instruction. "Yeah. Binary 00 011 001." The front panel showed the value in the accumulator output array.

"I guess I see that. Maybe. And you move it to register C to get it out of the way for some reason?" She pointed at the next line.

 4F    MOV C, A

"Pretty much exactly. I thought it would make it easier to watch."

"And then you move the forty-nine in B back to the accumulator for the same reason."

 78    MOV A, B

"Right." 

"And add the two numbers."

 81    ADD C

"Uh, huh."

"And stop so we can think about what the pretty lights say." She pointed to the last instruction.

 76    HLT

"And the result is binary," she read from the front panel, "01 000 100." She took a deep breath. "Which you showed me is sixty-eight."

Chuck showed her the conversion on his HP calculator again.

"Thanks, Chuck."

"Any time you want to look at my calculator, just ask."

"Careful!" Todd warned him. "Mary, I mean, Joe, might have something to say about that."

I gave Todd a look. "Last I checked I don't give orders to anyone in this room." I looked back at Beryl apologetically.

She wrinkled her forehead at me. "Thanks for the offer, anyway, Chuck." She didn't turn to look at him.

Some of the guys in the room started to give wolf whistles, but Mr. Forrest cleared his throat and they stopped.

"But I still don't see the point."

Mr. Forrest stood up. "Well, I think I've arranged for the university to loan us a teletype, and I got a package with the free software Tiny BASIC language interpreter on tape, so we might have something more interesting to look at in a couple of days."

"Thank you, Mr. Forrest. And thanks, everyone, for showing me what Joey gets all excited about."

"Whoa." Jack pulled his head back in mock horror. "Nobody gets to call him Joey."

I rolled my eyes and raised my hands to the sky in mock resignation as the guys in the class broke out in laughter again.

Beryl looked over and gave me a wry smile and a wrinkle of the nose. "Now are you going to help me with the political science homework?"

"Sure. Let's go."

The show over, the other students started to pack up, amid a buzz of conversation.

"Wait a minute, Joe. I have another announcement." Mr. Forrest stopped me.

We all quieted down.

"I have an opportunity to go to a microcomputer show in San Francisco, April 16th and 17th, and I can take a couple or three students with me. If more than three want to go, we'll have to figure out a way to choose who goes. Maybe a programming or electronics problem to solve. We can talk about that tomorrow, but anyone who's interested, please check with your parents tonight."

"Whoa, yeah."

"Alright!"

"Cool!"

"I'm in!"

Amid other excited responses there were a few less enthusiastic responses such as

"Count me out," 

as well.

Beryl looked at me with a question in her eyes as she picked up her books.

"Shoot yeah, I'm interested." I switched the power off on the microcomputer and picked up my sample program listing, slipping it back into my notebook, before picking up my own books. Then I stopped. "Oh. Wait."

She looked down quickly as she stood up. "Well, let's go study poli-sci," she said, disappointment tinging her voice.

I followed her out of the electronics lab into the hall. "That's when the cheering squad's year-end competition is, isn't it?"

"Never mind." She didn't turn back to look at me. "You need to go where you need to go."

She never let me bring the subject back up again.


Chapters:

  1. Calculations and Revelations
    To be written (tentative list):
  2. TV or Not TV (Typewriter)
  3. Faire Enough
  4. BASICally Proceed Forth
  5. Surveying the Field
  6. Sacrifice and Service
  7. Picking up Threads
  8. Rotating Media and Braun's Tube
  9. Unique OSses
  10. Splitting Their Stacks 
  11. Ken Thompson's Trusting Trust vs. Bootstrapping Your Own
  12. FM and Other Oriental Interests
  13. I Been Moved to PCs -- Microware, not MicroSoft
  14. A Piece of the Orient in Texas
  15. 2809 and 68010
  16. 68451 -- and Motorola Eats Their Own Dogfood
  17. Simulating Circuits and Automatic Layout
  18. Bounding Stacks and Other Segments
  19. 68RISC 
  20. Segments and Bounds -- 3XX09
  21. ... 
  22. Chikako on Her Mission, Marion in post-grad
  23. ...
  24. No Phishing
  25. ...
  26. Social Engineering
  27. Straits


Calculations and Revelations


Backed up here: https://joel-rees-economics.blogspot.com/2022/01/bk-the-other-os-9-alternate-reality.html.

3809/2801: Register Sets for 8080, 6800, and 6502

2801 Register Sets for 8080, 6800, and 6502 CPU, RAM, I/O TOC (I...