Post Reply 
NQ41 Emulator program testing
02-17-2019, 09:28 PM
Post: #1
NQ41 Emulator program testing
I'm developing tests for the next version of NQ41. These tests run on the HP-41C and then run on NQ41 to see that the operation is the same. I've included an example below. I'm interested in suggestions regarding other programs that would be useful for validating the emulator. NQ41's numerical precision is different from the 41's so demonstrating equivalence in this area is not necessary.


This code performs various GTOs and XEQs and leaves a "1" in the X register if successful.

Code:

LBL "LBLTEST"
0
GTO 01
LBL "CCC"
2
+
GTO IND X
LBL 01
1
+
GTO "CCC"
LBL 03
4
+
STO 01
GTO IND 01
LBL 07
8
+
XEQ "a"
XEQ IND X
XEQ IND 02
XEQ 13
255
X=Y?
GTO 99
0
STOP
LBL 99
1
STOP
LBL 13
128
+
RTN
LBL 31
12
STO 02
RDN
32
+
RTN
LBL "a"
16
+
RTN
LBL 12
64
+
RTN

Try CC41!
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)