Tuesday, October 28, 2025

3809/2801: Drafts

2801
Drafted

Basic Addressing Modes for All
TOC

(You may find this chapter less dry than the previous few chapters. You may also find it a bit contrived -- and technical in a different sense. It's necessary for the plot.

I should point out that both Sapphire and Joe diverge even more significantly from the real world from this point.) 

When I entered the typing lab, Sapphire was sitting in the front row. The desk beside her had a book on it, and there was a pile of books on the next desk over. All the other desks nearby were occupied already. 

She looked up and waved her fingers, and said, "Hi, Joey."

I raised my hand in greeting and replied, "Hi, Sapphire," and turned my feet to the back.

But she was waving me over, pointing to the desk next to her, which was right in front of the teacher's desk where Ms. Wilson was working on something.

So I headed to the front row, after all. 

"But isn't Cyndy sitting here?" I asked.

"Those are her books," she said, indicating the pile of books on the next desk over, and I recognized Cyndy's notebook on the top. "She'll be back by the bell."

"Oh, well, thanks for saving me a place." I put my books down, feeling a little like the proverbial cat in the room full of rocking chairs, and picked up the book she had left on the desk to save my place.

The book cover looked a little old, but still clean. It was about as thick as two issues of Popular Science, but hardcover. Something about the book felt familiar. Curious, I opened it. 

And raised my eyebrows in surprise. "Your annual from our ninth grade year at Hood." I closed it, perhaps too quickly, and started to hand it to her.

"Do you remember what you wrote when you signed it?" 

"Yeah. I ... remember ..." I was stuck for words.

"Well, Mr. Reeves," Ms. Wilson interrupted. "Cyndy said you had something to use for typing practice today."

"Uh," I looked around. "Hi, Ms. Wilson." 

I looked back questioningly to Sapphire. She pulled her mouth to one side. "Hang onto that thought," she said. "And let's see your letter of inquiry."

"You know about that, too?"

"Cyndy had to drop her books off here, you know."

I set the annual down and dug it out of my notebook. "It's just a draft."

"Drafts often need to be typed up, too. Let's look at it," Ms. Wilson said.

I handed it to her and she started reading it.

Sapphire stood up and walked around Ms. Wilson's desk to read it over her shoulder. 

Ms. Wilson nodded. "Mmm. Uh, huh. Good. Mr. Mori knows what he's doing." She put the letter on her desk and get out her red pen. "But let's think about this. And this." She marked several points in red and wrote some comments. "These are other ways to word things. You can choose."

She handed it back to me. "It is a little advanced for your typing practice, but you can take time during the second half of class today to hunt and peck if you want."

"Thanks." 

"Cyndy and Sapphire seem to want to use it for practice, too," she added. "Do you think you'd mind? They'll see your phone number and address, of course."

"No problem. Cyndy's a friend of Hec's and she's already seen it anyway, and ..." Again, I was stuck for words.

"And it's not like it's something I don't know already," Sapphire smirked.

I swallowed.

Ms. Wilson smiled. "And if you wouldn't mind, I'd like to save it and maybe use it in a few weeks for the whole class," she suggested. "It'll be more interesting than the textbook examples. We'll leave a blank for name and address on the spirit master, of course."

I blinked at her. 

"You two could run down to the library and make me a copy."

"Sure. No problem. But," I looked at the clock.

"Hall passes," She grinned and pulled a couple of green cards from a drawer and held them out to me.

Sapphire picked up her annual. 

I said, "Thanks, Ms. Wilson," and grabbed the hall passes and the draft, and Sapphire and I headed for the door together.

"Don't dawdle, and if Cyndy is still in the library tell her to get back to class," Ms. Wilson called after us.

I turned and gave her a thumbs-up as we went through the door. 

"So," Sapphire said as we walked down the hall. "Look at what you wrote," She handed me the annual. "-- and let me see your draft."

I handed her the draft, but I hesitated at opening the annual. 

"I remember what I wrote." 

"Do you?" 

"I was a teenager."

"We are both still teenagers. I like this draft, by the way. Your writing has improved."

"Thanks. I had no idea what I was saying -- when I signed your annual, I mean."

"You had enough of an idea that you went to the trouble to write it in your code."

When I was in seventh grade, one of my older brother's buddies at church had been called to a mission in Japan. I had read his letters to the congregation and noticed the return address written in Kanji, and that had spurred an interest in ciphers, crypts, and scripts. i had turned that interest into a simple substitution cipher using non-alphabetic symbols I made up -- probably inspired by something I read somewhere. And, somehow, I had had the social creativity to give her a copy of the key.

"And you took the time to decipher it."

She poked me with her elbow. "Yes. Didn't you want me to?" 

"I wasn't sure I expected you not to have thrown the key table away." 

