\documentclass[a4paper]{article}
\begin{document}
\begin{center}
A\&R, C\&T, ACT, NUT, Saturn and R2D2\\
\end{center}

It is difficult to know where to begin this talk. Ideally, I'd like to 
start by covering both the history of HP handheld calculators and the 
technical design of some of the older HP desktop calculators. Since each 
of those would be an hour's talk -- at least, I think I am going to have 
to assume some prior knowledge.

In particular, I hope you're all familiar with RPN (either from using an
HP calculator, or from a programming language like forth or Postscript). 
And that you are aware of the reputation of older HP products -- that 
they're built extremely well and in many cases over-engineered.

Is there anybody who is going to have problems with me assuming that {\bf 
\{ If so, panic now!! \} }

The rest of this talk will cover the main families of HP handheld
calculators up until the early 1980s from a mostly hardware point of view.
What the chips are, how the processors work, and so on. Much of this
information had to be deduced by dismantling and investigating the
internals of such calculators, and for that reason I have to omit 2 of the
main families -- namely the small handheld printing machines (HP10 and
HP19C) because I don't own one and people that do won't let me take a
soldering iron to one, and also the HP01 watch, since people that own one
of those won't let me dismantle it, period (even though I have the right
tools to do so). 

I also intend to only cover the `scientific' machines. The `financial' 
models in many cases incorporate similar circuitry, though. I also want 
to prevent this talk turning into just one schematic after another, which 
it is quite likely to do if I am not careful. So if you feel that's 
happening, please warn me.

Now let's start at the beginning with the HP35

\section{HP35}
Those of you who have heard one of my talks on the HP9100 will know that 
in the late 1960s, HP made a totally wonderful machine. A programmable 
scientific calculator that could fit on a desktop and which was just 
about portable (although doubtless the CUCPS members who helped me carry 
one across Cambridge would disagree). HP then started a project to make 
a machine with similar facilities that would fit in a shirt pocket. The 
first product did have the scientific functions, but was not programmable. 
It was intended as a replacement for the slide rule and log tables.

\noindent
{ \bf \{ Wave about a working HP35 \} }

I intend to spend quite a bit of time on the HP35, as many of the later 
machines have very similar features. So if we understand this one, we'll 
be able to understand later ones.

If we take an HP35 apart we find 2 PCBs, both covered in custom chips. 
The larger board clearly carries the display and keyboard, and also 2 
chips. The smaller board is presumably the processor/logic and contains 6 
chips. All are HP custom parts. So what hope is there of figuring it all out?

\noindent
{\bf \{ Put up OHP : HP Journal page \} }

Well, we have one big clue. At least a block diagram was published in HP 
Journal, and then reprinted in the proceedings of the HPCC conference 10 
years ago. And it's a remarkably detailed diagram. Now, how can we relate 
that to the actual hardware.

Well, obviously we can identify the keyboard. And we can trace the 
keyboard switch connections back to the logic PCB. From the diagram we 
know these connections go to the Control and Timing chip (that, by the 
way, is the C\&T from the talk title). And we can deduce the pinout of 
the display using simple LED testing techniques (a posh way of saying 
battery + resistor, OK\ldots) so we can identify the anode and cathode 
driver ICs. Those turn out to be the ICs on the keyboard/display board. 

Of course power lines are easy to identify with a voltmeter or 'scope. 

\noindent
{\bf \{ Put up OHP : HP35 keyboard/display sheet 1 \} }

