HP-71 Diagnostics
|
06-08-2020, 06:50 PM
Post: #15
|
|||
|
|||
RE: HP-71 Diagnostics
(06-08-2020 06:22 PM)KimH Wrote: It is the same - i did walk through all the lines, xxx46 is the Checksum. The problem with the Diag ROM is that it is a take-over ROM, disabling the internal system ROMs. And moreover, it generates a Module Pulled interrupt as soon as it is inserted, so you can't just have a loop in asm waiting for the insertion (I tried at the time). The trick is that interrupt is masked IF the CPU is already servicing an interrupt. And there is an easy way: pressing a key generates an interrupt, as long as the CPU is in the keyboard servicing routine, it can't be interrupted again. The interrupt code is in ROM, but there is a hook with the code to give a chance to an application to takeover the key processing. So the solution is to install a piece of code, redirect the hook to it, and press a key. The CPU is now in our code with interrupt masked. The diag module can be inserted, it will disable the system ROM but will not take over, and our piece of code can copy the diag rom to a safe place (I used a IRAM port) where it will survive the next memory lost that will happen when the diag rom will be removed. Here is the piece of code: Code:
J-F |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)