"Okay," and she sighed before continuing. "I understand that. I had trouble letting you know I was interested in you. Too. So, do you have any better idea about what you meant, now?"

"I think I understand a little better. My sister and I were talking once, and she explained about crushes."

"Did she now." Not a question. 

We turned a corner. 

"How it's okay to have crushes and it isn't the same thing as what people get married for."

"Which of your sisters was it? I think I'm going to have to have a talk with her." 

"Uhm, ..." 

We stopped outside the library door and she fixed me with her gaze.

"Joey, it's a simple four-letter word. It starts with "L". It's not profane."

I blinked. 

She sighed and tilted her head and gave me a wistful look. "Just please look at the page where you signed my annual."

I couldn't deny her that. 

I opened the back cover. The book cover covered the edge where I had signed it a bit over two years back. I lifted the book cover away.

Beneath the mandatory, almost meaningful message about the past and the future, I'd confessed my ninth-grade feelings for her in that script cipher:

 

Under my confession, there was a line in her handwriting: "When will you tell me this in person?"

"Just so you know," she said, "I did not write that yesterday. I wrote that a couple of nights after the signature party, after I decoded it."

The ink didn't look new, at any rate. 

"We need to see if Cyndy's still here," I said.

"You're stalling."

I swallowed and looked at the floor. "Yeah, I guess I still have that huge crush."

"Crush." She sighed. "You guess."

"I get crushes easy."

"I remember. You could be a little scary that way. That's probably part of why I couldn't quite open up." 

"But, for what it's worth, I've been nursing this one at least since you encouraged me to do my algebra homework in 8th grade."

We turned and entered the library in silence.

"It's enough, I guess," she said quietly. "Two years I've waited." 

She grabbed my hand and dragged me into the stacks.

"Cyndy," she whispered.

Hec's head poked around a stack, followed by Cyndy's.

I chuckled at their expressions. 

Sapphire whispered, "You both look like a couple of cats that have gotten into the catnip. It's time to get to class."

Hec tried to suppress the overly happy look on his face and give me a puzzled look. Tried to.

"We gotta make a copy of my draft for Ms. Wilson," I explained in a whisper.

He grinned. "How Sapphire worked that, you're going to have to tell me some time."

"Maybe, if she and Cyndy tell me. You guys don't have hall passes."

"True. We'd better go." They hurried out of the stacks, holding hands.

"See you guys. Don't take too long," they chorused in normal voices, breaking the stillness of the library. 

The librarian peered around the end of the stack after they were gone. 

I held up the hall passes. "Came to make copies." 

"Right," she said. "I'll go warm up the copier," and disappeared. "Don't be long!" There was amusement in her voice.

Sapphire grabbed my hands, and looked me in the eyes. "And I still have my huge crush on you."

"Even though I'm scary."

"Since the seventh grade. You backed off when you could tell we were feeling creeped out. A lot of guys don't know how to back off." 

I could only nod. 

"I didn't know how to get your attention. You know how guys just seem to like me, and how I had a hard time saying no to the wrong guys at Hood. Anyway, you helped me start saying no. I know I can be trouble, but we need to talk. I need to talk. Two years worth of talk, at least."  

"Five years worth."

She nodded.  

"I'm sorry I didn't follow up. I tried to, but cheerleaders are scary, and I kept hanging up the phone before it could ring on your end because I didn't have any idea what I'd say."

"Cheerleaders are scary." She smirked, then turned serious. "We're often scared to death. You hung up?" She giggled. "I remember getting a few prank calls ..."

"Maybe I wasn't fast enough every time."

"Or, maybe, too fast?" 

I looked down, embarrassed.

She giggled again. "Oh, I know, you were shy."

"Still am." 

"Me, too. I guess we just hide our shyness differently."

We stood, holding hands, gazing into each others' eyes like the teenagers we were. 

She asked, "Can we study together tonight and maybe talk a little? Or a lot?"

"We could do that. Oh, wait, It's family home evening tonight."

She looked puzzled. "What's that?"

"Weekly family time. It's nothing spectacular, but you'd be welcome." 

She grinned. "I'd like that. Let's make this copy and get back to class."

Making three copies of the draft letter didn't take long. We held hands on the way back. Didn't talk much, didn't walk too fast. I was overloaded, couldn't think of anything to say. But I wasn't complaining. And neither was she.

Just outside the door, she held me back and said, "By the way, there's something Cyndy and I would like some help with. I think Hec's going to help. It's entirely up to you, though."

"I can't agree or disagree if I don't know what it is."

She looked in the door. "Uh, oh, Ms. Wilson's starting timed practices."

We hurried in. 

After twenty minutes of timed practices, Ms. Wilson let us do free practice. Cyndy and Sapphire and I worked quickly through Cyndy's notes and Hec's draft letter to RCA, and Cyndy created her own draft to Intel.

