Hi!
I have recently started to look at the possibility to program the HP-42S in Saturn Assembly. One of the first tasks I have been been trying to achieve is to return safely to the RPN context from the language ROM area, called by the XFCN (therefore the subject of this posting: "Do nothing at $20005").
The snippet below seems to work fine in Emu42 (I have also tested it on a rev A HP-42S with the 2 x 32K RAM upgrade as suggested by Nelson M Sicuro), but is this the correct way to do this?
* Language ROM Detect Constant
CON(5) #5AC3F
* Return to RPN context, drop one stack level
A=C A
C=RSTK
C=A A
A=DAT0 A
D0=D0+ 5
* Rev A = 10D5F, Rev C = 10DE1
GOVLNG #10D5F
Or just entered directly into the monitor:
20000: F3CA5DA07D61421648DF5D01 (Rev A)
20000: F3CA5DA07D61421648D1ED01 (Rev C)
Best regards,
Erik Ehrling (Sweden)
Homepage:http://www.hp42s.com