HP 42S: Difference between revisions

1,500 bytes added ,  10:49, 3 February 2022
2 known bugs for HP-42s.
m (added an image)
(2 known bugs for HP-42s.)
Line 21: Line 21:
Like other Pioneers, HP 42s ships with a debugger and self-test routine.
Like other Pioneers, HP 42s ships with a debugger and self-test routine.


== Known Bugs ==
There are only two known bugs on the HP 42s.
There are only two known bugs on the HP 42s.
The first HP-42s bug relates to the COMB (combination) and PERM (permutation) instructions. Nominally these two instructions calculates C(y,x) = y!/(x!*(y-x)!) and P(y,x) = y!/(y-x)!. Since factorial is strictly positive, an input of x<y correctly raises "Invalid Data" error. However this error flag is not correctly cleared, for example when using x<>y and executing the respective command again, and will require an arbitrary arithmetic operation to correctly clear (for example 0 +). This bug has been reported in all revisions except some mid-serial-range revision A machines, and is believed to be a software-hardware interfacing issue. A simple workaround is to always to prepend the command with x<y? x<>y (check if x<y and swap if true).
The second HP-42s bug is far more interesting: All register values are stored in a matrix called "REGS" on HP-42s. If one were to delete this matrix and then execute a statistic input (i.e. CLV "REGS" then Sigma+), forcing an "Invalid Type" error, RCL and STO in this state will, instead of recalling and storing to registers, directly read from and write to memory. The memory location RCL will read from is calculated as (RegisterNbr + 184) x 16 converted to hexadecimal, and the location STO will write to is (RegisterNbr x 2 + 184) x 16. Sometimes the offset is also reported as +183 which is due to how resgister on HP-42s is numbered from 00 to 99 and up to the value in SIZE. In that case R00 would count as register 1.


== Hardware Mods ==
== Hardware Mods ==
Line 29: Line 34:
<nowiki>*</nowiki>note: the top row of keys are customarily labeled A-F from left to right.
<nowiki>*</nowiki>note: the top row of keys are customarily labeled A-F from left to right.


HP 42s has two resets: Master reset which puts the calculator back to "factory condition", clearing all memory with On+A+F and Machine reset with On+C which interrupts any program, clears certain flags and set the calculator into a state ready to receive user input again. As with the HP 27S and HP 17B, the self test is triggered with On+D. On the first screen of the self test routine hitting backspace (<-) will put the calculator in debugger. In this state the Up/Down keys, divide/multiply keys, plus/minus keys can be used to increment or decrement the current memory address by 1000,100 and 1 nybble(s) respectively.
HP 42s has two resets: Master reset which puts the calculator back to "factory condition", clearing all memory with On+A+F and Machine reset with On+C which interrupts any program, clears certain flags and sets the calculator into a state ready to receive user input again. As with the HP 27S and HP 17B, the self test is triggered with On+D. On the first screen of the self test routine hitting backspace (<-) will put the calculator in debugger. In this state the Up/Down keys, Divide/Multiply keys, Add/Substraction keys can be used to increment or decrement the current memory address by 1000,100 and 1 nybble(s) respectively.
60

edits