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 ten-to-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 might be able to make dittos." 

Spirit copying was definitely less expensive back then. 

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

Cyndy and I ignored the glances.

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 he 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 and 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 was still lost. 

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

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 9900 registers 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, each 9900 instruction is going to do more than several single instructions combined on the others, so there is some gain in speed 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. 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. "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. Hang on a minute." Mr. Mori turned off the projector and turned his attention to the data sheets I had been looking at during break, muttering to himself a little.

"So, Hector," Cyndy spoke quietly. "Can we talk?"

"I'd like to."

"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. I barely heard her.

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 barely perceptible nod, and I turned my full attention to the whiteboard.

TOC
Next


No comments:

Post a Comment

3809/2801: Register Sets for 1802 and 9900

2801 Register Sets for 1802 and 9900 Register Sets for 8080, 6800, 6502 TOC ...