commit 3d8fa02
Devine Lu Linvega
·
2025-08-21 18:00:48 +0000 UTC
parent 7868e05
Improved system test
1 files changed,
+20,
-8
+20,
-8
1@@ -1,10 +1,20 @@
2 ( uxncli system.rom )
3
4-|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1
5+|00 @System/vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1
6 |100
7
8 @on-reset ( -> )
9 #800f DEO
10+ ( | wst )
11+ #12 .System/wst DEI #01 EQU ?{
12+ ;dict/wst1 <test>/fail
13+ BRK }
14+ ;dict/wst1 <test>/pass
15+ ( | rst )
16+ LITr 12 .System/rst DEI #01 EQU ?{
17+ ;dict/rst1 <test>/fail
18+ BRK }
19+ ;dict/rst1 <test>/pass
20 ( | copy left )
21 ;buf #0006 ADD2 ;mmu-cpyl/a STA2
22 ;buf #0003 ADD2 ;mmu-cpyl/b STA2
23@@ -31,13 +41,13 @@
24
25 @<test> ( name* f -- )
26 ?{
27- <pstr> #010f DEO ;dict/fail !<pstr> }
28- <pstr> ;dict/pass !<pstr>
29+ &fail str/<print> #010f DEO ;dict/fail !str/<print> }
30+ &pass str/<print> ;dict/pass !str/<print>
31
32-@<pstr> ( str* -- )
33- LDAk #18 DEO
34- INC2 LDAk ?<pstr>
35- POP2 JMP2r
36+@str/<print> ( str* -- )
37+ LDAk DUP ?{ POP POP2 JMP2r }
38+ #18 DEO
39+ INC2 !/<print>
40
41 @mem/cmp ( a* length* b* -- t )
42 STH2
43@@ -48,6 +58,8 @@
44 POP2r EQU2 JMP2r
45
46 @dict
47+ &wst1 "System/wst: 20 $1
48+ &rst1 "System/rst: 20 $1
49 &cpyl "System/cpyl: 20 $1
50 &cpyr "System/cpyr: 20 $1
51 &fill "System/fill: 20 $1
52@@ -55,7 +67,7 @@
53 &pass "pass 0a $1
54 &fail "fail 0a $1
55
56-@buf [ "......[hello]..... $1 ]
57+@buf [ "......[hello]..... $1 ]
58 @res1 [ "...[hello]lo]..... $1 ]
59 @res2 [ "...[hello[hello].. $1 ]
60 @res3 [ "...[he[hello]lo].. $1 ]