-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtest.FAST.z80
108 lines (98 loc) · 2.47 KB
/
test.FAST.z80
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
.engine mycomputer
.include "constants.asm"
.include "test.fast.mac.asm"
.include "IOSerial.asm"
JP testsStart
.include "MAIN.asm"
.include "ram.asm"
.org $4000
testsStart:
test "1", 1
test "0", 0
test "10", 10
test "#10", $10
test "#FF", $FF
test "2 3=", FALSE
test "3 3=", TRUE
test "2 3<", TRUE
test "3 3<", FALSE
test "3 3>", FALSE
test "4 3>", TRUE
test "0~", TRUE
test "1 2+", 3
test "123 456+", 123+456
test "64 128+", 64+128
test "5 3-", 2
test "-1 2+",1
test "-1 1+",0
test "#FFFF 1 + /c +", 1
test "0 1 - /c +", 0
test "3 5&", 1
test "3 5|", 7
test "1{", 2
test "1}", 0
test "2}", 1
test "1 2 3 ' +", 3
test "2 3*", 6
test "1 2 3+*", 5
test "#8001 2 * /r +", 3
test "1 2 /D", 2
test "7 2/", 3
test "7 2/' /r", 1
test "1 1/", 1
test "-1 1/", -1
test "1 -1/", -1
test "-1 -1/", 1
test "3 5$ -", 2
test "2 3%++", 7
test "2a!a",2
test "3x! 1 x+x! x", 4
test "3x! -1 x+x! x", 2
test ":X1; X", 1
test ":A100;A", 100
test ":Aa!; 3A a", 3
test ":Aa!;:Ba;4AB", 4
test ":@2; /G", 2
test "[]", heap+2
test "[1]", heap+2
test "[]/S", 0
test "[3]/S", 1
test "[3]0?", 3
test "[1 2 3]1?", 2
test "[1 [2]] 1? 0?", 2
test "/h[1]'/h$-", 4
test "/h[1 2 3]'/h$-", 8
test "\\[3]/S", 1
test "\\[3] 0\\?", 3
test "\\[1 2 3] 0\\?", 1
test "\\[1 2 3] 1\\?", 2
test "/h \\[1 2 3] ' /h $ -", 2+3
test "/h \\[1] ' /h $ -", 2+1
test "/h 1000/A ' /h $ -", 1000
test "0 0(1+)", 0
test "0 1(1+)", 1
test "0 2(1+)", 2
test "0 1(0(1+))", 0
test "0 1(1(1+))", 1
test "0 2(1(1+))", 2
test "0 2(2(1+))", 4
test "0 1(/i+)", 0
test "0 0(/i+)", 0
test "0 5(/i+)", 10
test "0 /U(/i5</W 1+)", 5
test "0 /U(1+/i4</W)", 5
test "0t! 10(1 t+t!) t",10
test "0t! 2(2(/i /j + t + t! )) t", 4
test "/F(100)/E(200)",200
test "/T(100)/E(200)",100
test "0t! 10(t1+t!) t",10
test "0t! 2(2(/i /j + t + t! )) t", 4
test "0t! 10(/i 5</W /i 1 t+t!) t",5
test "0t! [1 2 3] a! a/S (a /i? t+t!) t", 6
test ":@ 1 ; /G", 1
test ":@ 1+ ; a! 3 a /G",4
test "[:@ 10 ;] 0? /G", 10
test "[:@ 10 ; :@ 20 ; :@ 30 ;] 2? /G",30
test "1 2 /D", 2
print "Done!"
HALT