At this point we're getting towards a pinout of those 2 ICs. From the 
block diagram we know that the single connection from the anode driver to 
the cathode driver must be the `step' line, which causes the cathode 
driver to select the next digit. And the one remaining cathode driver pin 
must be the 'start' signal, here called 'RCD' (Reset Cathode Driver).

We are now left with some unknown pins on the anode driver chip. The 
clock tank circuit pin is easy to find. From the block diagram we know 
that there are 5 signals from the Arithmetic and Registers (A\&R) chip on 
the logic board to the anode driver, so those are easy enough to find. 
And 2 clock outputs from the anode driver to a clock driver chip on the 
logic board. Again, clock signals are easy to find and identify with a 
'scope or logic analyser. 

Perhaps now I should describe what the chips on the keyboard/display PCB 
actually do. The anode driver provides the 2 phase master clock for the 
complete machine. It also decodes display data from the arithmetic and 
register chip (coming in on those 5 lines) and provides the appropriate 
segment outputs to the display. It's interesting to note that the display 
anodes are in fact driven by the back emf from the inductors here -- this 
technique apparently produced a more efficient display. It's also worth 
noting that the display is multiplexed in both directions -- that is to 
say that only one segment of one digit is turned on at a time. Later on, 
in a totally different machine we'll see this again.

Having figured out the keyboard/display, let's look at the logic board. 
At this point I should digress a little and describe the processor 
architecture. It's a bit-serial machine with a single-bit ALU, but with 
56 bit internal registers. 56 bits is 14 nybbles or BCD digits. That's 
enough to store a 10 digit mantissa, 2 digit exponent and signs for both 
the mantissa and exponent. Which is, of course why that register size was 
chosen. This register size was used on many subsequent HP processors). 
The A\&R chip contains 7 such registers, which form the user stack, 2 
scratchpad registers and a single user memory register.

Although the processor has a very simple instruction set, and can't in 
any sense be said to have floating point instructions, there is one 
useful facility for processing floating point numbers. Namely the Word 
Select signal. What this does is cause an operation (such as a transfer 
between registers or an add or whatever) to operate on only part of the 
register. It would be possible, for example, to add the exponent parts of 
2 registers leaving the mantissa untouched. This facility, again, is 
common to just about all HP calculator processors.

The control and timing chip sends an address serially to the ROMs, which 
then return a 10 bit instruction (again, that instruction size remained 
for a long time). In this machine part of the instruction is decoded by 
the C\&T chip while other parts are decoded by the A\&R chip. 


Now lets look at the actual board and its circuitry. This one is a `spare' 
so I don't mind passing it round, but please handle it by the edges.

\noindent
{ \bf \{ Do that \} }

\noindent
{ \bf \{ Put up HP35 logic sheet 1 \} }

It's best to start with the simpler components. The main chips in the 
processor are made using PMOS technology, and thus need a negative gate 
bias supply (Vgg) and a positive supply (Vss). HP used a little 
transistor oscillator and transformer to get those voltages from the 
battery pack. This circuit was used (with a few modifications) in just 
about all the LED HP handhelds. The other 2 transistors form the 
reset/initialise circuit, and this identifies the Init signal on the 
block diagram. And it was clear that the 8 pin chip was the clock 
driver/buffer and knowing the power connections and inputs (from the 
anode driver on the keyboard/display board), it was very easy to work out 
the outputs.

We now have to attempt to identify the signals on the logic chips. 

\noindent
{ \bf \{ Put up OHP : HP35 logic sheet 2 \} }

From the keyboard and display connections we can identify the Control and 
Timing and the Arithmetic and Registers chips. Which leaves the 3 metal 
can chips, which are therefore the 3 ROMs. 