Cyndy commented, casually, "Hec says he can do the cheer dance club after school." 

Sapphire replied, "That's great." She looked up from Cyndy's draft. "Isn't it."

I raised my eyebrows and looked back down at the draft. "Sure. Sounds fun."

"Good." 

Ms. Wilson gave us some pointers, and Cyndy started typing her draft. I started in, trying to touch-type instead of one-fingering. 

And Sapphire typed a copy of my draft. 

"Are you really okay with helping us with the cheer dance club?" she asked quietly.

"You never found out how much I like to dance."

"Oh. Nice." 

 "But I get kind of wild."

 She snickered. "Now I'm trying to imagine that."

"And I'm not that good at line dancing."

"That's okay, we can practice." 

"I'm driving today, and there are newspapers waiting to be delivered at my house. How long is your practice?

"We keep it under forty-five minutes. Will Rick mind waiting? Street clothes are okay today."

I nodded. "We'll ask him."

Sapphire borrowed Cyndy's draft to type for more practice while Cyndy typed a copy of Hec's, and I continued typing on mine.

We were done a little before the bell.

Cyndy said, "We don't want to put too much pressure on Rick to join." 

"Oh, yeah, he claims he doesn't dance," I replied. "But let's ask. If he doesn't want to help, he'll say so." 

At the bell, Cyndy left quickly.

Sapphire waited for me to collect my books and we left together. 

Rick saw us in the hall and waited. 

Sapphire seemed to pick up on his pensive mood. 

"Hi, Rick," she said, cheerfully.

He grinned a little darkly. "Well, hello you two love-birds."

She grinned back, then gripped his upper arm. "Hmm. Yep. I think we should recruit you, too."

"Recruit? Me?" Rick took a step back.

"We are being drafted for cheer dance." I raised my hand to slow down the response I saw coming. "Cyndy and Sapphire kept talking about needing guys all during typing class, in between working on the drafts."

Sapphire turned and wrinkled her nose. "All during class."

I grinned back. "Okay, we did talk about a few other things."

She laughed, and Rick chuckled darkly.

"I'm not going to guess what else you were talking about. Shoot. I should give you my draft to type up. Tomorrow?"

"We can ask Ms. Wilson if we can do it again," Sapphire suggested. 

"So what about your newspapers, Joe?"

"I'll can the paper route sit for an hour."

"Just an hour." Rick's mood shifted somewhat.

"Forty-five minutes," Sapphire said, and turned back to me. "And you are sure that's okay?" 

I shrugged and gave her a lopsided smile. "I can do the route faster when I'm motivated, and they give us until 5:30." 

I turned back to Rick and said, "Are you okay with this? Won't be late for work?"

He thought for a moment, and measured his words. "I've got a little time before work. You're driving today. I guess I have to tag along."

"I can drop in on their practice tomorrow to check it out, and walk home."

"Yeah. No. I'm going to see this. Tomorrow will be tomorrow." 

He raised his fist for a hesitant bump, and I returned it, not putting too much energy in it.

He grumbled, "We can call this an adventure." 

(You thought fist bumps were a recent thing, didn't you? I don't remember knowing who Fred Carter was, but Joe seems to have found time to watch a bit of basketball on the little black and white TV he bought with newspaper money at sixteen.) 

TOC
Next
Where it starts




Monday, October 20, 2025

3809/2801: Basic Addressing Modes for All

2801
Basic Addressing Modes for All

Register Sets for 1802 and 9900
TOC

(Continuing the  dry technical stuff, but it's still important. Don't go away.) 

Mr. Mori continued his explanation, not yet putting anything on the whiteboard. 

"Every CPU needs to address its registers, so register addressing should be considered something every CPU has."

I volunteered, "Is the 1802 X register how it addresses its index register?"

"That's a good way of looking at it." He frowned approvingly and nodded before continuing. 

"Now, the register is often implicit in the instruction. For instance, the 6800 has an instruction to set the carry flag and another to clear it. The carry flag is explicit and inherent to the instruction, but the condition code register is implicit."

Chuck asked, "Is the stack register implicit in call instructions, then?"

Mr. raised both eyebrows approvingly. "You could say that. Yes, you could definitely say that." 

He paused and thought. "But maybe not exactly for the 1802." 

He tilted his head in thought. "Maybe."  

"Anyway, another mode pretty much every CPU has is called the immediate mode in the documentation for all five of the processors we are looking at. It can also be called literal mode, among other things. 

"A constant value in the instruction stream is used as the source of a load or move instruction. In some cases the constant might be in the instruction itself, in others, it will come immediately," he paused and began diagramming on the whiteboard, "after the instruction op-code, like this:"

He paused when he finished the diagram. 

"You know, for the instruction stream, it's natural to draw memory putting the lowest byte at top, but that will feel upside down for data." 

