commit a557be8
Devine Lu Linvega
·
2024-12-16 17:51:29 +0000 UTC
parent 9100a6a
Updated opcode test
2 files changed,
+22,
-6
+21,
-5
1@@ -53,6 +53,13 @@
2 [ LIT2 "5 18 ] DEO #0a18 DEO
3
4 ( part 6
5+ > JSR2: Jump to subroutine from short pointer
6+ > LDAk: Non-destructive load byte from absolute address )
7+
8+ { "Ok $1 } STH2r ;pstr-jcn JSR2
9+ [ LIT2 "6 18 ] DEO #0a18 DEO
10+
11+ ( part xx
12 > GTH2k: Non-destructive greater-than short
13 > LDA2k: Non-destructive load short from absolute address
14 > STA2: Store short at absolute address )
15@@ -66,7 +73,7 @@
16 STH2r ;tests/end ;tests SUB2 #01 SFT2
17 EQU2 ;Dict/opctests test-part
18
19- ( Part 7
20+ ( Part xx
21 > Testing that stacks are circular and wrapping
22 > Storing 12 at -1 and 34 at 0 )
23
24@@ -78,7 +85,7 @@
25
26 ( restore stack ) #0000 #0000
27
28- ( Part 8
29+ ( Part xx
30 > Testing RAM wrapping
31 > Storing 12 in 0xffff, and 34 in 0x0000 )
32
33@@ -87,7 +94,7 @@
34 ( LDA2 ) #ffff LDA2 ADD #46 EQU
35 AND ;Dict/ram-wrap test-part
36
37- ( Part 9
38+ ( Part xx
39 > Testing that zero-page is wrapping )
40
41 #5678 #ff STZ2
42@@ -95,7 +102,7 @@
43 ( LDZ2 ) #ff LDZ2 ADD #ce EQU
44 AND ;Dict/zp-wrap test-part
45
46- ( Part 10
47+ ( Part xx
48 > Testing that device page is wrapping )
49
50 #1234 #ff DEO2
51@@ -115,11 +122,14 @@
52
53 BRK
54
55+(
56+@|metadata )
57+
58 @meta 00
59 ( name ) "Opctest 0a
60 ( details ) "A 20 "Testing 20 "Program 0a
61 ( author ) "By 20 "Devine 20 "Lu 20 "Linvega 0a
62- ( date ) "18 20 "Feb 20 "2024 $2
63+ ( date ) "15 20 "Dec 20 "2024 $2
64
65 @test-part ( f name* -- )
66 pstr ?{
67@@ -154,6 +164,12 @@ JMP2r
68 #18 DEO
69 INC2 !pstr
70
71+@pstr-jcn ( str* -- )
72+ LDAk #18 DEO
73+ INC2 LDAk ,pstr-jcn JCN
74+ POP2
75+ JMP2r
76+
77 @tests
78 =op-equ [
79 =op-equ/a =op-equ/b =op-equ/c =op-equ/d
M
makefile
+1,
-1
1@@ -38,7 +38,7 @@ format:
2 lint:
3 @ bin/uxncli ~/roms/uxnlin.rom
4 grab:
5- @ cp ../uxn-utils/cli/opctest/opctest.tal etc/opctest.tal
6+ @ cp ../uxn-utils/cli/opctest/src/opctest.tal etc/opctest.tal
7 archive:
8 @ cp src/uxnasm.c ../oscean/etc/uxnasm.c.txt
9 @ cp src/uxncli.c ../oscean/etc/uxncli.c.txt