Go To in Woodstocks
|
05-17-2016, 09:19 AM
(This post was last modified: 05-17-2016 09:21 AM by PANAMATIK.)
Post: #3
|
|||
|
|||
RE: Go To in Woodstocks
(05-17-2016 05:16 AM)teenix Wrote: I have found code segments that appear to jump across ROM boundaries and as the instructions are only 10 bits with 8 for the target address I cannot see how this is accomplished. If this is indeed the case then having delayed select ROM n instructions would seem unnecessary. Hello Tony, The delayed ROM instructions can access only up to 16 ROM pages, which is 4k address range. The bank switch instruction 01060 was invented after 4k was not any more sufficient memory for the HP-67 and HP-97 code and extends the address range to potentially 8k. The bank switch instruction toggles between the two 4k ROM banks 0 and 1 each time it is invoked. Additionally whenever an address within the first 1k is jumped to the bank 0 will be selected. If a ROM switch 01060 occurs, the next instruction will be fetched from the following address but in the other bank. In the real calculators, some of the ROM chips contain two banks, others only one. Normally a bank switch instruction occurs only at ROM addresses of chips, which contain both banks, otherwise the opcode would be ignored. In fact, the HP-67 ACT ignores all 01060 instructions executing it as a nop instruction, only the ROM chips itself listen to this code and toggle their bank, if they have both. The first ROM chip at address 0 always has only one bank. In an emulation it is usual to place the code of bank 1 behind the 4k code of bank 0, thus your emulator code in C could look like this. Code:
When executing any instruction you have to get the opcode from the actual selected ROM bank like this: Code:
I hope this could help you to understand bank switching in the HP-67/97. By the way, if you emulate 6 classic calculators, you have the complete set 35/45/55/65/70/80. I would be interested in having the HP-70 microcode. As far as I know this code has never been extracted? Do I miss something? Bernhard That's one small step for a man - one giant leap for mankind. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)