Barry asked, "So which way is it?" 

"Whichever way makes most sense."

"Oh. And how do we know which we makes sense?"

Mr. Mori didn't elucidate. Instead, he continued, "Where that immediate constant is used and what is done with it is determined by the instruction."

Hec volunteered, "Is the PC implicit in immediate mode instructions?" 

"Yeah." Mr. Mori shook his head in amusement. "I don't think I pay you guys enough to do my job for me."

He grinned as we all laughed.

"Note that immediate constants can also be two bytes in some cases." 

He drew this to the side: 

Bob asked, "Is byte 1 the low byte or the high byte?"

"Yes." Mr. Mori waited. 

But we didn't laugh.

He shrugged in mock disappointment, but continued. "It depends on whether the processor is less significant byte first, or little-endian, or more significant byte first, big-endian. In the 8080 and 6502, byte 1 will be the low byte, but in the 6800, byte 1 will be the high byte." 

Scott asked, "Isn't least significant first the canonical form?"

"I have read partially valid arguments for making either byte order canonical, but the best argument is just that everybody should do the same thing -- and that is usually actually a good argument to not do the same thing." 

Scott scratched his head.

Mr. Mori thought a moment, then added, "For what it's worth, IBM usually designs their processors most significant first. I suppose we should discuss the advantages and disadvantages and historical reasons at some point, along with other philosophical questions like Barry's. Can you wait for that?"

(Irony in history, but IBM did not design the CPU for the 5150, did they?) 

"Yeah, I guess."

"Thanks." Mr. Mori turned back to the board and erased and rewrote parts of the second diagram, then added to it: 

"Absolute mode is where the address of the operand in memory, not the operand itself, is part of the instruction stream. The CPU loads the address out of the instruction stream into a temporary register, then loads the operand from that address. In this case, I'm showing the data operand as a 2-byte operand, but the data could be one byte or three, or any length, really, depending on the instruction, and on the instructions that follow.

"This mode is also called extended mode, or external address mode, among other things."

Barry asked, "So it's kind of like immediate mode, but the immediate value is the address where the actual operand is?"

"That's one way of looking at it."

"How does the CPU know the difference?"

"Basically, by the instruction op-code. For example, if it's an ADD instruction, there will be different op-codes for ADD immediate mode and ADD absolute mode. The immediate mode op-code grabs the number in the instruction stream as the operand. The absolute mode op-code first grabs the address from the instruction stream, then grabs the actual operand from memory at the address it just grabbed. Either way, once it has the operand, it can ADD it."

He let us digest this, then he added, "There are some CPUs  that do things differently. For instance, in some, the operand itself says it's an address. But I don't want to talk about them, at least, not now. Likely to just confuse everyone. I don't know of any microprocessors that do that, anyway." 

(No microprocessors that did that yet, anyway.) 

Cyndy asked, "So little-endian processors will have the low byte first for addresses, too, not just data?"

"Yep."

She asked another question, "Is there a single-byte form of absolute address?"

Mr. Mori grinned. "Thank you for bringing that up. The 6502's zero page mode and the 6800's direct page mode are just that, short absolute addresses in the first 256 bytes of memory." He wrinkled his forehead. "I don't need to draw that one for you all, do I? It's just a single byte following the op-code, and you the address unit concatenates zeros on top of that?"

Nobody asked him to.  

But Cyndy had one more question -- "Can you put addresses in registers?"

Mr. Mori mugged astonishment. "Cyndy, I'm beginning to feel threatened! That was just where I wanted to go next." Then he grinned. "Guys, is it time for talking about addresses in registers?"

Cyndy looked pleased with herself, and no one said no.

"You can, indeed, put addresses in registers. In fact, when any of these CPUs gets an absolute address and uses it, it stores it temporarily in a register or buffer that programmers can't access directly and puts it on the address bus from there. But we can also keep addresses in registers that we do have access to.

"Using a register like this is a mode that is often called register indirect mode. The instruction specifies a register, and the register contains the address. It feels a little superfluous to draw this, but we'll want to refer to the concepts in a moment:" 

Mr. Mori paused again. "Oh. This time it's data I'm diagramming with the high addresses on top." He picked up the eraser, hesitated, then put it back down. "Nah, Well go with this. There's a reason. Bear with me."

Bill chuckled. "I don't think any of us really knows enough to complain." 

Mr. Mori grinned again and continued.

"The 8080 has limitations, as I've mentioned, about which register pairs can be used with which instructions. But the 1802 and 9900 allow any register to be used to point to memory. The 6800 and 6502 are a bit special, but, again, as I've mentioned, they use their index registers to do this.

"But before I talk about register indirection on the 6800 and the 6502, I want to talk some about indexed mode addressing. I'm going to erase and rewrite parts of this diagram. You probably want to draw a second diagram instead in your notes."

