Browse code

Minor changes to the asm syntax

neauoire authored on 13/02/2021 16:38:23
Showing 13 changed files
... ...
@@ -42,12 +42,12 @@ evaluxn(u, u->vframe); /* Each frame
42 42
 - `( comment )`, toggle parsing on/off.
43 43
 - `|0010`, move to position in the program.
44 44
 - `"hello`, push literal bytes for word "hello".
45
-- `#04`, a zero-page address, equivalent to `,0004`.
46 45
 
47 46
 ### Operator modes
48 47
 
49
-- `,1234 ,0001 ADD^`, 16-bits operators have the short flag `^`.
48
+- `,1234 ,0001 ADD2`, 16-bits operators have the short flag `2`.
50 49
 - `,12 ,11 GTH JMP?`, conditional operators have the cond flag `?`.
50
+- `+21 -03 MULS`, signed operators have the cond flag `S`.
51 51
 
52 52
 ```
53 53
 ( hello world )
... ...
@@ -101,8 +101,8 @@ findoperator(char *s)
101 101
 		if(o[0] != s[0] || o[1] != s[1] || o[2] != s[2])
102 102
 			continue;
103 103
 		while(s[3 + m]) {
104
-			if(s[3 + m] == '^') i |= (1 << 5); /* mode: 16 bits */
105
-			if(s[3 + m] == '!') i |= (1 << 6); /* mode: signed */
104
+			if(s[3 + m] == '2') i |= (1 << 5); /* mode: short */
105
+			if(s[3 + m] == 'S') i |= (1 << 6); /* mode: signed */
106 106
 			if(s[3 + m] == '?') i |= (1 << 7); /* mode: conditional */
107 107
 			m++;
108 108
 		}
... ...
@@ -128,6 +128,8 @@ makelabel(char *name, Uint16 addr)
128 128
 		return error("Label duplicate", name);
129 129
 	if(sihx(name))
130 130
 		return error("Label name is hex number", name);
131
+	if(findoperator(name))
132
+		return error("Label name is invalid", name);
131 133
 	l = &labels[labelslen++];
132 134
 	l->addr = addr;
133 135
 	scpy(name, l->name, 64);
