afchap2


page 6


page 7

II) G E 0 G R A P H I E

Our dear machine has many possibilities, but its internal organization is passably complicated and it is not without interest to be delayed there. We knew the HF-4, the HP-4V (C 5), maintaining the HP-4X, all neighbors, each model simply incorporating " in limps " the modules which were to be added before. All this did not simplify anything.

II.1) GEOGRAPHIE MATERIELLE:

The HP-4 comprises primarily 6 independent parts (cf Fig L, p. 6):

  1. Display: includes/understands the displays with liquid crystals and their control circuits, including a clock.
  2. The keyboard: made of a special printed circuit, it provides not only its obvious function but still the connection between the display, the logical circuit and the connectors.
  3. The Logical circuit: brain and memory of the 4, it includes/understands a specialized microprocessor, the dead memories intern and the standard read-write memories, as well as a clock and the circuits additional. It is on this level that the new models receive the additions.
  4. Connectors of interface: indeed, the apparent circuits of connection in the openings to the node of your 4 are mechanically independent and thus easily interchangeable. They are in fact made up of a flexible printed circuit folded up multiple times on him even. this circuit is not welded but simply not posed onto the circuit of the keyboard; it also ensures the connection with the feeding.
  5. Feeding: composed either of piles or of accumulators to the format of the piles, charged apart from the machine, or of a block of accumulators HP.
  6. The case: in 3 parts of resistant plastic assembled by screws hidden under the feet out of rubber. The screws are screwed directly in the plastic and they thus should not too be forced.

page 8

Figure 1 '

The logical circuit reproduces figure 1 was drawn in October 1979 and that of figure 1 ' in October 1982. In three years it lost considerable its components. The transistors disappeared. Is this there the consequence of the RESET new fashion (cf V.5, p. 58), or of a more thorough integration? The fact is that there is place for future components.

 

Logical circuit of a HP-4, October 1982


Taking into account the need for adding components, the last plates HP use the method known as " piggy back " (would be translated into French by " with the greyhound bitch "), consisting in placing two integrated circuits one on the other.


page 9

II.2) GEOGRAPHIE ELECTRIC:

It is especially notable with regard to the connectors of the ports. To notice in particular (fig. 2 and 4, pages 10 and 12) the use of studs 2 and 4. Those are not connected inside the HP but only, possibly, with the stud the 3. Thus HP recognize the position of the modules and number ports 1, 2, 3 and 4 (cf engraving with the back of the 4).

Also let us notice (fig. 3, p. 1O) the provision of the feeding which protects the piles against a " load " and allows the connection of external batteries or a feeding 6V continuous connected on the sector (attention, it is not impossible that on the new models this provision is modified).

The first 4 were designed to receive such a feeding by the side opening used by the battery charger. If the small plastic mask were removed one saw two yellow brass studs which exceeded plastic (it - side screen).

Alas, HP gave up the idea to manufacture an adapter 6V when it came out its " battery pack " and has one day removed these studs like their guides out of plastic and the small springs of contact. But for a long time the circuit of the keyboard was not modified and comprised still the contacts, it is thus enough for the handymen to rebuild the brass studs to easily be able to connect an external power. Is this still possible on the last models, and for how long?

II.3) GEOGRAPHIE OF THE READ-WRITE MEMORY:

It does not act any more a hardware but of software, but it is always of the geography !

The read-write memory of HP 4 is entirely accessible to the advised user.

Being logical geography, measurement cannot be done in millimetres the sharp storage unit of the HP-4 is the register.

This register has as under multiple the byte, the digit and the bit (cf definitions, annexes I, p. 99). Except explicit mention, we will always count in hexadecimal base.

The first sharp storage register is R(000). This classification does not have anything to see with this which you use with RCL and STO (cf chap.IV) the hexadecimal figure () will be called " addresses absolute " register.

The last possible register (en1983...) is R(3FF). Like decimal 3FF=1023, it there thus has of 0 with 1023=1024 possible registers, that is to say exactly L K registers and thus with 7 bytes per register 7 kK bytes. Alas, it is lacking of much that these registers all exist.


page 10

Figure 2

Sight of top of the connectors

(ref. PPCJ V6 p. 14)

Fig 3

Feeding of the 4