Cyndy had already started making her second diagram as Mr. Mori altered the one on the board. 

"We start with a register pointing to something in memory, in this case we'll make it a name with a length byte. I'm showing the ASCII character codes in decimal here. 

"The base register points to the length of the name. But say we want to take a look at each letter in the name. We can add one to the pointer and look at the 'M', then add one again and look at the 'o', then add one again and look at the 'r'." He indicated each location in memory as he spoke. "But if we now want to look at the length again, we have to back up." He pointed back. "We have to subtract three, if we remember that's how far we've bumped."  

"Or we can keep the original, copy it to another register, and bump that register up and down to look at the letters one at a time. That way we don't forget where the name is. And that's the two registers I'm showing in this diagram.

"Adding and subtracting one are so common that, in most CPUs, they have their own op-codes, mnemonically named INC and DEC or something similar, for INCrement and DECrement." 

"Now, what if we want to jump directly to the score that comes after the name? Does everyone see how to do that?"

I waited for somebody else to say it, but no one did, so I said it. "Make another copy of the base address, load the length in from memory where it's pointing, and add the length to the copy?"

Mr. Mori nodded. "That's one way. Good catch about getting the length from the string itself. A common beginner's mistake would be to just load it as the immediate value 4. That would work with my name, but not yours. 

"By the way, this technique of adding an offset to a base address in registers requires multiple instructions on all of our microprocessors." 