... ...
@@ -178,7 +180,6 @@ pass1(FILE *f)
178 180
 			switch(w[0]) {
179 181
 			case '|': addr = shex(w + 1); break;
180 182
 			case '"': addr += slen(w + 1) + 2; break;
181
-			case '#': addr += 4; break;
182 183
 			case '.': addr += 2; break;
183 184
 			case '+': /* signed positive */
184 185
 			case '-': /* signed negative */
... ...
@@ -213,7 +214,6 @@ pass2(FILE *f)
213 214
 		else if(w[0] == '-' && sihx(w + 1) && slen(w + 1) == 2) pushbyte((Sint8)(shex(w + 1) * -1), 1);
214 215
 		else if(w[0] == '-' && sihx(w + 1) && slen(w + 1) == 4) pushshort((Sint16)(shex(w + 1) * -1), 1);
215 216
 		else if(w[0] == '"') pushtext(w + 1);
216
-		else if(w[0] == '#') pushshort(shex(w + 1) & 0xff, 1);
217 217
 		else if((l = findlabel(w + 1))) pushshort(l->addr, w[0] == ',');
218 218
 		else if((op = findoperator(w)) || scmp(w, "BRK")) pushbyte(op, 0);
219 219
 		else if(sihx(w + 1) && slen(w + 1) == 2) pushbyte(shex(w + 1), w[0] == ',');
... ...
@@ -13,25 +13,25 @@
13 13
 ,12 ,13 LTH #07 STR
14 14
 
15 15
 ( arithmetic 16-bit )
16
-,1234 ,2345 ADD^ ,3579 EQU^ #08 STR
17
-,1234 ,0123 SUB^ ,1111 EQU^ #09 STR
18
-,1234 ,0102 MUL^ ,5868 EQU^ #0a STR
19
-,5678 ,0100 DIV^ ,0056 EQU^ #0b STR
20
-,1234 ,1234 EQU^ #0c STR
21
-,1234 ,0123 NEQ^ #0d STR
22
-,1234 ,1233 GTH^ #0e STR
23
-,1234 ,1235 LTH^ #0f STR
16
+,1234 ,2345 ADD2 ,3579 EQU2 #08 STR
17
+,1234 ,0123 SUB2 ,1111 EQU2 #09 STR
18
+,1234 ,0102 MUL2 ,5868 EQU2 #0a STR
19
+,5678 ,0100 DIV2 ,0056 EQU2 #0b STR
20
+,1234 ,1234 EQU2 #0c STR
21
+,1234 ,0123 NEQ2 #0d STR
22
+,1234 ,1233 GTH2 #0e STR
23
+,1234 ,1235 LTH2 #0f STR
24 24
 
25 25
 BRK
26 26
 
27 27
 @diff8 ( result of abs sub )
28
-	OVR OVR GTH ,diff8sub ROT JMP? POP^
28
+	OVR OVR GTH ,diff8sub ROT JMP? POP2
29 29
 	SWP @diff8sub SUB
30 30
 RTS
31 31
 
32 32
 @diff16 ( result of abs sub16 )
33
-	OVR^ OVR^ GTH^ ,diff16sub ROT JMP? POP^
34
-	SWP^ @diff16sub SUB^
33
+	OVR2 OVR2 GTH2 ,diff16sub ROT JMP? POP2
34
+	SWP2 @diff16sub SUB2
35 35
 RTS
36 36
 
37 37
 |c000 @FRAME BRK 
... ...
@@ -2,7 +2,7 @@
2 2
 
3 3
 |0100 @RESET
4 4
 
5
-,06 ,05 GTH ,there ROT JMP? POP^
5
+,06 ,05 GTH ,there ROT JMP? POP2
6 6
 
7 7
 @here ( when lesser or equal )
8 8
 	,ee
... ...
@@ -42,18 +42,18 @@
42 42
 
43 43
 	( positive )
44 44
 	,01 ,color STR
45
-	+0030 ,x0 STR^ +0040 ,y0 STR^
46
-	+0100 ,x1 STR^ +0060 ,y1 STR^
45
+	+0030 ,x0 STR2 +0040 ,y0 STR2
46
+	+0100 ,x1 STR2 +0060 ,y1 STR2
47 47
 	,line JSR
48 48
 
49 49
 	,02 ,color STR
50
-	+0020 ,x0 STR^ +0010 ,y0 STR^
51
-	+0090 ,x1 STR^ +0070 ,y1 STR^
50
+	+0020 ,x0 STR2 +0010 ,y0 STR2
51
+	+0090 ,x1 STR2 +0070 ,y1 STR2
52 52
 	,line JSR
53 53
 
54 54
 	,03 ,color STR
55
-	+0010 ,x0 STR^ +0040 ,y0 STR^
56
-	+0070 ,x1 STR^ +0060 ,y1 STR^
55
+	+0010 ,x0 STR2 +0040 ,y0 STR2
56
+	+0070 ,x1 STR2 +0060 ,y1 STR2
57 57
 	,line JSR
58 58
 
59 59
 	,redraw JSR
... ...
@@ -61,68 +61,68 @@
61 61
 BRK
62 62
 
63 63
 @fillrect
64
-	,h STR^ ,w STR^ ,y STR^ ,x STR^
65
-	,x LDR^ ,x_ STR^ ,y LDR^ ,y_ STR^
64
+	,h STR2 ,w STR2 ,y STR2 ,x STR2
65
+	,x LDR2 ,x_ STR2 ,y LDR2 ,y_ STR2
66 66
 	@fillrectrow
67
-		,x LDR^ ,x_ STR^
67
+		,x LDR2 ,x_ STR2
68 68
 		@fillrectcol
69
-			( draw ) ,x_ LDR^ ,y_ LDR^ ,putpixel JSR
70
-			,x_ LDR^ ,0001 ADD^ ,x_ STR^ 
71
-			,x_ LDR^ ,w LDR^ ,x LDR^ ADD^ LTH^ ,fillrectcol ROT JMP? POP^
72
-		,y_ LDR^ ,0001 ADD^ ,y_ STR^ 
73
-		,y_ LDR^ ,h LDR^ ,y LDR^ ADD^ LTH^ ,fillrectrow ROT JMP? POP^
69
+			( draw ) ,x_ LDR2 ,y_ LDR2 ,putpixel JSR
70
+			,x_ LDR2 ,0001 ADD2 ,x_ STR2 
71
+			,x_ LDR2 ,w LDR2 ,x LDR2 ADD2 LTH2 ,fillrectcol ROT JMP? POP2
72
+		,y_ LDR2 ,0001 ADD2 ,y_ STR2 
73
+		,y_ LDR2 ,h LDR2 ,y LDR2 ADD2 LTH2 ,fillrectrow ROT JMP? POP2
74 74
 	RTS
75 75
 
76 76
 @linerect
77
-	,h STR^ ,w STR^ ,y STR^ ,x STR^
78
-	,x LDR^ ,x_ STR^ ,y LDR^ ,y_ STR^
77
+	,h STR2 ,w STR2 ,y STR2 ,x STR2
78
+	,x LDR2 ,x_ STR2 ,y LDR2 ,y_ STR2
79 79
 	@linerectcol
80
-		( draw ) ,x LDR^ ,y_ LDR^ ,putpixel JSR
81
-		( draw ) ,x LDR^ ,w LDR^ ADD^ ,y_ LDR^ ,putpixel JSR
82
-		,y_ LDR^ ,0001 ADD^ ,y_ STR^ 
83
-		,y_ LDR^ ,h LDR^ ,y LDR^ ADD^ LTH^ ,linerectcol ROT JMP? POP^
80
+		( draw ) ,x LDR2 ,y_ LDR2 ,putpixel JSR
81
+		( draw ) ,x LDR2 ,w LDR2 ADD2 ,y_ LDR2 ,putpixel JSR
82
+		,y_ LDR2 ,0001 ADD2 ,y_ STR2 
83
+		,y_ LDR2 ,h LDR2 ,y LDR2 ADD2 LTH2 ,linerectcol ROT JMP? POP2
84 84
 	@linerectrow
85
-		( draw ) ,x_ LDR^ ,y LDR^ ,putpixel JSR
86
-		( draw ) ,x_ LDR^ ,y LDR^ ,h LDR^ ADD^ ,putpixel JSR
87
-		,x_ LDR^ ,0001 ADD^ ,x_ STR^ 
88
-		,x_ LDR^ ,w LDR^ ,x LDR^ ADD^ ,0001 ADD^ LTH^ ,linerectrow ROT JMP? POP^
85
+		( draw ) ,x_ LDR2 ,y LDR2 ,putpixel JSR
86
+		( draw ) ,x_ LDR2 ,y LDR2 ,h LDR2 ADD2 ,putpixel JSR
87
+		,x_ LDR2 ,0001 ADD2 ,x_ STR2 
88
+		,x_ LDR2 ,w LDR2 ,x LDR2 ADD2 ,0001 ADD2 LTH2 ,linerectrow ROT JMP? POP2
89 89
 	RTS
90 90
 
91 91
 @line
92
-	,x0 LDR^ ,x_ STR^ ,y0 LDR^ ,y_ STR^                   ( start at x0,y0 )
93
-	,x1 LDR^ ,x0 LDR^ ,diff16sub JSR ,dx STR^             ( int dx = abs[x1 - x0] )
94
-	,y1 LDR^ ,y0 LDR^ ,diff16sub JSR -0001 MUL!^ ,dy STR^ ( int dy = -abs[y1 - y0] )
95
-	,dx LDR^ ,dy LDR^ ADD!^ ,err1 STR^                    ( int err1 = dx + dy, e2; )
92
+	,x0 LDR2 ,x_ STR2 ,y0 LDR2 ,y_ STR2                   ( start at x0,y0 )
93
+	,x1 LDR2 ,x0 LDR2 ,diff16sub JSR ,dx STR2             ( int dx = abs[x1 - x0] )
94
+	,y1 LDR2 ,y0 LDR2 ,diff16sub JSR -0001 MULS2 ,dy STR2 ( int dy = -abs[y1 - y0] )
95
+	,dx LDR2 ,dy LDR2 ADDS2 ,err1 STR2                    ( int err1 = dx + dy, e2; )
96 96
 	@lineloop
97
-	,x_ LDR^ ,y_ LDR^ ,putpixel JSR                       ( draw )
97
+	,x_ LDR2 ,y_ LDR2 ,putpixel JSR                       ( draw )
98 98
 	@line-x
99
-	,err1 LDR^ +0002 MUL!^ ,err2 STR^                     ( e2 = 2 * err; )
100
-	,err2 LDR^ ,dy LDR^ LTH!^ ,line-y ROT JMP? POP^ 	  ( e2 >= dy )
101
-		,err1 LDR^ ,dy LDR^ ADD!^ ,err1 STR^ 			  ( err1 += dy; )
102
-		,x_ LDR^ +0001 ADD!^ ,x_ STR^                     ( y0 += y0 < y1 ? 1 : -1; )
99
+	,err1 LDR2 +0002 MULS2 ,err2 STR2                     ( e2 = 2 * err; )
100
+	,err2 LDR2 ,dy LDR2 LTHS2 ,line-y ROT JMP? POP2 	  ( e2 >= dy )
101
+		,err1 LDR2 ,dy LDR2 ADDS2 ,err1 STR2 			  ( err1 += dy; )
102
+		,x_ LDR2 +0001 ADDS2 ,x_ STR2                     ( y0 += y0 < y1 ? 1 : -1; )
103 103
 	@line-y
104
-	,err2 LDR^ ,dx LDR^ GTH!^ ,line-end ROT JMP? POP^     ( e2 <= dx )
105
-		,err1 LDR^ ,dx LDR^ ADD!^ ,err1 STR^              ( err1 += dx; )
106
-		,y_ LDR^ +0001 ADD!^ ,y_ STR^                     ( y0 += y0 < y1 ? 1 : -1; )
104
+	,err2 LDR2 ,dx LDR2 GTHS2 ,line-end ROT JMP? POP2     ( e2 <= dx )
105
+		,err1 LDR2 ,dx LDR2 ADDS2 ,err1 STR2              ( err1 += dx; )
106
+		,y_ LDR2 +0001 ADDS2 ,y_ STR2                     ( y0 += y0 < y1 ? 1 : -1; )
107 107
 	@line-end
108
-	,x_ LDR^ ,x1 LDR^ NEQ!^ ,lineloop ROT JMP? POP^       ( loop )
108
+	,x_ LDR2 ,x1 LDR2 NEQS2 ,lineloop ROT JMP? POP2       ( loop )
109 109
 	RTS
110 110
 
111 111
 @diff16
112
-	OVR^ OVR^ GTH^ ,diff16sub ROT JMP? POP^
113
-	SWP^ @diff16sub SUB^
112
+	OVR2 OVR2 GTH2 ,diff16sub ROT JMP? POP2
113
+	SWP2 @diff16sub SUB2
114 114
 RTS
115 115
 
116 116
 @redraw
117
-	,0000 IOW^
118
-	,0000 IOW^
117
+	,0000 IOW2
118
+	,0000 IOW2
119 119
 	,00 IOW
120 120
 	,01 IOW
121 121
 	RTS
122 122
 
123 123
 @putpixel 
124
-	IOW^ ( y short )
125
-	IOW^ ( x short )
124
+	IOW2 ( y short )
125
+	IOW2 ( x short )
126 126
 	,color LDR IOW  ( color byte )
127 127
 	,00 IOW  ( redraw byte )
128 128
 	RTS
... ...
@@ -18,7 +18,7 @@
18 18
 
19 19
 BRK
20 20
 
21
-@strlen ,0001 ADD^ LDR RTS
21
+@strlen ,0001 ADD2 LDR RTS
22 22
 @incr ,i LDR ,01 ADD ,i STR RTS
23 23
 
24 24
 |c000 @FRAME BRK 
... ...
@@ -13,66 +13,66 @@
13 13
 
14 14
 	( positive )
15 15
 	,01 ,color STR
16
-	+0030 ,x0 STR^ +0040 ,y0 STR^
17
-	+0100 ,x1 STR^ +0060 ,y1 STR^
16
+	+0030 ,x0 STR2 +0040 ,y0 STR2
17
+	+0100 ,x1 STR2 +0060 ,y1 STR2
18 18
 	,line JSR
19 19
 
20 20
 	,02 ,color STR
21
-	+0020 ,x0 STR^ +0010 ,y0 STR^
22
-	+0090 ,x1 STR^ +0070 ,y1 STR^
21
+	+0020 ,x0 STR2 +0010 ,y0 STR2
22
+	+0090 ,x1 STR2 +0070 ,y1 STR2
23 23
 	,line JSR
24 24
 
25 25
 	,03 ,color STR
26
-	+0010 ,x0 STR^ +0040 ,y0 STR^
27
-	+0070 ,x1 STR^ +0060 ,y1 STR^
26
+	+0010 ,x0 STR2 +0040 ,y0 STR2
27
+	+0070 ,x1 STR2 +0060 ,y1 STR2
28 28
 	,line JSR
29 29
 
30 30
 	( draw control points )
31 31
 	,02 ,color STR
32
-	,x0 LDR^ ,y0 LDR^ ,putpixel JSR
33
-	,x1 LDR^ ,y1 LDR^ ,putpixel JSR
32
+	,x0 LDR2 ,y0 LDR2 ,putpixel JSR
33
+	,x1 LDR2 ,y1 LDR2 ,putpixel JSR
34 34
 
35 35
 	,redraw JSR
36 36
 
37 37
 BRK
38 38
 
39 39
 @line
40
-	,x0 LDR^ ,x_ STR^ ,y0 LDR^ ,y_ STR^                   ( start at x0,y0 )
41
-	,x1 LDR^ ,x0 LDR^ ,diff16sub JSR ,dx STR^             ( int dx = abs[x1 - x0] )
42
-	,y1 LDR^ ,y0 LDR^ ,diff16sub JSR -0001 MUL!^ ,dy STR^ ( int dy = -abs[y1 - y0] )
43
-	,dx LDR^ ,dy LDR^ ADD!^ ,err1 STR^                    ( int err1 = dx + dy, e2; )
40
+	,x0 LDR2 ,x_ STR2 ,y0 LDR2 ,y_ STR2                   ( start at x0,y0 )
41
+	,x1 LDR2 ,x0 LDR2 ,diff16sub JSR ,dx STR2             ( int dx = abs[x1 - x0] )
42
+	,y1 LDR2 ,y0 LDR2 ,diff16sub JSR -0001 MULS2 ,dy STR2 ( int dy = -abs[y1 - y0] )
43
+	,dx LDR2 ,dy LDR2 ADDS2 ,err1 STR2                    ( int err1 = dx + dy, e2; )
44 44
 	@lineloop
45
-	,x_ LDR^ ,y_ LDR^ ,putpixel JSR                       ( draw )
45
+	,x_ LDR2 ,y_ LDR2 ,putpixel JSR                       ( draw )
46 46
 	@line-x
47
-	,err1 LDR^ +0002 MUL!^ ,err2 STR^                     ( e2 = 2 * err; )
48
-	,err2 LDR^ ,dy LDR^ LTH!^ ,line-y ROT JMP? POP^ 	  ( e2 >= dy )
49
-		,err1 LDR^ ,dy LDR^ ADD!^ ,err1 STR^ 			  ( err1 += dy; )
50
-		,x_ LDR^ +0001 ADD!^ ,x_ STR^                     ( y0 += y0 < y1 ? 1 : -1; )
47
+	,err1 LDR2 +0002 MULS2 ,err2 STR2                     ( e2 = 2 * err; )
48
+	,err2 LDR2 ,dy LDR2 LTHS2 ,line-y ROT JMP? POP2 	  ( e2 >= dy )
49
+		,err1 LDR2 ,dy LDR2 ADDS2 ,err1 STR2 			  ( err1 += dy; )
50
+		,x_ LDR2 +0001 ADDS2 ,x_ STR2                     ( y0 += y0 < y1 ? 1 : -1; )
51 51
 	@line-y
52
-	,err2 LDR^ ,dx LDR^ GTH!^ ,line-end ROT JMP? POP^     ( e2 <= dx )
53
-		,err1 LDR^ ,dx LDR^ ADD!^ ,err1 STR^              ( err1 += dx; )
54
-		,y_ LDR^ +0001 ADD!^ ,y_ STR^                     ( y0 += y0 < y1 ? 1 : -1; )
52
+	,err2 LDR2 ,dx LDR2 GTHS2 ,line-end ROT JMP? POP2     ( e2 <= dx )
53
+		,err1 LDR2 ,dx LDR2 ADDS2 ,err1 STR2              ( err1 += dx; )
54
+		,y_ LDR2 +0001 ADDS2 ,y_ STR2                     ( y0 += y0 < y1 ? 1 : -1; )
55 55
 	@line-end
56
-	,x_ LDR^ ,x1 LDR^ NEQ!^ ,lineloop ROT JMP? POP^       ( loop )
56
+	,x_ LDR2 ,x1 LDR2 NEQS2 ,lineloop ROT JMP? POP2       ( loop )
57 57
 	RTS
58 58
 
59 59
 @redraw
60
-	,0000 IOW^
61
-	,0000 IOW^
60
+	,0000 IOW2
61
+	,0000 IOW2
62 62
 	,00 IOW
63 63
 	,01 IOW
64 64
 	RTS
65 65
 
66 66
 @putpixel 
67
-	IOW^ ( y short )
68
-	IOW^ ( x short )
67
+	IOW2 ( y short )
68
+	IOW2 ( x short )
69 69
 	,color LDR IOW  ( color byte )
70 70
 	,00 IOW  ( redraw byte )
71 71
 	RTS
72 72
 
73 73
 @diff16
74
-	OVR^ OVR^ GTH^ ,diff16sub ROT JMP? POP^
75
-	SWP^ @diff16sub SUB^
74
+	OVR2 OVR2 GTH2 ,diff16sub ROT JMP? POP2
75
+	SWP2 @diff16sub SUB2
76 76
 RTS
77 77
 
78 78
 |c000 @FRAME BRK 
... ...
@@ -8,14 +8,14 @@
8 8
 
9 9
 @loop1
10 10
 	,01 ADD DUP
11
-	,ff NEQ ,loop1 ROT JMP? POP^
11
+	,ff NEQ ,loop1 ROT JMP? POP2
12 12
 
13 13
 ( increment value in memory )
14 14
 
15 15
 @loop2
16 16
 	#00 LDR ,01 ADD #00 STR
17 17
 	#00 LDR 
18
-	,ff NEQ ,loop2 ROT JMP? POP^
18
+	,ff NEQ ,loop2 ROT JMP? POP2
19 19
 
20 20
 BRK
21 21
 
... ...
@@ -25,13 +25,13 @@ BRK
25 25
 BRK
26 26
 
27 27
 @getmouse
28
-	,00 IOR^ ( get mouse x )
29
-	,02 IOR^ ( get mouse y )
28
+	,00 IOR2 ( get mouse x )
29
+	,02 IOR2 ( get mouse y )
30 30
 	RTS
31 31
 
32 32
 @putpixel 
33
-	IOW^ ( y short )
34
-	IOW^ ( x short )
33
+	IOW2 ( y short )
34
+	IOW2 ( x short )
35 35
 	IOW ( color byte )
36 36
 	IOW ( redraw byte )
37 37
 	RTS
... ...
@@ -10,13 +10,13 @@
10 10
 
11 11
 	,01 ,dev/w STR 
12 12
 
13
-	,0020 ,x STR^ ( set x-pos )
14
-	,0030 ,y STR^ ( set y-pos )
13
+	,0020 ,x STR2 ( set x-pos )
14
+	,0030 ,y STR2 ( set y-pos )
15 15
 
16 16
 	( IOW will now send to screen ) 
17 17
 
18
-	,y LDR^ IOW^ ( y-pos )
19
-	,x LDR^ IOW^ ( x-pos )
18
+	,y LDR2 IOW2 ( y-pos )
19
+	,x LDR2 IOW2 ( x-pos )
20 20
 	,02 IOW ( color )
21 21
 	,01 IOW ( redraw )
22 22
 
... ...
@@ -9,8 +9,8 @@
9 9
 	
10 10
 	,01 ,dev/w STR ( set dev/write to screen ) 
11 11
 	,01 ,color STR ( set color ) 	
12
-	,0020 ,x STR^ ( set x-pos )
13
-	,0030 ,y STR^ ( set y-pos )
12
+	,0020 ,x STR2 ( set x-pos )
13
+	,0030 ,y STR2 ( set y-pos )
14 14
 	,01 ,alive STR ( set alive = true )
15 15
 
16 16
 BRK
... ...
@@ -18,25 +18,25 @@ BRK
18 18
 |c000 @FRAME 
19 19
 
20 20
 	,alive LDR ,00 EQU BRK?
21
-	,01 ,color LDR ,x LDR^ ,y LDR^ ,putpixel JSR
21
+	,01 ,color LDR ,x LDR2 ,y LDR2 ,putpixel JSR
22 22
 	,move JSR
23 23
 
24 24
 BRK
25 25
 
26 26
 @move
27
-	,x LDR^ ,0001 ADD^ ,x STR^ ( incr x )
28
-	,x LDR^ ,0040 LTH^ RTS?    ( if x > 60 )
29
-	,0020 ,x STR^              ( x = 0x0020 )
30
-	,y LDR^ ,0001 ADD^ ,y STR^ ( incr y )
27
+	,x LDR2 ,0001 ADD2 ,x STR2 ( incr x )
28
+	,x LDR2 ,0040 LTH2 RTS?    ( if x > 60 )
29
+	,0020 ,x STR2              ( x = 0x0020 )
30
+	,y LDR2 ,0001 ADD2 ,y STR2 ( incr y )
31 31
 
32
-	,y LDR^ ,0050 LTH^ RTS?    ( y > 50 )
32
+	,y LDR2 ,0050 LTH2 RTS?    ( y > 50 )
33 33
 	,00 ,alive STR             ( alive = 0 )
34 34
 
35 35
 	RTS
36 36
 
37 37
 @putpixel 
38
-	IOW^ ( y short )
39
-	IOW^ ( x short )
38
+	IOW2 ( y short )
39
+	IOW2 ( x short )
40 40
 	IOW  ( color byte )
41 41
 	IOW  ( redraw byte )
42 42
 	RTS
... ...
@@ -11,14 +11,14 @@
11 11
 	,01 DUP ,dev/r STR ,dev/w STR 
12 12
 
13 13
 	( load screen size )
14
-	,00 IOR^ ,width STR^
15
-	,02 IOR^ ,height STR^
14
+	,00 IOR2 ,width STR2
15
+	,02 IOR2 ,height STR2
16 16
 
17 17
 	( draw pixel at screen center )
18 18
 
19 19
 	,0101 
20
-	,width LDR^ ,0002 DIV^ 
21
-	,height LDR^ ,0002 DIV^ 
20
+	,width LDR2 ,0002 DIV2 
21
+	,height LDR2 ,0002 DIV2 
22 22
 	,putpixel JSR
23 23
 
24 24
 BRK
... ...
@@ -26,8 +26,8 @@ BRK
26 26
 |c000 @FRAME BRK
27 27
 
28 28
 @putpixel 
29
-	IOW^ ( y short )
30
-	IOW^ ( x short )
29
+	IOW2 ( y short )
30
+	IOW2 ( x short )
31 31
 	IOW ( color byte )
32 32
 	IOW ( redraw byte )
33 33
 	RTS
... ...
@@ -9,7 +9,7 @@
9 9
 
10 10
 	,00 ,dev/w STR ( set dev/write to console )
11 11
 
12
-	+1234 -0012 ADD^!
12
+	+1234 -0012 ADDS2
13 13
 
14 14
 BRK
15 15