Obviously some of the connections are now known. In particular the clock 
signals, keyboard and display connections, Init and the power lines. What 
remains is the processor `bus'.

Again from the block diagram we know hat the carry signal (which is just 
what you'd think it was) goes from the A\&R to the C\&T chip. So that can 
be identified. The IA (Instruction Address) line goes from the C\&T to 
the ROMs only, so we can find that. Sync is a regular pulse once per 
cycle, so that's easy to identify, IS (Instruction -- basically the ROM 
data) looks more 'random'. Which leaves WS (Word Select), which looks 
less random than IS but more random that Sync.

This leaves just one pin on the A\&R chip. It only goes to a testpoint in 
the HP35, and tests with a logic analyser showed that it normally carries 
a bit serial version of the contents of the display, encoded as a 
floating point BCD number (figuring that out was fun). Oh yes, and you 
take the RCD signal as a start-of-word strobe. In fact this signal is 
used on later machines to interface external data storage RAM to the A\&R 
chip. 

I mentioned a testpoint just now. There are 12 such testpoints along one 
edge of the board. They carry the power lines, the buffered clock signals 
and the processor bus lines. In general any fault on the HP35 can be 
diagnosed to chip level by looking at the signals here. First check the 
power supply, clock, and init lines. And then go on to the bus lines, 
suspecting the chip that drives any line that's missing. Actually, 
though, most faults are either mechanical (keyboard contacts, etc) or 
power-supply related. Fortunately the custom chips don't fail too often.

I've covered the HP35 in considerable detail because so much of it 
relates to later machines. We can now cover those a lot more quickly.

\section{HP45}
The second HP scientific calculator was again non-programmable, but added 
a few more functions over the HP35. Fortunately the hardware is very 
similar to the HP35, so there's not much to explain. I have an old HP45 
logic board with with a dead A\&R chip that I'll pass round

\noindent
{ \bf \{ Do that \} }

\noindent
{ \bf \{ Put up OHP : HP45 logic sheet 2 \} }

In fact the only differences at the hardware level are that the ROMs are 
now in DIP packages rather than metal cans (and have a larger capacity 
than those in the HP35, so there are only 2 of them)) and a RAM chip has 
been added, connected to the data line and RCD line from the A\&R chip, 
to provide more user storage registers. 

\noindent
{ \bf \{ Put up OHP : HP45 logic sheet 1 \} }

The keyboard and display PCB is identical to that in the HP35, while the
C\&T chip and power supply are very similar.  One difference is the clock
driver, though. It now incorporates the reset/init circuitry. Well, apart 
from the 2.2$\mu$F capacitor. It's clearly impossible to make large value 
caps inside an IC, so an external discrete capacitor is used.

One thing worth mentioning is that the HP45 has an undocumented feature.
If you press the right combination of keys, you can get a stopwatch mode.
However, since the master clock is the same LC tank circuit as is used in
the HP35, it's not very accurate. 

\section{HP65 -- at last a handheld programmable}
If you remember, HP's initial aim was to fit the HP9100 into a pocket. 
And the HP9100 was programmable. One of the problems with doing this in 
the early 1970s was that low power RAM (CMOS devices, for example) were 
not available, and core memory was clearly impractical for a pocket 
calculator. And the view was that many people would not want to loose 
their carefully entered programs when they turned the machine off. So HP 
put a tiny magnetic card reader/writer into the HP65. 

\noindent
{ \bf \{ Hold up a dismantled HP65, and point to the parts \} }

The card reader consists of a small motor that drives a rubber roller to
pull the card past the 2 track read/write head -- deterioration of this
roller is the main failure mode of the HP65, but it's not difficult to
take the machine apart and replace the roller with a couple of O-rings. A
magnetic transition on one track represents a 0 bit, a transition on the
other track represents a 1 bit. 

\noindent
{\bf \{ put up OHP : HP65 card reader \} }

All HP card readers use similar circuitry. There's a custom chip that 
handles both read/write and the motor speed control. Apparently (and not 
surprisingly, keeping electrical noise from the latter out of the former 
was a non-trivial problem. There are 6 interface signals back to the main 
logic PCB -- 2 for reading, 2 for writing, a write enable signal and a 
motor start signal. 

The keyboard/display is electrically very similar to that in the HP35. 
There's an extra slide switch to select program entry/run modes (which 
simply grounds a pin on the logic connector in program entry mode). And 
there are 3 momentary contacts closed as the card passes through the 
reader. One detects a card has been inserted to start the motor. One 
detects when the card has got to the head so that reading or writing may 
begin. And the last one detects if the corner of the card has been 
clipped off -- this was how these magnetic cards could be write protected.

\noindent
{ \bf \{ Put up OHP : HP65 Logic \} }

Actually the logic in the HP65 is very similar to that in the HP35, 
although you might not recognise it. You see, the HP35 logic board and 
the battery pack already occupy the entire back side of the calculator. 
And now we have to fit the card reader in as well. The only way to do 
that was to shrink the logic board. And the way that was done was to put 
the CPU into a hybrid circuit. 

The logic board of the HP65 contains the standard power supply circuit, 3 
ROMs (not included in the hybrid, so they could be easily replaced if 
bugs were found in the code -- it's not hard to desolder a 16 pin chip, 
it's a lot harder to bond out a silicon die), and the hybrid. This is a 
44 pin metal can containing 6 chips. The clock buffer, C\&T, A\&R, 2 RAM 
(program and user data storage) and the card reader interface chip. I 
don't intend to cut open my HP65 processor, but if any of you are 
interested in seeing inside one, there's one on show in the London 
Science Museum. You'll have to figure out what the chips actually do 
yourself, though. Finally note the 2.2$\mu$F capacitor connected to one 
pin on the CPU hybrid. Yes, it's the reset capacitor again.

\section{HP55 -- a cheaper programmable}

\noindent
{\em Only include this section if there's time}

The HP65 was a great machine, but it was expensive. HP decided to sell a 
simpler and cheaper programmable, without the card reader (so you lost 
your programs when you turned it off). 

The circuitry is very similar to that in the HP45, the CPU is now back in 
individual chips rather than the hybrid. There are 3 ROMs and 3 RAMs, 
connected conventionally.

\noindent
{ \bf \{ put up OHP : HP55 keyboard/display sheet 1 \} }

One feature of the HP55 was a documented stopwatch mode, selected by this 
switch (which simply grounds some flag inputs on the C\&T chip). For this 
reason, the clock tank circuit connected to the anode driver has been 
replaced by a quartz crystal.

\section{HP21 and other Woodstocks}

That concludes the original HP calculators that used the A\&R and C\&T 
chips as the processor. The next series were physically much smaller 
machines. And one way they were made smaller was to use a single-chip 
processor called the ACT (Arithmetic, Control, and Timing).

\noindent
{ \bf \{ Put up OHP : HP21 logic sheet 1 \} }

\noindent
{ \bf \{ Pass round HP21 logic board \} }

The HP21 was the simplest model in the range and has facilities similar 
to the HP35. There are only 3 chips inside, along with the standard power 
supply circuit.

The ACT processor contains the clock generator (hence the parallel tank 
circuit), the reset/init circuit (note the 2.2$\mu$F capacitor again) and 
part of the keyboard interface. Specifically it accepts inputs from the 
keyboard column lines. The keyboard rows are scanned (along with the 
display) by the cathode driver chip. The ACT is again a bit serial 
processor with 56 bit registers and a 10 bit instruction word. The bus is 
also similar to the earlier machine except that now the word select 
feature is entirely inside the processor and that the instruction 
address and data lines have been combined onto a single ISA signal. This 
outputs the ROM address during the first part of the (56 clock) cycle, 
then reads in the instruction at the end of the cycle. The processor 
asserts the sync signal during the time that the instruction is read in 
(or at least during most of those times -- I'll explain that in relation 
to another HP processor later).

\noindent
{ \bf \{ Put up OHP : HP21 logic sheet 2 \} }

And here are the other 2 chips. The display anode drivers and decoder are 
incorporated in the same chip as the ROM containing the program code.

Most of the other HP2x series machines -- the so-called Woodstocks -- are 
similar, but with extra ROM or RAM chips added. One oddball is the HP27, 
which uses an ACT-like processor made using NMOS technology. Which in 
turn means that the power supply bias output is a high positive voltage, 
not a negative one. I don't have an HP27, so I've no seriously 
investigated this, but it's something to be aware of.

\section{HP67 -- A Woodstock in classic's clothing}
One problem with the Woodstock case is that it's clearly impossible to 
fit the magnetic card reader inside. So for the top-end programmable in 
this family, HP went back to the older case design, but used the ACT CPU. 

\noindent
{ \bf \{ Pass round HP67 logic board \} }

There's no point in me showing you the first half of the diagram -- the 
ACT and power supply are totally conventional. 

\noindent
{ \bf \{ Put up OHP : HP67 logic sheet 2 \} }

Connected to the ACT processor bus are 5 memory devices. One of them is 
the ROM and display decoder similar in concept to that used in the HP21. 
The others are both ROM and 16 registers (each of 56 bits or 7 bytes) of 
RAM. 32 registers are used to store the user program -- each program step 
takes one byte, so the machine can store 224 program steps. 26 more 
registers are used for the user data storage, and 5 for the stack and 
lastx. Which leaves one register. I believe this is used, at least in 
part, to store the display format, angle mode, user flags and so on.

The remaining chip on the logic board is the interface chip to the card 
reader. As it's the largest chip on the board, it's often mistaken for 
the CPU.

\noindent 
{ \bf \{ Put up OHP : HP67 keyboard/display sheet 2 \} }

I should say something about the display driver circuitry. the HP67 has a 
15 digit display (10 digit mantissa + sign , 2 digit exponent + sign, 
decimal point). But the cathode driver can only select 14 digits. 
However, since only the `g' segment is used in 2 of the positions, a 
little extra circuitry here maps those 2 segments into the 'g' and 'e' 
segments of digit 3, thus saving a digit driver line. This only works 
because, like the HP35, only one segment of one digit is driven at a 
time. Also note that the display anode buffer/driver chip is a standard 
transistor array (CA3082), and is not HP custom.