(This would change, of course, with the 68000 and 6809, but that's down the road a ways.)

"This practice of pointing at parts of objects in memory at offsets from the base of the object is called indexing, essentially from the concept of indexing into an array or table. Or from matrix algebra. 

"While we can do it in steps like we've been talking about, the 9900 provides a short-cut indexed addressing mode for arrays when their location is a constant known beforehand, where the instruction stream provides a constant absolute base address and a register provides an offset. This mode doesn't help if you have both the base and offset in registers." 

He took some time to draw the following: 

"Base address literal in the instruction stream points to the base of the name, and the register gives the offset to the letter." 

Karl complained, "I'm not seeing why that has any advantage over just putting the address in the register and adding."

Mr. Mori pursed his lips and nodded before replying. "You do have a point. But you can do this addressing in a single instruction. And sometimes, you're short of registers. And sometimes, you're more interested in keeping the offset as a variable than in having the addresses themselves. 

"Now, in fact, this only works when the base address is known in advance, so you do have a point or two."

"But I don't know what point I have," Karl laughed, and most of us laughed, too. 

"More things we need to talk about later," Mr. Mori answered.

"One useful case we can talk about might be when making an identical copy of something. The 9900 also has auto-increment and auto-decrement modes which can be used, but maybe you can see that the same offset in the register can be used with with the base offset of each array. I will need to show you some concrete copying examples, later."

"But for now," he erased and rewrote parts the diagram, "I want to point out that the 9900 indexed mode is just adding numbers, so we can also do indexing like this:" 

"Using the indexed mode this way, the register points to the object in memory, and the instruction stream contains a constant offset. We can see that this can be useful if we know in advance that a constant offset directly accesses the test score for records of a certain type -- which would not really be the case above. But diagramming a case that would apply would require more explanation than I want to dig into now.

"Can I skip that for the moment?"

Silence.

"Nobody says no, so we'll come back to it. As I say, this mode can help make the 9900 a bit faster than it otherwise would be, because what would take several instructions on, say, the 8080 or the 1802, can be done in one on the 9900. 

"Now the 6800 has a similar mode using the X index register, but the constant in the instruction stream is limited to a single byte. This works well in the mode I just showed you, where X points to the object and the instruction specifies a small constant offset.

"But if you want the constant part in the instruction stream to address the base of an array, and the X register to contain the offset, on the 6800 the array has to start in the direct page."

I raised my hand. "Hang on. So the constant offset is a byte. I think I can see that. But you can use that byte as a short address in the first 256 bytes of memory, and then use the X register to hold the offset."

"Correct."

(Again, if constant base + variable index mode is interesting, but the 6809 and 68000 are overkill, check out the addressing modes of the 6805, which, as I say, would not be introduced for another couple of years.) 

"Okay, I think I'm following this."

Cyndy looked at me. "I'm glad you are."

Chuckling again. 

"We'll go over this more carefully later. Does anyone else want to stop to think out loud or ask questions?"

We didn't. 

"By the way, for the 6800, register indirect is provided by using a zero offset in the indexed mode. This feels wasteful, but it allows the 6800 to provide indexed mode addressing in addition to register indirect for all general operators, which the 8080 and 1802 do not. There are lots of trade-offs in CPU design.  

"And again providing this mode actually does help make up for the dearth of registers."

He paused, took a breath, and looked around at us.

"Uhm, the 6502 does things sort of similar to the 6800, but different, and it gets really confusing. I'm afraid I'm losing too many of you, so let's take a breather."

We all leaned back and some of us stretched.

I raised my hand. "Rick and I are going to write and ask for documentation, like you suggested, and, I think, about whether they can make prototyping kits available to students."

Rick interjected, "I'm actually more interested in that computer kit from Southwest Technical."

"You've got that kind of money?" Hec asked.

"I was about to say," began Mr. Mori.

Rick responded, "Maybe, from the part-time job I'm working. Or maybe I can talk Joe into pooling money with me. Anyway, I want to ask about it." 

(I know. I'm stretching belief here. But it's necessary for the story.)

"Okay," Mr. Mori turned the projector back on and got out some blank transparencies. "Let's talk a little bit about how to word technical inquiries, and what information to include. That's actually an important technical skill." 

Mr. Mori prompted us through the basics of writing letters of inquiry about engineering documentation and equipment, letting us do as much of the writing as we would. As a class we came up with lots of good ideas. 

In the process, several of us put together draft inquiries. 

Mr. Mori also gave us his contact information at the school to include in the letters.

Cyndy took lots of useful notes about inquiry letters, and Mr. Mori came over to check them.

"Can I commandeer these notes and type them up for the ditto machine for the whole class?" 

"I want to use my notes for typing practice," she replied.

"But can I get a photocopy?" 

Cyndy twirled a curl, and said, "Sure. I'll bring them by after school."

And the bell rang. 

"By the way, since you're students, hand-written letters of inquiry for documentation will be okay, if your writing is legible. We'll pick up the addressing overview again tomorrow. I think you guys need some time to let what we've covered sit and simmer a bit, anyway." 

(Did I mention that, if Mr. Mori had both the knowledge and wisdom he is demonstrating here, he would have been head-hunted away from the high school into engineering management by any one of a dozen companies at this time?) 

Cyndy gathered her books, glanced quickly at Rick and me, and left. 

Hec looked at Rick and me, too. "Uhm, I've got to go, guys, okay if we check notes later?"

Rick and I nodded, and Hec left, after which we finished touching up our notes.

"Looks like your letter is pretty complete," Rick commented as we left.

"I might be able to use it for typing practice today, if you don't mind waiting."

"I can do that. If I don't see you after the bell, I'll come to the typing lab."

"Sounds good." 

He turned in to his class and I headed to the typing lab. 

TOC
Drafts
Where it starts


Sunday, October 12, 2025

3809/2801: Register Sets for 1802 and 9900

2801
Register Sets for
1802 and 9900

Register Sets for 8080, 6800, 6502
TOC

(More dry technical stuff, but please stay with me. I promise, it's important.) 

Mr. Mori waited a moment for the student talk to die down after the bell. "Some of you guys," he began, "were looking at the materials up here. That's what they're here for. But these are from my personal library, and I'd appreciate you not destroying them. They're not that expensive, but they are a little hard to replace. I am trying to get our school library to order some of the magazines, but no luck yet.

"And the spec sheets and data sheets aren't really that hard to replace, but requesting them takes time. If you want a copy, let me know and you can run down to the library and make photocopies. Or I can show you how to write and request materials from the manufacturers."

Back then, the 3 cents a page that copies cost at the library was about half, maybe a third of the price of a candy bar. You could buy lunch for the cost of copying a complete twenty-page datasheet. So it really would not have been cheap to make copies of all the datasheets for everyone.

"Or, if some of you get ambitious and work up some good notes and type them up, we can make dittos." 

Spirit copying was definitely less expensive than photocopying back then. 

There were some doubtful chuckles, and glances towards our table.

Cyndy ignored the glances, and I did, too.

Mr. Mori turned on the overhead and placed a transparency on it. 

"The COSMAC Data Processor CDP1802 has an interesting architecture. I've been reading the documentation a bit at a time, and it kind of bends my mind. I'll show you what I understand, but don't sue me if I get something wrong"

More chuckling. 

"The 1802 has an 8-bit data register D, which is more or less like the accumulators of the 8080 and 6800. The D register is where you do your math, and it has a carry and borrow flag, called 'DF'. 

"It has 16 general purpose 16-bit registers, which is a nice amount. But accessing the registers feels a little weird to me, a bit like they were making registers that behave like the 6502's page zero, but don't show up in the external address space. Kinda weird.

"What I mean by weird is that the 4-bit P register over here points to whichever register you want to be your current program counter. It's actually a kind of a nifty idea for handling interrupts and context switches, which we will talk about later. But it is unusual."

I don't think any of us understood enough yet to understand why we would think it was weird. 

"And the X register there below the P register in the diagram points to whichever is your current index register. So you can switch between X pointing to your stack pointer and pointing to a register pointing to data in memory fairly easily. But you have to remember to switch."

A few of us might have picked up some weirdness in that. 

"T, between them on the diagram, holds the old X:P pair after a subroutine call or an interrupt, and then your program code can save it from there. This is part of what makes this work, by the way." 

I know I didn't understand as much as I thought I understood about that. Nobody else volunteered to admit understanding it.

"I and N are used for decoding instructions, and are not directly accessible. I is the nominal instruction selector, and N is the nominal register selector for the instruction, and is part of the instruction when the only register is pointed to by X or P. Or something."

He paused for thought. 

"I don't really know if I understand enough more about it to explain further without giving instruction examples, and I want to save the instruction examples for later."

And he paused again, before continuing. "So I think I should let you guys ask a few questions, instead of randomly continuing to tell you more about what I'm not sure of."

"That looks like a lot of weird stuff. Why would they do all that?" Karl asked, with a tone that could have been sarcastic or petulant, maybe both.

"RCA apparently didn't intend to get into producing microprocessors. One of their engineers, Joseph Weisbecker, decided to build a computer out of transistor-transistor logic at home as a hobby project. He designed it as something he could build within his capabilities and resources. I understand he started with transistors, not integrated circuits. That's why the 1802 operates at a lower level than the three we've already talked about.

"His daughter thought it was a fun thing to program, and then he showed it to his managers, and some of them recognized there was a product in it, and others did not -- standard management not knowing what's going on. If they had taken it seriously, it's quite possible that RCA would have had a working 1802 microprocessor before Intel had a working 8080, and maybe even the two-chip 1801 before Intel's multi-chip 8008."

Barry asked, "Is it slow?" 

"I understand it's not as fast as the 8080 or 6800, but it shouldn't be that much slower -- maybe about a fifth their speed, maybe even as fast as a half their speed, depending on what your code is doing and how well you can program for each architecture. But the design works well in low-power CMOS manufacturing processes. They can make the processor very power efficient, and that is a big selling point. Apparently you can run an actual small 1802-based computer for a decent amount of time on a 9 volt radio battery if you use RCA's CMOS RAM." 

"Pocket calculator!" Hec, enthused, and I took note, too. 

My pocket calculator had just recently died.

Bill asked, "How about the size of the object code?" 

"I think object code size should be comparable to the 8080 and 6800, maybe better, depending on the programmer and the kind of problem being solved. But I'm not sure."

Cyndy asked, "Can you show us some of this code?"

"I'm not confident of the examples I have, and I'd like to show you the registers for the 9900 first."

He waited for a moment, but no one else spoke. 

"Are we okay on the 1802 registers? Should we move on?"

Everyone seemed to be okay with moving on.

"Okay, let's warp our minds some more and look at the Texas Instrument's TMS9900 register model."

He swapped transparencies.  

Again, there were random expressions of surprise. More than a few of the guys said, "No way!" or some equivalent.

Mr. Mori grinned. "Okay, let's try this." 

And he swapped for another transparency:

After a moment, Hec said, "So all the working registers are in memory."

"Hec's got it." 

"Is R0 the accumulator?"

"Pretty much any register can receive the result of operators."

"Any register can be used as an accumulator?"

"As I understand it, pretty much." 

"So it writes each result out to external RAM?", Bob asked for conformation.

"Yeah, that would be right." 

"That means it's going to be slow?"

"Maybe," Mr. Mori gave him a sideways grin. "TI apparently didn't want to use enough transistors to make a write-through cache for the registers, and there is still the question of how fast a CPU can be compared to RAM. 

"But it's a more recent, higher-level design. Overall, many TMS9900 instructions are going to do more than any single instructions on the others, so there is some performance gain from that. I do have the impression it is going to be a little slower than the 8080 or 6800 with similar memory clock speeds, but not much. Any more questions?" 

Karl asked, "How much of this all is going to be on the exams?"

There were groans and someone said, "Don't give him ideas!"

Mr. Mori smiled wryly and raised his eyebrows. "We'll see. If the class goes well, we may not need to put any of it on a test. If we find out you guys aren't really understanding any of this, I may need to review it all and give you a quiz."

There were grunts and general comments indicating more that we didn't want a quiz than that we understood. 

Cyndy laughed quietly at all the complaints. 

"So, no more questions about the 9900?" Mr. Mori checked again.

I said, "If I understood what you mean by high-level and low-level, I might have questions."

"High-level means easier to understand and use."

"Well, yeah, but I'm going to need something concrete." 

Mr. Mori nodded his head. "Anybody else? Or about the register sets of any of the other four?" 

Rick agreed with me. "I think we need to look at something more practical."

Mr. Mori grinned. "Okay, then I guess we should move on to addressing modes, already. Hang on a minute." Mr. Mori turned off the projector and turned his attention to the data sheets we had been looking at during break, muttering to himself a little.

"So, Hector," Cyndy spoke so quietly I could barely hear. "Can we talk?" 

"I'd like to."

I ignored them. 

"Okay, I think I know how I want to approach addressing," Mr. Mori announced, picking up a marker in one hand and approaching the whiteboard with several datasheets in the other. 

"After class?" Cyndy asked, even less audibly.

Mr. Mori continued, "The first addressing mode I want to talk about is register mode."

Hec said something too low for me to hear and gave her a nod that would have been barely perceptible even if I hadn't been watching out of the corner of my eye. 

I turned my full attention to the whiteboard.

TOC
Basic Addressing Modes for All
Where it starts


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

"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 a floating point number, 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. He also had the magnetic card reader unit, and 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 general purpose computer would. The other CPUs we will look at today, also, either have been or could be used in calculators, by the way." 

Cyndy commented, "So the total number of bits in all the 8080's data registers isn't enough to do floating point math 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 really help." 

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

"Good point. Well, maybe in the future, microcomputers will have dedicated floating point processors, but not now. And 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." 

Scott mumbled something about byte order, but didn't interrupt. 

"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 register sets of the other CPUs we're going to look at 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 didn't offer, 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." Mr. Mori grinned. "Maybe I can let you guys teach the class."

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

(At the time, Motorola was working on MACSS, the project which gave us the 68000 -- and the 6809 as a byproduct. But neither the project nor the new processors had been announced. There were rumors that something was coming, but no details. 

The 6801, which would fix several small issues like this with the 6800 -- including the above lack of accumulator pairing -- but retain compatibility, would come out of the work on the 6809, and would end up released before the 6809. But it was not even in planning stages yet.

And if you are interested in such things and haven't looked at the 6805, which would follow immediately after the 6801, 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."  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."

"And we need to talk about saving registers before you use them, 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 gets 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 more 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 CDP1802 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 now 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 even Rick to hear. But he 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 to our interchange that I couldn't read. 

Rick said out loud, to no one in particular. "Joking about styles 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.

(Looking at the 6800 first was at random? Maybe not. I tended to support underdogs, like most of us do when we are young.) 

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

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 few 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 the five companies, 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
Register Sets for 1802 and 9900
Where it starts


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'm sorry, guys. Last week I told you all I wanted to let you choose as a class which microcomputer we build, 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 -- except for, well, RCA and a couple of less-known companies. 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 then 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 practically 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 computer." 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 explained.

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

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

"And he has taught you a lot of electronics already. 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.

"I like to dance, too," I explained. 

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 both me and Hec 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 pretty much 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."

Pretty much everyone was with him at this point. 

"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. 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, what you're saying is computers don't really think?" Cyndy asked.

"That's definitely part of what I'm saying."

"My dad says so, too." 

"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 was expensive and 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. Yeah. Cathode ray tube." Cyndy blinked and wrote in her notebook. "Like a 'scope or a TV."

"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. "You spell your name with a "y"?

"And?"

"Didn't know that." 

TOC
Register Sets for 8080, 6800, and 6502
Where it starts


Thursday, September 4, 2025

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

Sapphire

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 any time soon, so I decided I shouldn't wait. 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."

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

"Hello Cindy. Nice to meet you."

Cyndy smiled. "Nice to meet," she paused, her smile turned sly, and she put just a little too much emphasis on "you, 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. We only have analogue electronics at OHS." I followed them toward the door. "And 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 me through the door. 

"We're heading this way." Sapphire 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." 

"Lunchtime?"

"From morning at Odessa High to afternoon here." 

"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 out how all that works in solid state circuitry 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 he turned us 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 all 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.

Joe managed to avoid wasting the summer between elementary and 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, by his senior year in high school. (Well, I did read 1984 during my junior year, for the English class term paper. But not Animal Farm.) He's way ahead of me.

Sapphire -- I have to admit, although I sort of carried a torch, or at least a huge crush, 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, Phi, I apologize.

Rick? Yeah, Stant, I apologize. Rick here is not you. I've done a mix, match, and fabricate for the story, like I did with Phi and Joe. I hope you don't mind too much.

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 everybody's characters, as well. 

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

This belongs squarely in the class of alternate history fiction. 

(Note -- this attempt at a story is reworking material I produced for the Second Microcomputer Revolution  that is currently stuck in my bad habit of trying to tell too many stories at once -- which habit, along with my aging mind, is threatening this story, as well.)

* * * * *

 

3809

A Tale of MCUs and Time, Part 1

2801

Marion Joseph Reeves

Copyright 2025 Joel Matthew Rees 

Table of Contents 

 





3809/2801: Drafts

2801 Drafted Basic Addressing Modes for All TOC (You may find this ...