p. 37


the registers of state are the 16 registers whose address lies between 000 and 00F. They are used for the HP of draft, of méMoire assistance or of report all courtla card of these registers is at the end of the book, fig. 36, pl10.


the famous operational pile of HP is a group of 4 registers X, Y, Z, T These registers are placed at the base of the memory; T is the register R(000), Z is R(001), Y is R(002) and X is R(003), the register L (lASTX) is simply R(004).

These registers do not have an other particular characteristic. It is their handling by microcodes which makes their characteristic.

There is nevertheless another detail. We have just seen that the operational pile is at fixed addresses in memory. On the other hand the current registers (R00... R99... R319) are on variable sites and can not even exist.

We will see that the HP must check the existence of these registers, then calculating their position each time that it makes use of it. On the other hand the registers of the pile are always there. This is why a ISG or DSE is much faster in the pile than in a register.

With the fact, did you notice that instructions STO L (STO.l) or RCl L (RCl.l) exist of origin? If the first is sometimes useful, the second fact doubles employment with lASTX and uses a byte moreover.


there, that becomes more interesting!

page 38

" the " register alpha is known to make 24 characters, isn't this? And well, makes this " register of it " consists of 4 close registers called M, N, 0 and P which are the registers R(005), R(006), R(0071 and R(008).

Still more interesting, these registers can be used like ordinary registers. Recall you that we said that, in a program, with a given prefix can be affected an unspecified postfixe. And well, from 0 to 99 (decimal) we have the normal registers, of l00 with 111 we have the of the same registers number, and from l12 with 127 we obtain the registers of state! the code 90 75 or RCl l17 is displayed actually RCl Mr. It does not act more of the l17ième register, but of the register of state M, register of right-hand side of alpha. See chapter V the instructions.

**time-out** when you introduce a character in the register alpha, it be place on the right of register Mr. As you introduce of character in alpha, the first character be thorough towards the left in N, in 0 then in P. More extraordinary still the character be thorough until the left of P before of disparaitre forever. We have 4 X then 7 = 28 characters in alpha! **time-out** that last not very a long time, because the 4 byte left of P (and thus of alpha) be often use like draft by the HP Moreover plus, the character which himself find with this place appear not with screen, this property be however sometimes useful.

the registers Mr. N 0 P can thus be used:

- normally with the functions alpha,

- directly with STO, RCl, VIEW, ISG... etc, like registers of storage, counting... additional with same the advantages of speed as the pile.

the mixture in these two ways of working allows an increased control. contents of these registers.

the other registers of state are normally invisible for the user, but not for us! They are in general not used in block by the HP, but of the zones of certain registers have a specific use. Let us see the ones after the others.

IV.3 lE REGISTER P (addresses 008):

the 4 bytes of left of the register P are used like draft by the machine. For example, during a catalogue, the digit on the left (ms) of P contains the number of catalogue (1, 2 or 3) and the other digits the number of functions already displayed during the catalogue (into hexadecimal).

It would be tiresome and not very convenient to list the various cases of use of P by the 4ç. A test is preferable if one hopes to use it. Attention with the peripherals!

p. 39

IV-4 lE REGISTER Q (addresses 009):

This register is a draft, but very significant since it is there that the HP places the name of the functions which you spell after a XEO.

This name is placed in opposite command, written of right-hand side to gaucheles bytes not used are to 00. This register is used in good of other cases, in particular by the printer.

In fact, it is used so often that it is impossible to make use of it for other thing.

IV-5 lE REGISTER X (addresses 00A >:

Thus called (if one can say) because it is displayed thus by the HP.

the 5 digits of right-hand side are used like draft. But the others are much more interesting. They represent the index of the assigned keys.

You know that each key of the 4Ç can be assigned. It would be much too long for the HP to assignement seek in all it report possible with each pressure of key. Consequently, the machine holds up to date an index of the keys which were assigned and starts search only if this index announces the existence of the assignment.

There are 35 keys with the keyboard; one thus needs 35 indices and thus 35 bits. 4 bytes make 4 X 8 = 32 bits, one thus needs a digit moreover, are on the whole 36 bits. There is one of too much of them, but abundance of good does not harm!

the position of the bit is represented fig. 36, pl10 by the letter corresponding to the key.

IV-6 lES REGISTERS has AND B (addresses 00B and 00C):

These registers are the registers of pointers. A pointer is a register (do not say to me that one turns in round) which gives the number of the byte of program which is in the course of processing, in other words the address of this byte.

the principal pointer is the pointer of program, that which says to us which is the byte of program which is in the course of execution. This pointer is formed of the two bytes of right-hand side of the register B.

a) ROM:

When the pointer is in a module of read-only memory, for example in PPC ROM, the pointer of program represents the address of the byte in the course of processing, expressed in 4 hexadecimal digits of 0000 to FFFF, which authorizes 65 536 bytes. These bytes have a number which increases in the same direction as the lines of program.

p. 40

b) RAM:

When the pointer is in the read-write memory (RAM), for example carrying out your favorite program, it has a different form.

the 3 digits of right-hand side of the register B give the address of the register in which the treated byte is and the digit number 3 gives the number of the byte in the register the addresses of registers, decrease when the number of line increases.

c) the pile of return of under programs:

You know there that, when you carry out instruction XEQ in a program, the HP must note the position of this XEQ to be able to return, after having carried out under indicated program. Where is this address thus noted?

Quite simply with with dimensions. **time-out** at time of XEQ, before to seek the address of program to carry out, the HP push the pointer of 2 byte towards the left, it himself find thus in the byte number 2 and number 3 of register B In fact, it be all the register B which be thorough on the left, and what leave on the left of B re-enter on the right of A. What be thorough on the left of A be lose.

There is thus out of B the pointer in the course of use, plus 2,5 pointers in reserve and one has the half which misses out of B and 3 other pointers in reserve, therefore on the whole 6 calls of under program recorded. If a seventh call takes place, the first call is lost.

It would be almost too simple! It is an easy way in the storage of the return addresses of under programs which will limit more the read-write memory usable of the 4Ç, at least for the execution of the programs.

In the memory of the 4Ç it was not envisaged there to use of program at addresses higher than 1FF. Therefore the digit number 2 of the pointer is into binary 0000 or 0001. There are thus always 3 free bits.

In addition, there are only 7 bytes per register, therefore the digit number 3 of the pointer is to the maximum 7 = 0 1 1 1 and there is not that 3 bits used engineers HP could not resist temptation to place the 3 bits of digit 3 in the 3 empty bits of digit 2.

Why release a digit of the pointer thus? Quite simply to make the difference between ROM and RAM Indeed, this contraction is not possible that in the read-write memory. Moreover, the programs located in read-only memory at the addresses 0xxx are those of the internal storage in which there is no question of going to walk. Therefore if the digit number 3 is equal to 0, the HP considers that the return must be done in RAM; if it is different from 0, the return is done in ROM.


It is this phenomenon which makes that, if it is possible (with the help of special handling) to carry out programs in the report of the module X-functions, it is much more delicate in the X-memories which are with the top of 1FF and in which, amongst other things, it is not possible to make function XEO.

The handling of these pointers of return is at the historical origin of the browsing of the internal storage of the 4Ç.

Indeed, as we saw, this internal storage contains the addresses 0xxx, lxxx and 2xxx. the last two groups are thus accessible by construction from an artificial return address.

IV.7 the REGISTER C (addresses 00D):

One of most dangerous and most interesting of the registers of state. This register contains, of right-hand side on the left:

a) On 3 digits, the address of the permanent END., i.e. addresses it register in which is located this END. Indeed, the END. is always located in the 3 bytes of right-hand side of its register. 3 digits are thus enough to define this address. This is the lower limit about which we spoke in chapter 1.

b) the address of the first register of data, that which we call R00, here also 3 digits. It is the lower limit of the zone of the data and the higher limit of this of the programs.

One calls curtain between programs and data this register.

c) number 169, called hot starting constant. It is a value which should not be touched. the HP controls it with each stop of execution and even sometimes a little more often. If it finds 169 in this zone, it is that the 4Ç is " hot " and all is well, if not it carries out a " cold departure " and you see apparaitre disaster MEMORY LOST!

However, during a program, this control is not frequent and one can play a little; do not deprive any to you.

d) the 3 digits of left give the address of the first statisque register (REG).

E) remain two unutilised digits (9 et10) which are used as draft, in particular for the printer.

image full size (130ko) 

p. 43

IV.8 the REGISTER D (addresses 00E):

In this register are placed the 56 flags of the 4Ç, 1 flag by bit, as one sees it in the joined table (Fig, 12, p. 42). The possibility of reaching directly this register at the same time makes it possible to treat the 56 flags " of a blow " and to treat the contents of a register bit by bit. As the flags are tested by the 4Ç only from time to time, one can generally handle them without problem in the course of program, on the condition of reconstituting the register before the program stop.

Be wary nevertheless of the flags specialized like 45 (input system) or 21 (validation of printer).

This register one of is used, so much so that HP finished by the reconnaitre while including in the module X-functions of the functions working on this register.

IV.9 the REGISTER E (addresses 00F):

The three digits of right-hand side contain the number of the line of program in the course of execution or FFF if this number must be recomputed.

The two following digits are used like draft on several occasions by the HP.

The other digits, of 8 à13, contain the indices of assignment of the secondary keys (shiftées) as seen in the register -.

End of the fourth chapter