(circular of PPCJ V7)


page 11

The " card " of the read-write memory is represented at the end of this book, fig. 35 p. 109.

The following zones can be possibly met in read-write memory:

  1. Registers of state
  2. A vacuum
  3. X-Memories
  4. assignements
  1. alarms
  2. buffers
  3. programs
  4. data

1 registers of state:

Of R(000) to R(00F), it is the memory assistance of the HP-4. Normalement you should not y have access, but we are not normal people! These registers are so significant that us will devote a whole chapter to them.

2 a vacuum:

Certain sites have an address but not contents ! on a standard HP-4, it is the case of R(010) to R(OBF) and of R(200) to R(3FF). These vacuums are occupied partly by the read-write memory of the plug-in of functions of R(040) to R(OBF) and the X-memories to the top of R(1FF) (out of standard on your 4X), which still leaves vacuums. These vacuums all are not useless, in particular the registers R(010) to R(01F) must remain empty so that the 4 can function (see chapter microcodes, VII.3, p. 85).

3 X-Memories:

They are registers ordinary but used with the special functions of the module X-functions. They are placed of R(040) to R(OBF) for the reports being neighbourly with the X-Functions, of R(200) to R(F) and of R(301) to R(F) for the possible modules X-memories.

With the help of some limitations, one can extend their use and even make function programs inside these registers. It is however not their principal use. Their complete study comes out of the framework of this work. They should not be confused with the other sharp storage registers.

4 assignements:

In fact registers contain the references of the assigned keys. These registers are located starting from R(OCO) and while counting towards the increasing addresses according to the number of assigned keys. They have the following format:

:F:O:

F0 is followed of: code function on 4 digits + code touches on 2 digits + code function + code touches, on the whole 14 digits. When one erases one assignement, the 3 bytes are not immediately removed, only the byte giving the code of the key is given to zero (and the index of key lowered in the registers | - or E). This site is re-used by a new assignment, but it is not removed by a PACK. On the other hand, it is removed by km No of PPC ROM.


page 12

Figure 4

Role of the lines of output

(ref. our of the fig. 2, p. 10)

Line 1 Vbat (or Vcc). Line isolated from the battery by a diode (prohibiting the return towards the battery) used by the accessories requiring a high current and a not controlled tension (card reader or light pen).
Line 2 Select the address (ports 3 and 4) by connection to 3
Line 3 Vcc 6V rgul for logical use. Do not support more 20mA without roasting (requiring the replacement of the logical circuit). Fall to the value from the battery when the HP is extinct.
Line 4 Other selection of address (ports 2 and 4)
Line 5 Ground or V
Line 6 PWO (power one). 0V when the microprocessor is stopped, Vcc when it is active. The interruption of this line makes it possible to make " absent " a peripheral without disconnecting it physically
Line 7 Line of transfer of data and addresses of registers, in series with the register C of the CPU. To 0 when the CPU is stopped, transmits bits series when the CPU is active
Line 8 Hand-shake (" hand-shake ") with asynchronous peripherals. To Vcc except impulses with 0V
Line 9 ISA. Transport the addresses of ROM and returns 10 bits of instruction taken to the address indicated. With 0 when inactive
Line l0 SYNC. Synchronization enters the peripherals and the 4. To 0 in major sleep, to Vcc in sleep light and modulated under operation
Line 11 F2. Phase 2. Allows to count the 56 steps of a cycle machine.
Line 12 F1. Phase 1. LikeF2 but out of phase one microsecond approximately for the reading of the data.

These data allow to the specialists construction in interfaces. This kind of work is not with advising with the simple handymen. The risk of destruction of the logical circuit is high in the event of mishandling.

(extracted from PPCJ V7 N3 Avril 1980)


page 13

The code of the function that is described in chapter III, p. 25. If the function uses only one byte, the 2 digits of left of the code function are 04. There are thus two assignements by register. These registers are filled of right-hand side on the left and upwards.

For example, to assign function LN with key A gives to the display (by admitting that no other assignement exists):

:F:0:0:0:0:0:0:0:0:1:5:0:0:1:

If we assign then another function, the 4 initially will look at if the left part of R(0CO) is free. If it is the case, it uses the place thus available. If not the HP " pushes " to the top the registers of assignement and thus places the contents of R(OCO) into R(OC1). R(OCO) becomes available then...

