Browse code

Implemented more macros in left/nasu

neauoire authored on 16/03/2021 18:25:26
Showing 5 changed files
... ...
@@ -264,8 +264,6 @@ walktoken(char *w)
264 264
 	case ',': return 3; /* lit2 addr-hb addr-lb */
265 265
 	case '.': return 2; /* addr-hb addr-lb */
266 266
 	case '^': return 2; /* Relative jump: lit addr-offset */
267
-	case '+':           /* signed positive */
268
-	case '-':           /* signed negative */
269 267
 	case '#': return (slen(w + 1) == 2 ? 2 : 3);
270 268
 	}
271 269
 	if((m = findmacro(w))) {
... ...
@@ -326,21 +324,6 @@ parsetoken(char *w)
326 324
 		else
327 325
 			return 0;
328 326
 		return 1;
329
-	} else if(w[0] == '+' && sihx(w + 1)) {
330
-		if(slen(w + 1) == 2)
331
-			pushbyte((Sint8)shex(w + 1), 1);
332
-		else if(slen(w + 1) == 4)
333
-			pushshort((Sint16)shex(w + 1), 1);
334
-		else
335
-			return 0;
336
-	} else if(w[0] == '-' && sihx(w + 1)) {
337
-		if(slen(w + 1) == 2)
338
-			pushbyte((Sint8)(shex(w + 1) * -1), 1);
339
-		else if(slen(w + 1) == 4)
340
-			pushshort((Sint16)(shex(w + 1) * -1), 1);
341
-		else
342
-			return 0;
343
-		return 1;
344 327
 	} else if((m = findmacro(w))) {
345 328
 		int i;
346 329
 		m->refs++;
... ...
@@ -1,8 +1,8 @@
1 1
 ( Controller )
2 2
 
3
-%INCR2 { #0001 ADD2 }
4
-%DECR2 { #0001 SUB2 }
5
-%HALF2 { #0002 DIV2 }
3
+%++ { #0001 ADD2 }
4
+%-- { #0001 SUB2 }
5
+%2/ { #0002 DIV2 }
6 6
 %JMC2  { ROT JMP2? POP2 }
7 7
 
8 8
 ;slime { color 1 }
... ...
@@ -10,8 +10,8 @@
10 10
 |0100 @RESET 
11 11
 	
12 12
 	( set origin )
13
-	~Screen.width HALF2 =Sprite.x 
14
-	~Screen.height HALF2 =Sprite.y
13
+	~Screen.width 2/ =Sprite.x 
14
+	~Screen.height 2/ =Sprite.y
15 15
 	,default_icn =Sprite.addr
16 16
 	#11 =Sprite.color
17 17
 	#0a =slime
... ...
@@ -36,13 +36,13 @@ BRK
36 36
 	( detect movement )
37 37
 	~Controller.buttons #f0 AND
38 38
 		DUP #04 SHR #01 AND #01 NEQ ,$no-up JMC2 
39
-			( move ) ~Sprite.y DECR2 =Sprite.y ,up_icn =Sprite.addr $no-up
39
+			( move ) ~Sprite.y -- =Sprite.y ,up_icn =Sprite.addr $no-up
40 40
 		DUP #05 SHR #01 AND #01 NEQ ,$no-down JMC2 
41
-			( move ) ~Sprite.y INCR2 =Sprite.y ,down_icn =Sprite.addr $no-down
41
+			( move ) ~Sprite.y ++ =Sprite.y ,down_icn =Sprite.addr $no-down
42 42
 		DUP #06 SHR #01 AND #01 NEQ ,$no-left JMC2 
43
-			( move ) ~Sprite.x DECR2 =Sprite.x ,left_icn =Sprite.addr $no-left
43
+			( move ) ~Sprite.x -- =Sprite.x ,left_icn =Sprite.addr $no-left
44 44
 		DUP #07 SHR #01 AND #01 NEQ ,$no-right JMC2 
45
-			( move ) ~Sprite.x INCR2 =Sprite.x ,right_icn =Sprite.addr $no-right
45
+			( move ) ~Sprite.x ++ =Sprite.x ,right_icn =Sprite.addr $no-right
46 46
 	POP
47 47
 
48 48
 	( draw face )
... ...
@@ -1,6 +1,8 @@
1 1
 ( draw routines )
2 2
 
3 3
 %RTN { JMP2r }
4
+%++  { #0001 ADD2 }
5
+%8+  { #0008 ADD2 }
4 6
 
5 7
 ;label { x 2 y 2 color 1 addr 2 }
6 8
 ;pict { x 2 y 2 width 2 height 2 color 1 addr 2 }
... ...
@@ -32,7 +34,7 @@ BRK
32 34
 
33 35
 	( load ) =color =rect.y2 =rect.x2 DUP2 =Screen.y =rect.y1 DUP2 =Screen.x =rect.x1
34 36
 	$hor
35
-		( incr ) ~Screen.x #0001 ADD2 =Screen.x
37
+		( incr ) ~Screen.x ++ =Screen.x
36 38
 		( draw ) ~rect.y1 =Screen.y ~color =Screen.color
37 39
 		( draw ) ~rect.y2 =Screen.y ~color =Screen.color
38 40
 		,$hor ~Screen.x ~rect.x2 LTH2 JMP2?
... ...
@@ -40,8 +42,8 @@ BRK
40 42
 	$ver
41 43
 		( draw ) ~rect.x1 =Screen.x ~color =Screen.color
42 44
 		( draw ) ~rect.x2 =Screen.x ~color =Screen.color
43
-		( incr ) ~Screen.y #0001 ADD2 =Screen.y
44
-		,$ver ~Screen.y ~rect.y2 #0001 ADD2 LTH2 JMP2?
45
+		( incr ) ~Screen.y ++ =Screen.y
46
+		,$ver ~Screen.y ~rect.y2 ++ LTH2 JMP2?
45 47
 
46 48
 RTN
47 49
 
... ...
@@ -52,9 +54,9 @@ RTN
52 54
 		~rect.x1 =Screen.x
53 55
 		$hor
54 56
 			( draw ) ~color =Screen.color
55
-			( incr ) ~Screen.x #0001 ADD2 =Screen.x
57
+			( incr ) ~Screen.x ++ =Screen.x
56 58
 			,$hor ~Screen.x ~rect.x2 LTH2 JMP2?
57
-		( incr ) ~Screen.y #0001 ADD2 =Screen.y
59
+		( incr ) ~Screen.y ++ =Screen.y
58 60
 		,$ver ~Screen.y ~rect.y2 LTH2 JMP2?
59 61
 
60 62
 RTN
... ...
@@ -66,10 +68,10 @@ RTN
66 68
 		~pict.x =Sprite.x 
67 69
 		$hor
68 70
 			( draw ) ~pict.color =Sprite.color
69
-			( incr ) ~Sprite.x #0008 ADD2 =Sprite.x
70
-			( incr ) ~Sprite.addr #0008 ADD2 =Sprite.addr
71
+			( incr ) ~Sprite.x 8+ =Sprite.x
72
+			( incr ) ~Sprite.addr 8+ =Sprite.addr
71 73
 		,$hor ~Sprite.x ~pict.width ~pict.x ADD2 LTH2 JMP2?
72
-		( incr ) ~Sprite.y #0008 ADD2 =Sprite.y
74
+		( incr ) ~Sprite.y 8+ =Sprite.y
73 75
 	,$ver ~Sprite.y ~pict.height ~pict.y ADD2 LTH2 JMP2?
74 76
 
75 77
 RTN
... ...
@@ -79,8 +81,8 @@ RTN
79 81
 	( load ) =label.addr =label.color =Sprite.y =Sprite.x ~label.addr
80 82
 	$loop
81 83
 		( draw ) DUP2 LDR #00 SWP #0008 MUL2 ,font ADD2 =Sprite.addr ~label.color =Sprite.color
82
-		( incr ) #0001 ADD2
83
-		( incr ) ~Sprite.x #0008 ADD2 =Sprite.x
84
+		( incr ) ++
85
+		( incr ) ~Sprite.x 8+ =Sprite.x
84 86
 		DUP2 LDR #00 NEQ ,$loop ROT JMP2?
85 87
 	POP2
86 88
 
... ...
@@ -18,6 +18,10 @@
18 18
 %RTN { JMP2r }
19 19
 %RTN? { JMP2r? }
20 20
 
21
+%++ { #0001 ADD2 } %-- { #0001 SUB2 }
22
+%8/ { #0003 SHR2 } %8* { #0003 SHL2 }
23
+%8- { #0008 SUB2 } %8+ { #0008 ADD2 }
24
+
21 25
 ;lock { byte 1 }
22 26
 ;k { byte 1 } 
23 27
 ;l { byte 1 } 
... ...
@@ -38,7 +42,7 @@
38 42
 	( load file )
39 43
 	,filepath ,load-file JSR2
40 44
 	( place textarea )
41
-	#0018 =textarea.x1 ~Screen.height #0008 SUB2 =textarea.y2
45
+	#0018 =textarea.x1 ~Screen.height 8- =textarea.y2
42 46
 
43 47
 	,select JSR2
44 48
 	,redraw JSR2
... ...
@@ -54,22 +58,22 @@ BRK
54 58
 		,no-ctrl-up ~Controller #10 NEQ JMP2?
55 59
 			( clamp ) ,no-ctrl-up ~position.y #0000 EQU2 JMP2?
56 60
 			,find-lineoffset JSR2 =position.x 
57
-			~position.y #0001 SUB2 =position.y 
58
-			,find-selection JSR2 DUP2 =selection.from #0001 ADD2 =selection.to
61
+			~position.y -- =position.y 
62
+			,find-selection JSR2 DUP2 =selection.from ++ =selection.to
59 63
 			,clamp-selection JSR2 ,follow-selection JSR2 ,redraw JSR2 ,ctrl-end JMP2
60 64
 		@no-ctrl-up
61 65
 		,no-ctrl-down ~Controller #20 NEQ JMP2?
62
-			,find-lineoffset JSR2 =position.x ~position.y #0001 ADD2 =position.y 
63
-			,find-selection JSR2 DUP2 =selection.from #0001 ADD2 =selection.to
66
+			,find-lineoffset JSR2 =position.x ~position.y ++ =position.y 
67
+			,find-selection JSR2 DUP2 =selection.from ++ =selection.to
64 68
 			,clamp-selection JSR2 ,follow-selection JSR2 ,redraw JSR2 ,ctrl-end JMP2
65 69
 		@no-ctrl-down
66 70
 		,no-ctrl-left ~Controller #40 NEQ JMP2?
67 71
 			( clamp ) ,no-ctrl-left ~selection.from ,document.body EQU2 JMP2?
68
-			~selection.from #0001 SUB2 DUP2 =selection.from #0001 ADD2 =selection.to
72
+			~selection.from -- DUP2 =selection.from ++ =selection.to
69 73
 			,clamp-selection JSR2 ,follow-selection JSR2 ,redraw JSR2 ,ctrl-end JMP2
70 74
 		@no-ctrl-left
71 75
 		,no-ctrl-right ~Controller #80 NEQ JMP2?
72
-			~selection.from #0001 ADD2 DUP2 =selection.from #0001 ADD2 =selection.to
76
+			~selection.from ++ DUP2 =selection.from ++ =selection.to
73 77
 			,clamp-selection JSR2 ,follow-selection JSR2 ,redraw JSR2 ,ctrl-end JMP2
74 78
 		@no-ctrl-right
75 79
 		( alt )
... ...
@@ -83,11 +87,11 @@ BRK
83 87
 				,clamp-selection JSR2 ,redraw JSR2 ,ctrl-end JMP2
84 88
 			@no-adown
85 89
 			,no-aleft ~Controller #04 SHR #04 NEQ JMP2?
86
-				~selection.to #0001 SUB2 =selection.to
90
+				~selection.to -- =selection.to
87 91
 				,clamp-selection JSR2 ,redraw JSR2 ,ctrl-end JMP2
88 92
 			@no-aleft
89 93
 			,no-aright ~Controller #04 SHR #08 NEQ JMP2?
90
-				~selection.to #0001 ADD2 =selection.to
94
+				~selection.to ++ =selection.to
91 95
 				,clamp-selection JSR2 ,redraw JSR2 ,ctrl-end JMP2
92 96
 			@no-aright
93 97
 		@no-alt
... ...
@@ -121,20 +125,20 @@ BRK
121 125
 				~selection.to ~selection.from SUB2 ,shift-left JSR2
122 126
 				,$erase-end JMP2
123 127
 			$erase-multiple
124
-				~selection.from #0001 ADD2 =selection.from
125
-				~selection.to ~selection.from SUB2 #0001 ADD2 ,shift-left JSR2
128
+				~selection.from ++ =selection.from
129
+				~selection.to ~selection.from SUB2 ++ ,shift-left JSR2
126 130
 			$erase-end
127
-			~selection.from #0001 SUB2 =selection.from
131
+			~selection.from -- =selection.from
128 132
 			,$keys-end JMP2
129 133
 		$no-backspace
130 134
 
131 135
 		( insert )
132 136
 		~selection.to ~selection.from SUB2 ,shift-right JSR2
133 137
 		~Keys ~selection.from STR
134
-		~selection.from #0001 ADD2 =selection.from
138
+		~selection.from ++ =selection.from
135 139
 
136 140
 		$keys-end
137
-			~selection.from #0001 ADD2 =selection.to
141
+			~selection.from ++ =selection.to
138 142
 			( release ) #00 =Keys
139 143
 			,redraw JSR2
140 144
 
... ...
@@ -144,7 +148,7 @@ BRK
144 148
 
145 149
 	,no-change ~Mouse.state ~touch.state EQU JMP2?
146 150
 	
147
-		#0000 =Sprite.x ~Screen.height #0008 SUB2 =Sprite.y
151
+		#0000 =Sprite.x ~Screen.height 8- =Sprite.y
148 152
 		,mouse00icn =Sprite.addr
149 153
 		,nobutton1 ~Mouse.state #01 NEQ JMP2? ,mouse01icn =Sprite.addr @nobutton1
150 154
 		,nobutton2 ~Mouse.state #10 NEQ JMP2? ,mouse10icn =Sprite.addr @nobutton2
... ...
@@ -156,7 +160,7 @@ BRK
156 160
 	,touch-end ~Mouse.state #00 EQU JMP2?
157 161
 
158 162
 		,touch-linebar ~Mouse.x #0010 LTH2 JMP2?
159
-		,touch-body ~Mouse.x ~Screen.width #0008 SUB2 LTH2 JMP2?
163
+		,touch-body ~Mouse.x ~Screen.width 8- LTH2 JMP2?
160 164
 		,touch-scrollbar JMP2
161 165
 
162 166
 	@touch-end
... ...
@@ -175,11 +179,11 @@ BRK
175 179
 		( decr ) ~scroll.y #00 ~scroll.y #0000 NEQ2 SUB2 =scroll.y
176 180
 		^$end JMP
177 181
 	$no-up 
178
-	,$no-down ~Mouse.y ~Screen.height #0008 SUB2 LTH2 JMP2?
179
-		( incr ) ~scroll.y #0001 ADD2 =scroll.y
182
+	,$no-down ~Mouse.y ~Screen.height 8- LTH2 JMP2?
183
+		( incr ) ~scroll.y ++ =scroll.y
180 184
 		^$end JMP
181 185
 	$no-down 
182
-	~Mouse.y #0008 SUB2 =scroll.y
186
+	~Mouse.y 8- =scroll.y
183 187
 	$end
184 188
 	,redraw JSR2 
185 189
 	,touch-end JMP2
... ...
@@ -188,8 +192,8 @@ RTN
188 192
 
189 193
 @touch-linebar
190 194
 
191
-	~Mouse.y #0008 DIV2 ~scroll.y ADD2 =position.y #0000 =position.x 
192
-	,find-selection JSR2 DUP2 =selection.from #0001 ADD2 =selection.to
195
+	~Mouse.y 8/ ~scroll.y ADD2 =position.y #0000 =position.x 
196
+	,find-selection JSR2 DUP2 =selection.from ++ =selection.to
193 197
 	,redraw JSR2 
194 198
 	,touch-end JMP2
195 199
 
... ...
@@ -197,7 +201,7 @@ RTN
197 201
 
198 202
 @touch-body
199 203
 	
200
-	~Mouse.y #0008 DIV2 ~scroll.y ADD2 =position.y
204
+	~Mouse.y 8/ ~scroll.y ADD2 =position.y
201 205
 	~Mouse.x ~textarea.x1 SUB2 #0007 ADD2 #0007 DIV2 =position.x
202 206
 
203 207
 	,$no-chord-cut ~Mouse.chord #01 NEQ JMP2?
... ...
@@ -215,12 +219,12 @@ RTN
215 219
 
216 220
 	,$no-drag ~Mouse.state ~touch.state NEQ ~Controller #0f AND #02 NEQ #0101 EQU2 JMP2?
217 221
 		( on drag )
218
-		,find-selection JSR2 #0001 ADD2 =selection.to
222
+		,find-selection JSR2 ++ =selection.to
219 223
 		,clamp-selection JSR2
220 224
 		^$end JMP
221 225
 	$no-drag
222 226
 		( on click )
223
-		,find-selection JSR2 DUP2 =selection.from #0001 ADD2 =selection.to
227
+		,find-selection JSR2 DUP2 =selection.from ++ =selection.to
224 228
 	$end
225 229
 	,redraw JSR2
226 230
 	,touch-end JMP2
... ...
@@ -233,7 +237,7 @@ RTN
233 237
 	( get file length )
234 238
 	,document.body =document.eof
235 239
 	$loop NOP
236
-		( incr ) ~document.eof #0001 ADD2 =document.eof
240
+		( incr ) ~document.eof ++ =document.eof
237 241
 	~document.eof LDR #00 NEQ ^$loop MUL JMP
238 242
 
239 243
 RTN
... ...
@@ -257,10 +261,10 @@ RTN
257 261
 @shift-left ( length )
258 262
 
259 263
 	=i
260
-	~selection.from #0001 SUB2 =j ( start -> end )
264
+	~selection.from -- =j ( start -> end )
261 265
 	$loop NOP
262 266
 		( move ) ~j ~i ADD2 LDR ~j STR
263
-		( incr ) ~j #0001 ADD2 =j
267
+		( incr ) ~j ++ =j
264 268
 		~j ~document.eof LTH2 ^$loop MUL JMP
265 269
 	~document.eof ~i SUB2 =document.eof
266 270
 
... ...
@@ -272,7 +276,7 @@ RTN
272 276
 	~document.eof =j ( end -> start )
273 277
 	$loop NOP
274 278
 		( move ) ~j ~i SUB2 LDR ~j STR
275
-		( decr ) ~j #0001 SUB2 =j
279
+		( decr ) ~j -- =j
276 280
 		~j ~selection.from GTH2 ^$loop MUL JMP
277 281
 	~document.eof ~i ADD2 =document.eof
278 282
 
... ...
@@ -283,8 +287,8 @@ RTN
283 287
 	,$no-up ~position.y ~scroll.y GTH2 JMP2?
284 288
 		~position.y =scroll.y RTN
285 289
 	$no-up
286
-	,$no-down ~position.y ~Screen.height #0010 SUB2 #0008 DIV2 ~scroll.y ADD2 LTH2 JMP2?
287
-		~position.y ~Screen.height #0010 SUB2 #0008 DIV2 SUB2 =scroll.y RTN
290
+	,$no-down ~position.y ~Screen.height #0010 SUB2 8/ ~scroll.y ADD2 LTH2 JMP2?
291
+		~position.y ~Screen.height #0010 SUB2 8/ SUB2 =scroll.y RTN
288 292
 	$no-down
289 293
 
290 294
 RTN
... ...
@@ -292,20 +296,20 @@ RTN
292 296
 @clamp-selection
293 297
 
294 298
 	~selection.from ~selection.to LTH2 RTN?
295
-	~selection.from #0001 ADD2 =selection.to
299
+	~selection.from ++ =selection.to
296 300
 
297 301
 RTN
298 302
 
299 303
 @goto-linestart
300 304
 
301 305
 	$loop NOP
302
-		~selection.from #0001 SUB2 LDR #0a EQU RTN?
303
-		~selection.from #0001 SUB2 LDR #0d EQU RTN?
304
-		( decr ) ~selection.from DUP2 =selection.to #0001 SUB2 =selection.from
306
+		~selection.from -- LDR #0a EQU RTN?
307
+		~selection.from -- LDR #0d EQU RTN?
308
+		( decr ) ~selection.from DUP2 =selection.to -- =selection.from
305 309
 	~selection.from LDR #00 NEQ ^$loop MUL JMP
306 310
 	( clamp at document body )
307 311
 	~selection.from ,document.body GTH2 RTN?
308
-	,document.body DUP2 =selection.from #0001 ADD2 =selection.to
312
+	,document.body DUP2 =selection.from ++ =selection.to
309 313
 
310 314
 RTN
311 315
 
... ...
@@ -314,11 +318,11 @@ RTN
314 318
 	$loop NOP
315 319
 		~selection.from LDR #0a EQU RTN?
316 320
 		~selection.from LDR #0d EQU RTN?
317
-		( incr ) ~selection.from #0001 ADD2 DUP2 #0001 ADD2 =selection.to =selection.from
321
+		( incr ) ~selection.from ++ DUP2 ++ =selection.to =selection.from
318 322
 		~selection.from LDR #00 NEQ ^$loop MUL JMP
319 323
 	( clamp at document body )
320 324
 	~selection.from ,document.eof LTH2 RTN?
321
-	,document.eof #0001 SUB2 DUP2 =selection.from #0001 ADD2 =selection.to
325
+	,document.eof -- DUP2 =selection.from ++ =selection.to
322 326
 
323 327
 RTN
324 328
 
... ...
@@ -326,13 +330,13 @@ RTN
326 330
 
327 331
 	~selection.to =j
328 332
 	$loop NOP
329
-		( decr ) ~j #0001 SUB2 =j
333
+		( decr ) ~j -- =j
330 334
 		,$end ~j LDR #20 EQU JMP2?
331 335
 		,$end ~j LDR #0a EQU JMP2?
332 336
 		,$end ~j LDR #0d EQU JMP2?
333 337
 		~j ,document.body GTH2 ^$loop MUL JMP
334 338
 	$end 
335
-	( return ) ~j #0001 SUB2
339
+	( return ) ~j --
336 340
 
337 341
 RTN
338 342
 
... ...
@@ -340,13 +344,13 @@ RTN
340 344
 	
341 345
 	~selection.to =j
342 346
 	$loop NOP
343
-		( incr ) ~j #0001 ADD2 =j
347
+		( incr ) ~j ++ =j
344 348
 		,$end ~j LDR #20 EQU JMP2?
345 349
 		,$end ~j LDR #0a EQU JMP2?
346 350
 		,$end ~j LDR #0d EQU JMP2?
347 351
 		~j ,document.body GTH2 ^$loop MUL JMP
348 352
 	$end 
349
-	( return ) ~j #0001 ADD2
353
+	( return ) ~j ++
350 354
 
351 355
 RTN
352 356
 
... ...
@@ -354,7 +358,7 @@ RTN
354 358
 
355 359
 	#0000 =j
356 360
 	$loop NOP
357
-		( incr ) ~j #0001 ADD2 =j
361
+		( incr ) ~j ++ =j
358 362
 		,$end ~selection.from ~j SUB2 LDR #0a EQU JMP2?
359 363
 		,$end ~selection.from ~j SUB2 LDR #0d EQU JMP2?
360 364
 		~selection.from ~j SUB2 ,document.body GTH2 ^$loop MUL JMP
... ...
@@ -367,11 +371,11 @@ RTN
367 371
 
368 372
 	,document.body =j #0000 =pt.y
369 373
 	$loop NOP
370
-		,$end ~pt.y ~position.y #0001 SUB2 GTH2 JMP2?
374
+		,$end ~pt.y ~position.y -- GTH2 JMP2?
371 375
 		,$no-space ~j LDR #0a NEQ ~j LDR #0d NEQ #0101 EQU2 JMP2?
372
-			( incr ) ~pt.y #0001 ADD2 =pt.y
376
+			( incr ) ~pt.y ++ =pt.y
373 377
 		$no-space
374
-		( incr ) ~j #0001 ADD2 =j
378
+		( incr ) ~j ++ =j
375 379
 	~j LDR #00 NEQ ^$loop MUL JMP
376 380
 	$end
377 381
 	( return ) ~j
... ...
@@ -385,8 +389,8 @@ RTN
385 389
 	$loop NOP
386 390
 		,$end ~j ~pt.x ADD2 LDR #0a EQU JMP2?
387 391
 		,$end ~j ~pt.x ADD2 LDR #0d EQU JMP2?
388
-		( incr ) ~pt.x #0001 ADD2 =pt.x
389
-		~pt.x ~position.x #0001 SUB2 LTH2 ^$loop MUL JMP
392
+		( incr ) ~pt.x ++ =pt.x
393
+		~pt.x ~position.x -- LTH2 ^$loop MUL JMP
390 394
 	$end
391 395
 	( return ) ~pt.x ADD2
392 396
 
... ...
@@ -396,7 +400,7 @@ RTN
396 400
 
397 401
 	,copy JSR2
398 402
 	~selection.to ~selection.from SUB2 ,shift-left JSR2
399
-	~selection.from #0001 ADD2 =selection.to
403
+	~selection.from ++ =selection.to
400 404
 
401 405
 RTN
402 406
 
... ...
@@ -407,7 +411,7 @@ RTN
407 411
 	~j =clip.len
408 412
 	$loop NOP
409 413
 		~selection.from ~i ADD2 LDR ,clip.body ~i ADD2 STR
410
-		( incr ) ~i #0001 ADD2 =i
414
+		( incr ) ~i ++ =i
411 415
 		~i ~j LTH2 ^$loop MUL JMP
412 416
 
413 417
 RTN
... ...
@@ -419,7 +423,7 @@ RTN
419 423
 	~clip.len =j ( end )
420 424
 	$loop NOP
421 425
 		,clip.body ~i ADD2 LDR ~selection.from ~i ADD2 STR
422
-		( incr ) ~i #0001 ADD2 =i
426
+		( incr ) ~i ++ =i
423 427
 		~i ~j LTH2 ^$loop MUL JMP
424 428
 
425 429
 RTN
... ...
@@ -429,15 +433,15 @@ RTN
429 433
 	,document.body =selection.from #0000 =pt.x #0000 =pt.y
430 434
 	$loop
431 435
 		,$no-space ~selection.from LDR #0a NEQ ~selection.from LDR #0d NEQ #0101 EQU2 JMP2?
432
-			( incr ) ~pt.y #0001 ADD2 =pt.y
436
+			( incr ) ~pt.y ++ =pt.y
433 437
 			#0000 =pt.x
434 438
 		$no-space
435
-		,$no-reached ~pt.y ~position.y #0001 SUB2 GTH2 ~pt.x ~position.x #0001 SUB2 GTH2 #0101 NEQ2 JMP2?
436
-			~selection.from #0001 ADD2 =selection.to
439
+		,$no-reached ~pt.y ~position.y -- GTH2 ~pt.x ~position.x -- GTH2 #0101 NEQ2 JMP2?
440
+			~selection.from ++ =selection.to
437 441
 			RTN
438 442
 		$no-reached
439
-		( incr ) ~pt.x #0001 ADD2 =pt.x
440
-		( incr ) ~selection.from #0001 ADD2 =selection.from
443
+		( incr ) ~pt.x ++ =pt.x
444
+		( incr ) ~selection.from ++ =selection.from
441 445
 	,$loop ~selection.from LDR #00 NEQ JMP2?
442 446
 
443 447
 RTN
... ...
@@ -451,7 +455,7 @@ RTN
451 455
 	,draw-titlebar JSR2
452 456
 
453 457
 	( save/load icons )
454
-	~Screen.height #0008 SUB2 =Sprite.y
458
+	~Screen.height 8- =Sprite.y
455 459
 	~Screen.width #0018 SUB2 =Sprite.x
456 460
 	,load_icn =Sprite.addr
457 461
 	#02 =Sprite.color
... ...
@@ -466,14 +470,14 @@ RTN
466 470
 	=addr
467 471
 	,font_hex #00 ,addr LDR #f0 AND #04 SHR #08 MUL ADD2 =Sprite.addr
468 472
 	( draw ) #0e =Sprite.color
469
-	~Sprite.x #0008 ADD2 =Sprite.x
473
+	~Sprite.x 8+ =Sprite.x
470 474
 	,font_hex #00 ,addr LDR #0f AND #08 MUL ADD2 =Sprite.addr
471 475
 	( draw ) #0e =Sprite.color
472
-	~Sprite.x #0008 ADD2 =Sprite.x
473
-	,font_hex #00 ,addr #0001 ADD2 LDR #f0 AND #04 SHR #08 MUL ADD2 =Sprite.addr
476
+	~Sprite.x 8+ =Sprite.x
477
+	,font_hex #00 ,addr ++ LDR #f0 AND #04 SHR #08 MUL ADD2 =Sprite.addr
474 478
 	( draw ) #0e =Sprite.color
475
-	~Sprite.x #0008 ADD2 =Sprite.x
476
-	,font_hex #00 ,addr #0001 ADD2 LDR #0f AND #08 MUL ADD2 =Sprite.addr
479
+	~Sprite.x 8+ =Sprite.x
480
+	,font_hex #00 ,addr ++ LDR #0f AND #08 MUL ADD2 =Sprite.addr
477 481
 	( draw ) #0e =Sprite.color
478 482
 
479 483
 RTN
... ...
@@ -512,9 +516,9 @@ RTN
512 516
 	$find-offset NOP
513 517
 		,$find-offset-end ~scroll.y ~j EQU2 JMP2?
514 518
 		,$no-break ~textarea.addr LDR #0a NEQ ~textarea.addr LDR #0d NEQ #0101 EQU2 JMP2?
515
-			( incr ) ~j #0001 ADD2 =j
519
+			( incr ) ~j ++ =j
516 520
 		$no-break
517
-		( incr ) ~textarea.addr #0001 ADD2 =textarea.addr
521
+		( incr ) ~textarea.addr ++ =textarea.addr
518 522
 	~textarea.addr LDR #00 NEQ ^$find-offset MUL JMP
519 523
 	$find-offset-end
520 524
 
... ...
@@ -526,10 +530,10 @@ RTN
526 530
 		,$end ~Sprite.y ~Screen.height #0010 SUB2 GTH2 JMP2?
527 531
 
528 532
 		( get character )
529
-		,font #00 ~i LDR #20 SUB #0008 MUL2 ADD2 =Sprite.addr
533
+		,font #00 ~i LDR #20 SUB 8* ADD2 =Sprite.addr
530 534
 
531 535
 		( draw ) #01 
532
-		~i ~selection.from #0001 SUB2 GTH2 
536
+		~i ~selection.from -- GTH2 
533 537
 		~i ~selection.to LTH2 #0101 EQU2
534 538
 		#05 MUL ADD ~i ~selection.from EQU2 ADD =Sprite.color
535 539
 
... ...
@@ -537,20 +541,20 @@ RTN
537 541
 			( draw linebreak )
538 542
 			,linebreak_icn =Sprite.addr
539 543
 			( draw ) #02
540
-			~i ~selection.from #0001 SUB2 GTH2 
544
+			~i ~selection.from -- GTH2 
541 545
 			~i ~selection.to LTH2 #0101 EQU2
542 546
 			#06 MUL ADD =Sprite.color
543 547
 			( fill clear )
544 548
 			$fill-clear
545
-				( incr ) ~Sprite.x #0008 ADD2 =Sprite.x
549
+				( incr ) ~Sprite.x 8+ =Sprite.x
546 550
 				,font =Sprite.addr
547 551
 				#01 =Sprite.color
548
-				,$fill-clear ~Sprite.x ~Screen.width #0008 SUB2 LTH2 JMP2?
552
+				,$fill-clear ~Sprite.x ~Screen.width 8- LTH2 JMP2?
549 553
 
550 554
 			( draw line number )
551 555
 
552 556
 			#0000 =Sprite.x
553
-			~scroll.y ~Sprite.y #0008 DIV2 ADD2 DUP2 SWP POP =k 
557
+			~scroll.y ~Sprite.y 8/ ADD2 DUP2 SWP POP =k 
554 558
 			~position.y EQU2 #0c MUL =l
555 559
 			,font_hex #00 ~k #f0 AND #04 SHR #08 MUL ADD2 =Sprite.addr
556 560
 			#02 ~l ADD =Sprite.color
... ...
@@ -559,10 +563,10 @@ RTN
559 563
 			#02 ~l ADD =Sprite.color
560 564
 
561 565
 			#0010 =Sprite.x
562
-			( incr ) ~Sprite.y #0008 ADD2 =Sprite.y
566
+			( incr ) ~Sprite.y 8+ =Sprite.y
563 567
 		$no-linebreak
564 568
 
565
-		( incr ) ~i #0001 ADD2 =i
569
+		( incr ) ~i ++ =i
566 570
 		( incr ) ~Sprite.x #0007 ADD2 =Sprite.x
567 571
 
568 572
 	,$loop ~i LDR #00 NEQ JMP2?
... ...
@@ -573,13 +577,13 @@ RTN
573 577
 
574 578
 @draw-scrollbar
575 579
 		
576
-	~Screen.width #0008 SUB2 =Sprite.x
580
+	~Screen.width 8- =Sprite.x
577 581
 	#0000 =Sprite.y
578 582
 	,scrollbar_bg =Sprite.addr
579 583
 
580 584
 	$loop NOP
581 585
 	( draw ) #08 =Sprite.color
582
-	( incr ) ~Sprite.y #0008 ADD2 =Sprite.y
586
+	( incr ) ~Sprite.y 8+ =Sprite.y
583 587
 	~Sprite.y ~Screen.height LTH2 ^$loop MUL JMP
584 588
 
585 589
 	#0000 =Sprite.y
... ...
@@ -587,11 +591,11 @@ RTN
587 591
 	( draw ) #08 =Sprite.color
588 592
 
589 593
 	( at )
590
-	~scroll.y #0008 ADD2 =Sprite.y
594
+	~scroll.y 8+ =Sprite.y
591 595
 	,scrollbar_fg =Sprite.addr
592 596
 	( draw ) #08 =Sprite.color
593 597
 
594
-	~Screen.height #0008 SUB2 =Sprite.y
598
+	~Screen.height 8- =Sprite.y
595 599
 	,arrowdown_icn =Sprite.addr
596 600
 	( draw ) #08 =Sprite.color
597 601
 
... ...
@@ -599,13 +603,13 @@ RTN
599 603
 
600 604
 @draw-titlebar
601 605
 	
602
-	#0018 ~Screen.height #0008 SUB2 #09 ,filepath 
606
+	#0018 ~Screen.height 8- #09 ,filepath 
603 607
 	( load ) =label.addr =label.color =Sprite.y =Sprite.x 
604 608
 	~label.addr
605 609
 	$loop NOP
606
-		( draw ) DUP2 LDR #00 SWP #20 SUB #0008 MUL2 ,font ADD2 =Sprite.addr ~label.color =Sprite.color
607
-		( incr ) #0001 ADD2
608
-		( incr ) ~Sprite.x #0008 ADD2 =Sprite.x
610
+		( draw ) DUP2 LDR #00 SWP #20 SUB 8* ,font ADD2 =Sprite.addr ~label.color =Sprite.color
611
+		( incr ) ++
612
+		( incr ) ~Sprite.x 8+ =Sprite.x
609 613
 		DUP2 LDR #00 NEQ ^$loop MUL JMP
610 614
 	POP2
611 615
 	( selection )
... ...
@@ -6,8 +6,14 @@
6 6
 	1 2 3  - Select brush
7 7
 )
8 8
 
9
-%RTN { JMP2r }
10
-%RTN? { JMP2r? }
9
+%RTN   { JMP2r }
10
+%RTN?  { JMP2r? }
11
+%STEP8 { #0003 SHR2 #0003 SHL2 }
12
+
13
+%++ { #0001 ADD2 }
14
+%2/ { #0001 SHR2 } %2* { #0001 SHL2 }
15
+%8/ { #0003 SHR2 } %8* { #0003 SHL2 }
16
+%8- { #0008 SUB2 } %8+ { #0008 ADD2 }
11 17
 
12 18
 ;bankview { x 2 y 2 mode 1 addr 2 }
13 19
 ;tileview { x 2 y 2 addr 2 }
... ...
@@ -21,12 +27,12 @@
21 27
 
22 28
 |0100 @RESET
23 29
 	
24
-	~SCRN.width #0002 DIV2 #008a SUB2 =bankview.x 
25
-	~SCRN.height #0002 DIV2 #003f SUB2 =bankview.y 
30
+	~SCRN.width 2/ #008a SUB2 =bankview.x 
31
+	~SCRN.height 2/ #003f SUB2 =bankview.y 
26 32
 	,bank1 =bankview.addr
27 33
 
28
-	~SCRN.width #0002 DIV2 #0002 ADD2 =tileview.x 
29
-	~SCRN.height #0002 DIV2 #003f SUB2 =tileview.y 
34
+	~SCRN.width 2/ #0002 ADD2 =tileview.x 
35
+	~SCRN.height 2/ #003f SUB2 =tileview.y 
30 36
 	,bank1 #0448 ADD2 =tileview.addr
31 37
 
32 38
 	,redraw JSR2
... ...
@@ -56,10 +62,10 @@ BRK
56 62
 			~tileview.addr #0080 SUB2 =tileview.addr
57 63
 		@no-ctrl-down
58 64
 		,no-ctrl-left ~CTRL.buttons #40 EQU JMP2?
59
-			~tileview.addr #0008 ADD2 =tileview.addr
65
+			~tileview.addr 8+ =tileview.addr
60 66
 		@no-ctrl-left
61 67
 		,no-ctrl-right ~CTRL.buttons #80 EQU JMP2?
62
-			~tileview.addr #0008 SUB2 =tileview.addr
68
+			~tileview.addr 8- =tileview.addr
63 69
 		@no-ctrl-right
64 70
 		~tileview.addr #0800 DIV2 #0800 MUL2 =bankview.addr
65 71
 		,redraw JSR2
... ...
@@ -72,24 +78,24 @@ BRK
72 78
 
73 79
 		( toolbar )
74 80
 
75
-		,no-toolbar-click ~MOUS.y ~bankview.y #0010 SUB2 SUB2 #0008 DIV2 #0000 NEQ2 JMP2?
81
+		,no-toolbar-click ~MOUS.y ~bankview.y #0010 SUB2 SUB2 8/ #0000 NEQ2 JMP2?
76 82
 
77 83
 			( brush )
78 84
 
79
-			,no-brush-click ~MOUS.x ~bankview.x SUB2 #0008 DIV2 #000d LTH2 JMP2?
80
-			,no-brush-click ~MOUS.x ~bankview.x SUB2 #0008 DIV2 #000f GTH2 JMP2?
81
-				( select ) ~mouse.x ~bankview.x SUB2 #0008 DIV2 #000d SUB2 SWP POP =bankview.mode
85
+			,no-brush-click ~MOUS.x ~bankview.x SUB2 8/ #000d LTH2 JMP2?
86
+			,no-brush-click ~MOUS.x ~bankview.x SUB2 8/ #000f GTH2 JMP2?
87
+				( select ) ~mouse.x ~bankview.x SUB2 8/ #000d SUB2 SWP POP =bankview.mode
82 88
 				( release ) #00 =MOUS.state
83 89
 				,redraw JSR2 ,click-end JMP2
84 90
 			@no-brush-click
85 91
 
86
-			,no-load-click ~MOUS.x ~tileview.x SUB2 #0008 DIV2 #000e NEQU2 JMP2?
92
+			,no-load-click ~MOUS.x ~tileview.x SUB2 8/ #000e NEQU2 JMP2?
87 93
 				( load ) ,filename  =FILE.name #0800 =FILE.length ~bankview.addr =FILE.load
88 94
 				( release ) #00 =MOUS.state
89 95
 				,redraw JSR2 ,click-end JMP2
90 96
 			@no-load-click
91 97
 
92
-			,no-save-click ~MOUS.x ~tileview.x SUB2 #0008 DIV2 #000f NEQU2 JMP2?
98
+			,no-save-click ~MOUS.x ~tileview.x SUB2 8/ #000f NEQU2 JMP2?
93 99
 				( save ) ,filename  =FILE.name #0800 =FILE.length ~bankview.addr =FILE.save
94 100
 				( release ) #00 =MOUS.state
95 101
 				,redraw JSR2 ,click-end JMP2
... ...
@@ -108,8 +114,8 @@ BRK
108 114
 				@copy-loop NOP
109 115
 					( load ) ~tileview.addr ~i ADD LDR 
110 116
 					( get touch addr )
111
-					~MOUS.x ~bankview.x SUB2 #0008 DIV2 #0008 MUL2 
112
-					~MOUS.y ~bankview.y SUB2 #0008 DIV2 #0008 MUL2 #0010 MUL2 ADD2
117
+					~MOUS.x ~bankview.x SUB2 STEP8 
118
+					~MOUS.y ~bankview.y SUB2 STEP8 #0010 MUL2 ADD2
113 119
 					~bankview.addr ADD2 #00 ~i ADD2 STR
114 120
 					( incr ) ~i #01 ADD =i
115 121
 					~i #08 LTH ^copy-loop MUL JMP
... ...
@@ -121,16 +127,16 @@ BRK
121 127
 				@erase-loop NOP
122 128
 					#00 
123 129
 					( get touch addr )
124
-					~MOUS.x ~bankview.x SUB2 #0008 DIV2 #0008 MUL2 
125
-					~MOUS.y ~bankview.y SUB2 #0008 DIV2 #0008 MUL2 #0010 MUL2 ADD2
130
+					~MOUS.x ~bankview.x SUB2 STEP8 
131
+					~MOUS.y ~bankview.y SUB2 STEP8 #0010 MUL2 ADD2
126 132
 					~bankview.addr ADD2 #00 ~i ADD2 STR
127 133
 					( incr ) ~i #01 ADD =i
128 134
 					~i #08 LTH ^erase-loop MUL JMP
129 135
 				,redraw JSR2 ,click-end JMP2
130 136
 			@not-erase-mode
131 137
 
132
-			~MOUS.x ~bankview.x SUB2 #0008 DIV2 #0008 MUL2 
133
-			~MOUS.y ~bankview.y SUB2 #0008 DIV2 #0008 MUL2 #0010 MUL2 ADD2
138
+			~MOUS.x ~bankview.x SUB2 STEP8 
139
+			~MOUS.y ~bankview.y SUB2 STEP8 #0010 MUL2 ADD2
134 140
 			~bankview.addr ADD2 =tileview.addr
135 141
 			,redraw JSR2 ,click-end JMP2
136 142
 
... ...
@@ -142,39 +148,39 @@ BRK
142 148
 		~MOUS.y ~tileview.y GTH2 ~MOUS.y ~tileview.y #0080 ADD2 LTH2 #0101 EQU2
143 149
 		#0101 NEQ2 ,no-tile-click ROT JMP2?
144 150
 
145
-			~MOUS.x ~tileview.x SUB2 #0008 DIV2 #0008 MUL2 #0040 DIV2 
146
-			~MOUS.y ~tileview.y SUB2 #0008 DIV2 #0008 MUL2 #0040 DIV2 #0002 MUL2 ADD2 
147
-			#0008 MUL2
151
+			~MOUS.x ~tileview.x SUB2 STEP8 #0040 DIV2 
152
+			~MOUS.y ~tileview.y SUB2 STEP8 #0040 DIV2 2* ADD2 
153
+			8*
148 154
 			~tileview.addr ADD2 =addr ( addr offset )
149 155
 			~MOUS.x ~tileview.x SUB2 ~MOUS.x ~tileview.x SUB2 #0040 DIV2 #0040 MUL2 SUB2 =pos.x
150 156
 			~MOUS.y ~tileview.y SUB2 ~MOUS.y ~tileview.y SUB2 #0040 DIV2 #0040 MUL2 SUB2 =pos.y
151 157
 			,no-fill-mode ~bankview.mode #01 NEQ JMP2?
152
-				( fill row ) #ff ~addr ~pos.y #0008 DIV2 ADD2 STR
158
+				( fill row ) #ff ~addr ~pos.y 8/ ADD2 STR
153 159
 				,redraw JSR2 ,click-end JMP2
154 160
 			@no-fill-mode
155 161
 			,no-erase-mode ~bankview.mode #02 NEQ JMP2?
156
-				( erase row ) #00 ~addr ~pos.y #0008 DIV2 ADD2 STR
162
+				( erase row ) #00 ~addr ~pos.y 8/ ADD2 STR
157 163
 				,redraw JSR2 ,click-end JMP2
158 164
 			@no-erase-mode
159
-			( load ) ~addr ~pos.y #0008 DIV2 ADD2 LDR
160
-			( mask ) #01 #07 ~pos.x #0008 DIV2 SWP POP SUB SHL 
165
+			( load ) ~addr ~pos.y 8/ ADD2 LDR
166
+			( mask ) #01 #07 ~pos.x 8/ SWP POP SUB SHL 
161 167
 			XOR
162
-			( save ) ~addr ~pos.y #0008 DIV2 ADD2 STR
168
+			( save ) ~addr ~pos.y 8/ ADD2 STR
163 169
 			,redraw JSR2 ,click-end JMP2
164 170
 
165 171
 		@no-tile-click
166 172
 
167 173
 		( operations )
168 174
 
169
-		,no-operations ~MOUS.y ~tileview.y SUB2 #0008 DIV2 #000c NEQ2 JMP2?
175
+		,no-operations ~MOUS.y ~tileview.y SUB2 8/ #000c NEQ2 JMP2?
170 176
 
171
-			,no-move-up ~MOUS.x ~tileview.x SUB2 #0008 DIV2 #0011 NEQ2 JMP2?
177
+			,no-move-up ~MOUS.x ~tileview.x SUB2 8/ #0011 NEQ2 JMP2?
172 178
 				,op_shiftup JSR2 
173 179
 				( release ) #00 =MOUS.state
174 180
 				,redraw JSR2 ,click-end JMP2
175 181
 			@no-move-up
176 182
 
177
-			,no-move-down ~MOUS.x ~tileview.x SUB2 #0008 DIV2 #0012 NEQ2 JMP2?
183
+			,no-move-down ~MOUS.x ~tileview.x SUB2 8/ #0012 NEQ2 JMP2?
178 184
 				,op_shiftdown JSR2 
179 185
 				( release ) #00 =MOUS.state
180 186
 				,redraw JSR2 ,click-end JMP2
... ...
@@ -240,11 +246,11 @@ RTN
240 246
 	,tool_selector =SPRT.addr
241 247
 	#01 ~bankview.mode #00 EQU ADD =SPRT.color
242 248
 
243
-	~SPRT.x #0008 ADD2 =SPRT.x
249
+	~SPRT.x 8+ =SPRT.x
244 250
 	,tool_hand =SPRT.addr
245 251
 	#01 ~bankview.mode #01 EQU ADD =SPRT.color
246 252
 
247
-	~SPRT.x #0008 ADD2 =SPRT.x
253
+	~SPRT.x 8+ =SPRT.x
248 254
 	,tool_eraser =SPRT.addr
249 255
 	#01 ~bankview.mode #02 EQU ADD =SPRT.color
250 256
 
... ...
@@ -266,7 +272,7 @@ RTN
266 272
 		~bankview.x #00 ~i #08 MUL ADD2 =SPRT.x
267 273
 		~bankview.y #0088 ADD2 =SPRT.y
268 274
 		( draw ) #02 =SPRT.color
269
-		~SPRT.addr #0008 ADD2 =SPRT.addr
275
+		~SPRT.addr 8+ =SPRT.addr
270 276
 		( incr ) ~i #01 ADD =i
271 277
 		,$guides ~i #10 LTH JMP2?
272 278
 
... ...
@@ -283,12 +289,12 @@ RTN
283 289
 			,$no-highlight ~SPRT.addr ~tileview.addr #0018 ADD2 GTH2 JMP2?
284 290
 				( draw ) #0c =SPRT.color
285 291
 			$no-highlight
286
-			( incr ) ~SPRT.x #0008 ADD2 =SPRT.x
287
-			( incr ) ~SPRT.addr #0008 ADD2 =SPRT.addr
292
+			( incr ) ~SPRT.x 8+ =SPRT.x
293
+			( incr ) ~SPRT.addr 8+ =SPRT.addr
288 294
 			( incr ) ~pt.x #01 ADD =pt.x
289 295
 			,$hor ~pt.x #10 LTH JMP2?
290 296
 		( incr ) ~pt.y #01 ADD =pt.y
291
-		( incr ) ~SPRT.y #0008 ADD2 =SPRT.y
297
+		( incr ) ~SPRT.y 8+ =SPRT.y
292 298
 		,$ver ~pt.y #10 LTH JMP2?
293 299
 
294 300
 RTN
... ...
@@ -317,17 +323,17 @@ RTN
317 323
 
318 324
 	~tileview.x #0040 ADD2 =SPRT.x
319 325
 	~tileview.y =SPRT.y
320
-	~tileview.addr #0008 ADD2 =tileview.addr
326
+	~tileview.addr 8+ =tileview.addr
321 327
 	,draw-tileview-icn JSR2
322 328
 
323 329
 	~tileview.x =SPRT.x
324 330
 	~tileview.y #0040 ADD2 =SPRT.y
325
-	~tileview.addr #0008 ADD2 =tileview.addr
331
+	~tileview.addr 8+ =tileview.addr
326 332
 	,draw-tileview-icn JSR2
327 333
 
328 334
 	~tileview.x #0040 ADD2 =SPRT.x
329 335
 	~tileview.y #0040 ADD2 =SPRT.y
330
-	~tileview.addr #0008 ADD2 =tileview.addr
336
+	~tileview.addr 8+ =tileview.addr
331 337
 	,draw-tileview-icn JSR2
332 338
 
333 339
 	( line hor )
... ...
@@ -356,19 +362,19 @@ RTN
356 362
 		~tileview.x #0088 ADD2 =SPRT.x
357 363
 		,font_hex #00 ~tileview.addr #00 ~i ADD2 LDR #f0 AND #04 SHR #08 MUL ADD2 =SPRT.addr
358 364
 		( draw ) #02 =SPRT.color
359
-		~SPRT.x #0008 ADD2 =SPRT.x
365
+		~SPRT.x 8+ =SPRT.x
360 366
 		,font_hex #00 ~tileview.addr #00 ~i ADD2 LDR #0f AND #08 MUL ADD2 =SPRT.addr
361 367
 		( draw ) #02 =SPRT.color
362 368
 		( incr ) ~i #01 ADD =i
363
-		( incr ) ~SPRT.y #0008 ADD2 =SPRT.y
369
+		( incr ) ~SPRT.y 8+ =SPRT.y
364 370
 	,$bytes ~i #08 LTH JMP2?
365 371
 
366 372
 	( operations )
367 373
 
368
-	~SPRT.y #0008 ADD2 =SPRT.y
374
+	~SPRT.y 8+ =SPRT.y
369 375
 	,movedown_icn =SPRT.addr
370 376
 	#01 =SPRT.color
371
-	~SPRT.x #0008 SUB2 =SPRT.x
377
+	~SPRT.x 8- =SPRT.x
372 378
 	,moveup_icn =SPRT.addr
373 379
 	#01 =SPRT.color
374 380
 
... ...
@@ -381,12 +387,12 @@ RTN
381 387
 		~tileview.x #0088 ADD2 =SPRT.x
382 388
 		$tiles-hor
383 389
 			( draw ) #03 =SPRT.color
384
-			( incr ) ~SPRT.x #0008 ADD2 =SPRT.x
385
-			( incr ) ~SPRT.addr #0008 ADD2 =SPRT.addr
390
+			( incr ) ~SPRT.x 8+ =SPRT.x
391
+			( incr ) ~SPRT.addr 8+ =SPRT.addr
386 392
 			( incr ) ~pt.x #01 ADD =pt.x
387 393
 			,$tiles-hor ~pt.x #02 LTH JMP2?
388 394
 		( incr ) ~pt.y #01 ADD =pt.y
389
-		( incr ) ~SPRT.y #0008 ADD2 =SPRT.y
395
+		( incr ) ~SPRT.y 8+ =SPRT.y
390 396
 		,$tiles-ver ~pt.y #02 LTH JMP2?
391 397
 
392 398
 RTN
... ...
@@ -400,12 +406,12 @@ RTN
400 406
 			( get bit )
401 407
 			,blank_icn #00
402 408
 			~tileview.addr #00 ~pt.y ADD2 LDR #07 ~pt.x SUB SHR #01 AND ( get bit )
403
-			#0008 MUL2 ADD2 =SPRT.addr ( add *8 )
409
+			8* ADD2 =SPRT.addr ( add *8 )
404 410
 			( draw ) #01 =SPRT.color
405
-			( incr ) ~SPRT.x #0008 ADD2 =SPRT.x
411
+			( incr ) ~SPRT.x 8+ =SPRT.x
406 412
 			( incr ) ~pt.x #01 ADD =pt.x
407 413
 			,$hor ~pt.x #08 LTH JMP2?
408
-		( incr ) ~SPRT.y #0008 ADD2 =SPRT.y
414
+		( incr ) ~SPRT.y 8+ =SPRT.y
409 415
 		( incr ) ~pt.y #01 ADD =pt.y
410 416
 		~SPRT.x #0040 SUB2 =SPRT.x
411 417
 		,$ver ~pt.y #08 LTH JMP2?
... ...
@@ -442,14 +448,14 @@ RTN
442 448
 	=addr
443 449
 	,font_hex #00 ,addr LDR #f0 AND #04 SHR #08 MUL ADD2 =SPRT.addr
444 450
 	( draw ) #02 =SPRT.color
445
-	~SPRT.x #0008 ADD2 =SPRT.x
451
+	~SPRT.x 8+ =SPRT.x
446 452
 	,font_hex #00 ,addr LDR #0f AND #08 MUL ADD2 =SPRT.addr
447 453
 	( draw ) #02 =SPRT.color
448
-	~SPRT.x #0008 ADD2 =SPRT.x
449
-	,font_hex #00 ,addr #0001 ADD2 LDR #f0 AND #04 SHR #08 MUL ADD2 =SPRT.addr
454
+	~SPRT.x 8+ =SPRT.x
455
+	,font_hex #00 ,addr ++ LDR #f0 AND #04 SHR #08 MUL ADD2 =SPRT.addr
450 456
 	( draw ) #02 =SPRT.color
451
-	~SPRT.x #0008 ADD2 =SPRT.x
452
-	,font_hex #00 ,addr #0001 ADD2 LDR #0f AND #08 MUL ADD2 =SPRT.addr
457
+	~SPRT.x 8+ =SPRT.x
458
+	,font_hex #00 ,addr ++ LDR #0f AND #08 MUL ADD2 =SPRT.addr
453 459
 	( draw ) #02 =SPRT.color
454 460
 
455 461
 RTN
... ...
@@ -460,7 +466,7 @@ RTN
460 466
 
461 467
 	( load ) =color =rect.y2 =rect.x2 DUP2 =SCRN.y =rect.y1 DUP2 =SCRN.x =rect.x1
462 468
 	$hor NOP
463
-		( incr ) ~SCRN.x #0001 ADD2 =SCRN.x
469
+		( incr ) ~SCRN.x ++ =SCRN.x
464 470
 		( draw ) ~rect.y1 =SCRN.y ~color =SCRN.color
465 471
 		( draw ) ~rect.y2 =SCRN.y ~color =SCRN.color
466 472
 		~SCRN.x ~rect.x2 LTH2 ^$hor MUL JMP
... ...
@@ -468,8 +474,8 @@ RTN
468 474
 	$ver NOP
469 475
 		( draw ) ~rect.x1 =SCRN.x ~color =SCRN.color
470 476
 		( draw ) ~rect.x2 =SCRN.x ~color =SCRN.color
471
-		( incr ) ~SCRN.y #0001 ADD2 =SCRN.y
472
-		~SCRN.y ~rect.y2 #0001 ADD2 LTH2 ^$ver MUL JMP
477
+		( incr ) ~SCRN.y ++ =SCRN.y
478
+		~SCRN.y ~rect.y2 ++ LTH2 ^$ver MUL JMP
473 479
 
474 480
 RTN
475 481