\section{HP97 -- HP67's printing brother}
\noindent
{\em Only cover this if there's time }

Another ACT-based family is the HP9x 'Topcat' series, which were portable 
(although not really pocket-sized) printing calculators.

\noindent
{ \bf \{ Put up OHP : HP97 logic \} }

The circuitry of the logic board is similar to that in the HP67. The ACT 
and card reader interface chip are the same, the memory is similar apart 
from an extra ROM-only chip (notice that it has no connection to the DATA 
line). A new chip, PIK (Printer Interface and Keyboard) handles the 
control of the built-in thermal printer and also buffers user keystrokes 
(notice there are no connections to the keyboard column inputs on the 
ACT). Much of this applies to other HP9x machines, apart from the fact 
that the card reader is omitted, and fewer memory chips are used. One 
machine in the range was going to have CMOS memory (battery-backed, so 
programs were maintained at power off) with consequent changes to the 
power supply, but this machine was never sold and is very rare. I think 
it's safe to say that if you've worked on one of these you should be 
giving this talk.

\section{HP33C and Spices}

The next series of HP calculators, the HP3xE and HP3xC -- the so-called 
`Spice' series were lower cost machines (the HP67 and HP97 were 
expensive). 

\noindent
{ \bf \{ Put up OHP : HP33C sheet 1 \} } 

Electronically, they're not very interesting. The processor, which is 
certainly an ACT derivative (although I don't know the name for it) is in 
a 40 pin package along with the display drivers and keyboard interface. 
Memory devices are connected conventionally.

What makes these series of machines interesting is the mechanical 
construction. Very little solder was used. The main PCB is a flexible PCB 
wrapped around a metal chassis plate. On one side are the keyboard 
switches. The other side is backed by foam and is clamped against the 
pins of the ICs (which are slotted into a plastic frame) and the flexible 
PCB `tail' of the power supply module. Needless to say this method of 
connection is not especially reliable, and often old Spice-series 
machines can be repaired by taking them apart, cleaning the contacts and 
putting the parts together again. Due to the unreliability, HP used a 
conventional soldered PCB in later production machines.

One other interesting feature is that, at least for the older type of 
construction, the same main PCB was used for all machines in the range. 
Different numbers of memory devices could be fitted, and the power supply 
module could either supply a separate supply (VRAM) to the chip in the U2 
position (if it was CMOS RAM, to be powered at all times) or simply link 
it to the Vcc line alongside (for machines without continuous memory). 

\section{HP41 -- The great system calculator}

The HP41 introduced a lot of features for the first time to HP 
calculators. It was the first handheld to have an alphanumeric display. 
It was the first handheld to use an LCD display. And it was the first 
handheld to be designed as part of a system. The calculator itself had 
relatively few features (no card reader or printer, for example), but you 
could plug either or both of those in, together with extension ROM 
modules, a barcode reader wand, and later on an HPIL interface module 
that would link the machine to larger printers, plotters, a disk drive, a 
very nice digital multimeter and so on. It is somewhat amusing to see a 
bench of equipment controlled by a tiny handheld calculator. 

However, what makes the machine interesting for this talk is that is uses 
a new CPU. It's called the Nut, and appears to be similar to the ACT, but 
made using CMOS circuitry. And since the plug-in module connectors allow 
access to the processor bus, it didn't take long for hackers to start 
investigating the machine at a very low level, aided and abetted by HP, 
who released many technical documents to the user groups on condition 
that if you used this info you were on your own -- the so-called NOMAS 
(NOt MAnufacturer Supported) scheme.

Therefore, the internal architecture of the Nut, and the bus, is fairly 
well documented.

\noindent
{ \bf \{ Put up OHP : Nut registers from M-code book \} }

Again it's a bit serial chip with 56 bit registers. There are 3 main 
working registers A,B,C and people used to other processors will be 
amused to hear that C is the accumulator. There is a 16 bit program 
counter which addresses 10 bit wide ROM (again, same instruction width as 
earlier processors), along with a few miscellaneous registers that I 
don't intend to describe here. And as before, the 56 bit registers are 
divided up into fields (mantissa, exponent, and so on) which can be 
operated on separately.

\noindent
{ \bf \{ Put up OHP : HP41 bus timing \} }

Again, the bus is similar to the ACT bus. Since this is a bit serial
processor with 56 bit registers, a machine cycle is 56 clocks long. The
ISA line outputs the 16 bit instruction address during bit times 14 to 29.
It is then used to read back the 10 bit instruction during bit times 44 to
53. The sync signal is asserted during the instruction read part of the
cycle, but only if the word being read is the first (or only) word of the
instruction. For 2 word long instructions, it is not asserted during the
second fetch cycle -- I'll explain why in a moment.  Finally the data line
is a serial interface to the C register. Normally it outputs the contents
of the C register, LSB first, but during reads from user RAM, it becomes
an input, and the contents of the selected RAM register are transfered to
the CPU along this line. 

It is worth mentioning that the RAM (and, indeed, peripheral devices) 
decode instructions on the ISA line also. When the CPU writes to RAM, the 
instruction to do so is essentially a NOP as far as the CPU is concerned. 
But the RAM recognises this instruction and grabs the bits off the Data 
line during the next bus cycle. When the CPU reads RAM, the RAM again 
decodes the instruction and outputs the contents of the selected register 
on the Data line during the next cycle. The CPU also decodes the 
instruction and reads in the bits on the Data line and stores them in the 
C register. That's why the Sync pulse is suppressed during the second word 
of 2 word instructions. It would be possible for that second word to be 
misinterpretted as an instruction by a peripheral chip, unless that 
peripheral chip included enough logic to recognise all 2 word 
instructions and thus to ignore the second word. Instead, of course, the 
peripheral chip simply looks for a sync pulses, thus ignoring such second 
words.

\noindent
{ \bf \{ Put up OHP : HP41 diagram part \} }

By now I am sure you'll recognise the main features of the CPU to memory 
bus, so there's not much to say. As normal, the keyboard interface is 
built into the processor, while the memory and display drivers are external.

\section{HP16C and other Voyagers}

In order to use the Nut CPU to make a simple calculator, you need to add 
a ROM containing the operating program, RAM for user data and the stack, 
and a display interface (remember the keyboard interface is built into 
the Nut). There's no reason why these extra functions shouldn't be made 
in one chip. HP sold a range of calculators built like that, a Nut CPU 
and another chip containing the ROM, RAM and Display Driver. This chip 
(of course) was given the acronym `R2D2'.

Here's a typical example
\noindent
{ \bf \{ Put up OHP : Voyager logic sheet 1 \} }

\noindent
{ \bf \{ Pass round that old 16C logic assembly \} }

The R2D2 is the larger chip, since it needs a lot of pins to connect to 
the 2 way multiplexed LCD. The Nut bus between the 2 chips is conventional.

\section{HP71 and Saturn -- a break with tradition}

The final CPU I want to consider is the so-called `Saturn', which is used 
in just about all HP-designed calculators from the HP71 onwards (note : 
The HP6S and HP30S are not HP designed\ldots).

This chip has some significant differences compared to the earlier ones. 
For one thing, the main registers are 64 bits wide, allowing the storage 
of a 12 digit mantissa + sign and a 2 digit exponent + sign (in BCD). The 
arithmetic logic unit is 4 bits wide, so the chip processes one nybble or 
BCD digit at a time. And the bus is very different. However, the feature 
of being able to work on part of a word is retained, and the instruction 
set is at least similar in concept.

The first machine to use this processor was the HP71 pocket computer. 
This was intended to be an open machine, and a full technical manual 
(called the `IDS' , standing for `Internal Design Specifications) was 
available to anyone. When I say `full', I mean it. You got schematics, 
bus timing diagrams, mechanical dimensions, assembly language, entry 
points and even the full commented source of the ROM. The problem was 
that the manual was 6 thick binders and cost more than the machine. So 
only serious HP enthusiasts are likely to have it.

\noindent
{ \bf \{ Put up OHP : HP71 CPU diagram \} }

As you can see, the serial address and data lines have gone. In their 
place there's a 4 bit address/data bus, a `*Stb' bus strobe/clock and a 
`*C/D' command/data line. Unlike the earlier processors, there are no 
special connections for user RAM -- ROM and RAM are in one address space 
on one bus. Addresses are 5 nybbles long (so the machine can address 1 
Meganybble or 512K bytes (and this is a pocket computer from 1984!)), 
while instructions are typically between 3 and 5 nybbles long.

You might think that on every cycle the processor transfers 5 nybbles of 
address to the memory device, then reads back a nybble of data, and then 
repeats the process. Fortunately HP were a lot cleverer than that. They 
realised that most of the time you access adjacent memory locations in 
ascending order, either to execute program instructions one after the 
other, or to read successive nybbles of a user data item. Therefore, each 
memory chip (and, indeed, peripheral device) keeps a local copy of the 
program counter and data pointer registers. The CPU can send a command to 
each device (that's what the `*C/D' line is for) to cause the memory 
chips to load the next 5 nybbles over the bus into one or other of the 
pointer registers. And there are similar commands to start reading or 
writing at the address given in one of the pointers, after which that 
pointer is incremented. So to execute a simple program  that doesn't access 
external memory for data, (after initial setup) the CPU just reads nybbles 
from memory without having to ever send an address.

One last feature is worth noting also. Most of the devices in the HP71 
don't have fixed addresses. Instead, at power on, the processor asks each 
chip what it is (ROM/RAM/peripheral) and how big. It then sends a command 
to each chip to set its base address (the address itself is sent as data 
over the bus). With the result that no matter how ROM and RAM modules are 
plugged into the I/O port connectors, the machine can always end up with 
a contiguous block of ROM and a contiguous block of RAM. Of course the 
operating system ROMs have to be assigned a fixed address (so the 
processor actually has some code to execute at power-on) as do a few 
other specialised devices.

So there you have it. 12 years of wonderful pocket calculator processors.


\end{document}