The fig. 5, p. 14, give the code uti lized in the registers of assignement to indicate the keys. This code is different from that which appears on the screen.

5 alarms:

For those which have the module clock (or a 4X), know that the 4 uses the registers located at the top of the registers of assignement to record alarms and their messages the registers thus used are framed by a register of higher state and a register of lower state (see appendix VIII, page 108).

6 the buffer:

Another type of memory is used by HP, in particular in a module of reduced diffusion called HP IL development. A buffer is a buffer memory intended to receive data on a purely transitory basis, for example during a transfer on the loop HP IL between the printer and mass memory. This buffer is normally located at the top of the registers of assignement and the top (or the lower part, by command chronologi- that) of alarms.


page 14

Figure 5

Codes (hexadecimal) of the keys found in the registers of assignement. With the top of the key, the code of the shifte key. To notice that if one can do it one can assign a function with the key SHIFT (03) and even with the key SHIFT shifte (!) (0B). to use the latter it is then necessary to come out of the mode TO USE, press SHIFT, USE, and second once SHIFT. The code " display " (used by KA) is that awaited (31 and -31). Test when you see KA (chap V).


page 15

It consists of un' register of lower state, a register of higher state and between two of the report buffer itself. The register of lower state is form:

:B:B:F:5:6:4:0:

BB is (always into hexadecimal, do not forget) the reference mark of the register, like F0 for the assignements and AA for alarms, F5 is the total number of registers, state included/understood, here 245 registers. 640 is the position of the pointer in the buffer. Here the pointer indicates byte 640 (decimal 1600). When with the register of higher state, it has as a value:

:1:0:4:D:4:F:4:E:4:9:5:4:5:2:

It is an easy way of HP. If you begin the study of the 4 with this book you do not have yet knowledge necessary to include/understand it. This knowledge will be given to you to the following chapter. In did the contrary case you perhaps already include/understand? solution chap. III.2, p. 25.

7 Of The Programs:

The programs are located in a zone at the top of the three types of reports seen above. This zone is located between two limits defined by addresses preserved in the registers of state of the 4 (cf chap. IV).

The lower limit is the address of the register containing the permanent END... the END. is the end of the last program in memory, in the order of the CAT 1. It is located some share at the top of the assignements-alarm-buffer. Between the END. and these specialized registers, there are thus registers available which are allotted according to the needs. This attribution is automatic. In the event of insufficiency of register, this fact is in general announced by a message " PACKING " sometimes followed " TRY AGAIN " (" still test ").

The higher liwite of the zone program in fact the lower limit of the zone is given...

8 Data:

The data are located between a lower limit and the node of the standard, variable report with the number of modules of read-write memory with a maximum of 1FF. There is thus no recorded higher limit. This is due to the possibility that there is on a 4 of enleverdes modules of memory without the machine being able the knowledge.

The lower limit is the absolute address of R00 (note: not () around the figures) the register which you reach by STO 00 or RCL 00.


Figure 6: card of the read-only memory


p. 17

Ouf! our machine is really not simple but hang you, it is not finished I

11.4 GEOGRAPHIE OF THE CENTRAL PROCESSING UNIT

How to make for y reconnaitre, in all these storage areas? However the 4 is found there. It can also analyze the functions described in chapter III But what is it that this " it "?

It is an electronic circuit whose principle is now well known and which one calls microprocessor.

This microprocessor is with him only a small computer with read-write memory and read-only memory and instructions particulires.

The dead memories of the microprocessor photo-are engraved and it is not in our capacity to read them.

We will thus be satisfied to observe the effects of the instructions, to give them a name and to use them as well as possible.

We will see in the chapter VI how is organized the read-write memory of this microprocessor. Figure 7, p. 18 gives you an idea of the standard shma of a microprocessor, ours must resemble it much.

Our central processing unit as well regards as peripherals the printer and the card reader that the display or the read-write memory that we have just studied lengthily (III.3, p. 9). It takes its instructions in the read-only memory which will be described hereafter.

II.5 GEOGRAPHIE OF THE READ-ONLY MEMORY:

If the read-write memory has like unit the register, the read-only memory has as unit the mot. By a bizarrery of the fate, undoubtedly explicable by historical reasons, the instruction word of the microprocessor HP of the 4 has a length of 10 bits, therefore a byte plus two bits. Into hexadecimal, a byte is represented by two digits (for example 3rd). To represent the two overhead bits it is thus necessary to mobilize a digit moreover.

All the problme is to know if these two overhead bits are taken on the left or on the right (not policy, I request from you); let us explain on an example. Instruction RTN, for the microprocessor must be coded:

1 1 1 1 1 0 0 0 0 0

that is to say 10 bits. To represent them into hexadecimal we can gather 2 bits on the left, then 4 bits, then the last 4 bits, obtaining the mode " 244 "; in this mode, RTN is written:


Figure 7: General architecture of a microprocessor


p. 19

11

1110

0000

 

3

E

0

= 0

We can also gather 4 bits on the left, the 4 all alone following and leave both of right-hand side. We have mode 442:

1111

1000

00

 

F

8

0

= F80

These words are counted one by one, it does not have there a structure similar to the register.

In short the dead storage unit is the word, the read-only memory is organized in columns of 16 words, on pages of 16 columns and 256 words and in modules of 16 pages or 4096 words (4k). the microprocessor is capable of reconnaitre 16 modules different existing simultaneously in memory, numbered of 0 to F, are 65536 words (64K).

Modules 0, 1 and 2 are reserved for the built functions of origin in the 4, it is the internal storage. It is the contents of these modules which make 4 what it is.

Module 3 is used only on the HP-4X, one finds the X-functions there.

Module 4 is that of the service. HP uses in its workshops a " module of service " charged to control the correct operation of the 4 and which is placed at this address. In fact, the 4 tests the presence of this module to each startup, in which case the module replaces entirely the internal storages. This possibility could be used by an expert programmer to modify the operation of the 4. completely This address is used by the module HP IT. The address of the printing part of this module is into binary 0110 (6). When one uses a printer not IT, one needs " SAYABLE " (to disconnect) this module IT using a cursor located under the case of the module. This cursor is satisfied to put at the mass (to 0) one of the lines of address, transforming 0110 (6) into 0100 (4) and addresses to you master key from 6 to 4. That goes because the first words of this module, read as instructions lead finally to a return. 0n has indeed: 4000 01D Carry are not raised, therefore 4001 01B?C GO 0607 do not jump 4002 007 JC +00 does not jump 4003 IBB JNC +37 jump and arrive on

4000 01D   Curry is not raised, therefore
4001 01B ?C GO 0607 do not jump
4002 007 JC +00 do not jump
4003 1BB JNC +37 jump and arrives on
...      
40 0 RTN  

That you will be explained better after the reading of chapter VII.

Module 5 is that of the clock. the presence of this module is tested sometimes by the HP IT, the use of this address is thus to prevent if the HP IT is present in memory unless precisely putting the clock at it. The module clock is present of origin on the CX. On the CX this same address is used for the additional functions, by commutation in time (one A either a module or the other), without that or apparent for the user.


p. 20

Module 6 is that of the printer (all models), the addresses C, D, E, F of this module are often tested by the internal storage. With the proviso of holding account of it one can use this address. In particular a possible video extension could take into account these calls to the printer. It east currently does not seem it the case. Module 7 is that of the HP IT, mass memory and control. In the absence of IT one can use it without problem.

Modules 8 with F are free with the use except the module E if the card reader is present bus says it card reader always takes this place.

At this time it is significant to note this: the accessories referred to above have their programs placed at the addresses quoted whatever their material position with the back of the 4, on an extension, or incorporated directly in the machine.

All the other accessories have an address which corresponds to that of the port in which they are inserted. If two accessories have the same address nothing does not go. Generally the 4 blocks dice lighting. It is thus significant to especially note the " dead memory board " of your 4 if you use an extension or a reader of Eprom.

This reader of Eprom in question further is a particular case, since its address is adjustable in-house (see note of the manufacturer).

If you use a module of 4k its address will be 8, A, C or E according to whether it is in port 1, 2, 3 or 4. Certain modules are placed by construction with the " high " addresses is 9, B, D or F.

If the module makes 8K it occupies addresses 8+9, A+B, C+D. or E+F.

End of the second chapter