Browse code

Ported projects to new assembler syntax

All these programs tested working, except for left, which compiles but
doesn't run properly.

Andrew Alderwick authored on 23/04/2021 14:34:03
Showing 12 changed files
... ...
@@ -2,142 +2,146 @@
2 2
 
3 3
 %RTN { JMP2r }
4 4
 %ABS2 { DUP2 #000f SFT2 EQU #04 JNZ #ffff MUL2 }
5
-%SCALEX { #0002 DIV2 ~Screen.width #0002 DIV2 ADD2 #0040 SUB2 }
6
-%SCALEY { #0002 DIV2 ~Screen.height #0002 DIV2 ADD2 #0040 SUB2 }
5
+%SCALEX { #0002 DIV2 .Screen/width DEI2 #0002 DIV2 ADD2 #0040 SUB2 }
6
+%SCALEY { #0002 DIV2 .Screen/height DEI2 #0002 DIV2 ADD2 #0040 SUB2 }
7 7
 %12HOURS { DUP #0c GTH #0c MUL SUB }
8 8
 %MOD { DUP2 DIV MUL SUB }
9 9
 
10
-;current { second 1 }
11
-;needles { hx 2 hy 2 mx 2 my 2 sx 2 sy 2 }
12
-;line { x0 2 y0 2 x 2 y 2 sx 2 sy 2 dx 2 dy 2 e1 2 e2 2 }
13
-;color { byte 1 }
14
-
15 10
 ( devices )
16 11
 
17
-|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
18
-|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 addr 2 color 1 }
19
-|01a0 ;DateTime { year 2 month 1 day 1 hour 1 minute 1 second 1 dotw 1 doty 2 isdst 1 refresh 1 }
12
+|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
13
+|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
14
+|a0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 &refresh $1 ]
15
+
16
+( variables )
17
+
18
+|0000
19
+
20
+@current [ &second $1 ]
21
+@needles [ &hx $2 &hy $2 &mx $2 &my $2 &sx $2 &sy $2 ]
22
+@line [ &x0 $2 &y0 $2 &x $2 &y $2 &sx $2 &sy $2 &dx $2 &dy $2 &e1 $2 &e2 $2 ]
23
+@color [ &byte $1 ]
20 24
 
21 25
 ( program )
22 26
 
23
-|0200
27
+|0100
24 28
 	
25
-	( theme ) #0ff8 =System.r #0f08 =System.g #0f08 =System.b
26
-	( vectors ) ,on-frame =Screen.vector
29
+	( theme ) #0ff8 .System/r DEO2 #0f08 .System/g DEO2 #0f08 .System/b DEO2
30
+	( vectors ) ;on-frame .Screen/vector DEO2
27 31
 
28 32
 BRK
29 33
 
30 34
 @on-frame
31 35
 	
32
-	#00 =DateTime.refresh
36
+	#00 .DateTime/refresh DEO
33 37
 
34 38
 	( only draw once per second )
35
-	~DateTime.second ~current.second NEQ #01 JNZ BRK
36
-	~DateTime.second =current.second
39
+	.DateTime/second DEI .current/second PEK NEQ #01 JNZ BRK
40
+	.DateTime/second DEI .current/second POK
37 41
 
38 42
 	( clear )
39
-	#0080 SCALEX #0080 SCALEY ~needles.sx ~needles.sy #00 ,draw-line JSR2
40
-	#0080 SCALEX #0080 SCALEY ~needles.mx ~needles.my #00 ,draw-line JSR2
41
-	#0080 SCALEX #0080 SCALEY ~needles.hx ~needles.hy #00 ,draw-line JSR2
43
+	#0080 SCALEX #0080 SCALEY .needles/sx PEK2 .needles/sy PEK2 #00 ;draw-line JSR2
44
+	#0080 SCALEX #0080 SCALEY .needles/mx PEK2 .needles/my PEK2 #00 ;draw-line JSR2
45
+	#0080 SCALEX #0080 SCALEY .needles/hx PEK2 .needles/hy PEK2 #00 ;draw-line JSR2
42 46
 
43 47
 	( place )
44
-	#00 ~DateTime.second #0002 MUL2 ,table ADD2 LDR2
45
-		#00 SWP SCALEY =needles.sy 
46
-		#00 SWP SCALEX =needles.sx
47
-	#00 ~DateTime.minute #0002 MUL2 ,table ADD2 LDR2
48
-		#00 SWP #0004 DIV2 #0003 MUL2 #0020 ADD2 SCALEY =needles.my 
49
-		#00 SWP #0004 DIV2 #0003 MUL2 #0020 ADD2 SCALEX =needles.mx
50
-	#00 ~DateTime.hour 12HOURS #05 MUL #0002 MUL2 ,table ADD2 LDR2
51
-		#00 SWP #0002 DIV2 #0040 ADD2 SCALEY =needles.hy 
52
-		#00 SWP #0002 DIV2 #0040 ADD2 SCALEX =needles.hx
48
+	#00 .DateTime/second DEI #0002 MUL2 ;table ADD2 GET2
49
+		#00 SWP SCALEY .needles/sy POK2
50
+		#00 SWP SCALEX .needles/sx POK2
51
+	#00 .DateTime/minute DEI #0002 MUL2 ;table ADD2 GET2
52
+		#00 SWP #0004 DIV2 #0003 MUL2 #0020 ADD2 SCALEY .needles/my POK2
53
+		#00 SWP #0004 DIV2 #0003 MUL2 #0020 ADD2 SCALEX .needles/mx POK2
54
+	#00 .DateTime/hour DEI 12HOURS #05 MUL #0002 MUL2 ;table ADD2 GET2
55
+		#00 SWP #0002 DIV2 #0040 ADD2 SCALEY .needles/hy POK2
56
+		#00 SWP #0002 DIV2 #0040 ADD2 SCALEX .needles/hx POK2
53 57
 
54 58
 	( needles )
55
-	#0080 SCALEX #0080 SCALEY ~needles.sx ~needles.sy #02 ,draw-line JSR2
56
-	#0080 SCALEX #0080 SCALEY ~needles.mx ~needles.my #01 ,draw-line JSR2
57
-	#0080 SCALEX #0080 SCALEY ~needles.hx ~needles.hy #03 ,draw-line JSR2
59
+	#0080 SCALEX #0080 SCALEY .needles/sx PEK2 .needles/sy PEK2 #02 ;draw-line JSR2
60
+	#0080 SCALEX #0080 SCALEY .needles/mx PEK2 .needles/my PEK2 #01 ;draw-line JSR2
61
+	#0080 SCALEX #0080 SCALEY .needles/hx PEK2 .needles/hy PEK2 #03 ;draw-line JSR2
58 62
 
59 63
 	( circle )
60
-	#00 #3c 
61
-	$loop
62
-		( load ) OVR #00 SWP #0002 MUL2 ,table ADD2 LDR2 
63
-		#00 SWP SCALEY =Screen.y
64
-		#00 SWP SCALEX =Screen.x
65
-		OVR #0f MOD #00 EQU #01 ADD =Screen.color
64
+	#00 #3c
65
+	&loop
66
+		( load ) OVR #00 SWP #0002 MUL2 ;table ADD2 GET2
67
+		#00 SWP SCALEY .Screen/y DEO2
68
+		#00 SWP SCALEX .Screen/x DEO2
69
+		OVR #0f MOD #00 EQU #01 ADD .Screen/color DEO
66 70
 		( incr ) SWP #01 ADD SWP
67
-		DUP2 LTH ^$loop JNZ
71
+		DUP2 LTH ,&loop JNZ
68 72
 	POP2
69 73
 
70 74
 	( display )
71
-	~Screen.height #0002 DIV2 #0048 ADD2 =Screen.y
72
-	~Screen.width #0002 DIV2
73
-	DUP2 #0020 SUB2 =Screen.x 
74
-		,font_hex #00 ~DateTime.hour #0a DIV #08 MUL ADD2 =Screen.addr 
75
-		#22 =Screen.color
76
-	DUP2 #0018 SUB2 =Screen.x 
77
-		,font_hex #00 ~DateTime.hour #0a MOD #08 MUL ADD2 =Screen.addr 
78
-		#22 =Screen.color
79
-	DUP2 #0008 SUB2 =Screen.x 
80
-		,font_hex #00 ~DateTime.minute #0a DIV #08 MUL ADD2 =Screen.addr 
81
-		#22 =Screen.color
82
-	DUP2 =Screen.x 
83
-		,font_hex #00 ~DateTime.minute #0a MOD #08 MUL ADD2 =Screen.addr 
84
-		#22 =Screen.color
85
-	DUP2 #0010 ADD2 =Screen.x 
86
-		,font_hex #00 ~DateTime.second #0a DIV #08 MUL ADD2 =Screen.addr 
87
-		#22 =Screen.color
88
-	DUP2 #0018 ADD2 =Screen.x 
89
-		,font_hex #00 ~DateTime.second #0a MOD #08 MUL ADD2 =Screen.addr 
90
-		#22 =Screen.color
75
+	.Screen/height DEI2 #0002 DIV2 #0048 ADD2 .Screen/y DEO2
76
+	.Screen/width DEI2 #0002 DIV2
77
+	DUP2 #0020 SUB2 .Screen/x DEO2
78
+		;font_hex #00 .DateTime/hour DEI #0a DIV #08 MUL ADD2 .Screen/addr DEO2
79
+		#22 .Screen/color DEO
80
+	DUP2 #0018 SUB2 .Screen/x DEO2
81
+		;font_hex #00 .DateTime/hour DEI #0a MOD #08 MUL ADD2 .Screen/addr DEO2
82
+		#22 .Screen/color DEO
83
+	DUP2 #0008 SUB2 .Screen/x DEO2
84
+		;font_hex #00 .DateTime/minute DEI #0a DIV #08 MUL ADD2 .Screen/addr DEO2
85
+		#22 .Screen/color DEO
86
+	DUP2 .Screen/x DEO2
87
+		;font_hex #00 .DateTime/minute DEI #0a MOD #08 MUL ADD2 .Screen/addr DEO2
88
+		#22 .Screen/color DEO
89
+	DUP2 #0010 ADD2 .Screen/x DEO2
90
+		;font_hex #00 .DateTime/second DEI #0a DIV #08 MUL ADD2 .Screen/addr DEO2
91
+		#22 .Screen/color DEO
92
+	DUP2 #0018 ADD2 .Screen/x DEO2
93
+		;font_hex #00 .DateTime/second DEI #0a MOD #08 MUL ADD2 .Screen/addr DEO2
94
+		#22 .Screen/color DEO
91 95
 	POP2
92 96
 
93 97
 BRK
94 98
 
95 99
 @draw-line ( x1 y1 x2 y2 color -- )
96 100
 	
97
-	( load ) =color =line.y0 =line.x0 =line.y =line.x
98
-	~line.x0 ~line.x SUB2 ABS2 =line.dx
99
-	~line.y0 ~line.y SUB2 ABS2 #0000 SWP2 SUB2 =line.dy
100
-	#ffff #00 ~line.x ~line.x0 LTS2 #0002 MUL2 ADD2 =line.sx 
101
-	#ffff #00 ~line.y ~line.y0 LTS2 #0002 MUL2 ADD2 =line.sy 
102
-	~line.dx ~line.dy ADD2 =line.e1
103
-	$loop
104
-		~line.x =Screen.x ~line.y =Screen.y ~color =Screen.color
105
-		~line.x ~line.x0 EQU2 ~line.y ~line.y0 EQU2 #0101 EQU2 ^$end JNZ
106
-		~line.e1 #0002 MUL2 =line.e2
107
-		~line.e2 ~line.dy LTS2 ^$skipy JNZ
108
-			~line.e1 ~line.dy ADD2 =line.e1
109
-			~line.x ~line.sx ADD2 =line.x
110
-		$skipy
111
-		~line.e2 ~line.dx GTS2 ^$skipx JNZ
112
-			~line.e1 ~line.dx ADD2 =line.e1
113
-			~line.y ~line.sy ADD2 =line.y
114
-		$skipx
115
-		,$loop JMP2
116
-
117
-	$end
101
+	( load ) .color POK .line/y0 POK2 .line/x0 POK2 .line/y POK2 .line/x POK2
102
+	.line/x0 PEK2 .line/x PEK2 SUB2 ABS2 .line/dx POK2
103
+	.line/y0 PEK2 .line/y PEK2 SUB2 ABS2 #0000 SWP2 SUB2 .line/dy POK2
104
+	#ffff #00 .line/x PEK2 .line/x0 PEK2 LTS2 #0002 MUL2 ADD2 .line/sx POK2
105
+	#ffff #00 .line/y PEK2 .line/y0 PEK2 LTS2 #0002 MUL2 ADD2 .line/sy POK2
106
+	.line/dx PEK2 .line/dy PEK2 ADD2 .line/e1 POK2
107
+	&loop
108
+		.line/x PEK2 .Screen/x DEO2 .line/y PEK2 .Screen/y DEO2 .color PEK .Screen/color DEO
109
+		.line/x PEK2 .line/x0 PEK2 EQU2 .line/y PEK2 .line/y0 PEK2 EQU2 #0101 EQU2 ,&end JNZ
110
+		.line/e1 PEK2 #0002 MUL2 .line/e2 POK2
111
+		.line/e2 PEK2 .line/dy PEK2 LTS2 ,&skipy JNZ
112
+			.line/e1 PEK2 .line/dy PEK2 ADD2 .line/e1 POK2
113
+			.line/x PEK2 .line/sx PEK2 ADD2 .line/x POK2
114
+		&skipy
115
+		.line/e2 PEK2 .line/dx PEK2 GTS2 ,&skipx JNZ
116
+			.line/e1 PEK2 .line/dx PEK2 ADD2 .line/e1 POK2
117
+			.line/y PEK2 .line/sy PEK2 ADD2 .line/y POK2
118
+		&skipx
119
+		;&loop JMP2
120
+
121
+	&end
118 122
 
119 123
 RTN
120 124
 
121 125
 @table ( 60 positions on a circle in bytes )
122 126
 [
123
-	8000 8d00 9a02 a706 b40b c011 cb18 d520 
124
-	df2a e734 ee40 f44b f958 fd65 ff72 ff80 
125
-	ff8d fd9a f9a7 f4b4 eec0 e7cb dfd5 d5df 
126
-	cbe7 c0ee b4f4 a7f9 9afd 8dff 80ff 72ff 
127
-	65fd 58f9 4bf4 40ee 34e7 2adf 20d5 18cb 
128
-	11c0 0bb4 06a7 029a 008d 0080 0072 0265 
129
-	0658 0b4b 113f 1834 202a 2a20 3418 3f11 
127
+	8000 8d00 9a02 a706 b40b c011 cb18 d520
128
+	df2a e734 ee40 f44b f958 fd65 ff72 ff80
129
+	ff8d fd9a f9a7 f4b4 eec0 e7cb dfd5 d5df
130
+	cbe7 c0ee b4f4 a7f9 9afd 8dff 80ff 72ff
131
+	65fd 58f9 4bf4 40ee 34e7 2adf 20d5 18cb
132
+	11c0 0bb4 06a7 029a 008d 0080 0072 0265
133
+	0658 0b4b 113f 1834 202a 2a20 3418 3f11
130 134
 	4b0b 5806 6502 7200
131 135
 ]
132 136
 
133
-@font_hex ( 0-F ) 
137
+@font_hex ( 0-F )
134 138
 [
135 139
 	007c 8282 8282 827c 0030 1010 1010 1010
136 140
 	007c 8202 7c80 80fe 007c 8202 1c02 827c
137 141
 	000c 1424 4484 fe04 00fe 8080 7c02 827c
138 142
 	007c 8280 fc82 827c 007c 8202 1e02 0202
139 143
 	007c 8282 7c82 827c 007c 8282 7e02 827c
140
-	007c 8202 7e82 827e 00fc 8282 fc82 82fc 
141
-	007c 8280 8080 827c 00fc 8282 8282 82fc 
144
+	007c 8202 7e82 827e 00fc 8282 fc82 82fc
145
+	007c 8280 8080 827c 00fc 8282 8282 82fc
142 146
 	007c 8280 f080 827c 007c 8280 f080 8080
143 147
 ]
... ...
@@ -1,249 +1,249 @@
1
-( a blank file )
1
+( mini music tracker )
2 2
 
3 3
 %RTN { JMP2r }
4 4
 %8+ { #0008 ADD2 } %8- { #0008 SUB2 }
5 5
 %8* { #0008 MUL2 } %8/ { #0008 DIV2 }
6
-%++  { #0001 ADD2 }
6
+%++ { #0001 ADD2 }
7 7
 %MOD { DUP2 DIV MUL SUB }
8
-%TRACK { ,track.ch1 #00 ~track.active #0020 MUL2 ADD2 }
9
-%SOUND { STH #00 =Audio.value STHr #00 =Audio.delay }
10
-%SOUND_FINISH { #00 =Audio.finish }
8
+%TRACK { ;track/ch1 #00 .track/active PEK #0020 MUL2 ADD2 }
9
+%SOUND { STH #00 .Audio/value DEO2 STHr #00 .Audio/delay DEO2 }
10
+%SOUND_FINISH { #00 .Audio/finish DEO }
11 11
 
12 12
 ( variables )
13 13
 
14
-;pointer { x 2 y 2 }
15
-;color { byte 1 }
16
-;rect { x1 2 y1 2 x2 2 y2 2 }
17
-;trkframe { x1 2 y1 2 x2 2 y2 2 }
18
-;chnframe { x1 2 y1 2 x2 2 y2 2 }
19
-;ctlframe { x1 2 y1 2 x2 2 y2 2 }
20
-;label { x 2 y 2 color 1 addr 2 }
21
-;knob { x 2 y 2 value 1 }
22
-;head { pos 1 }
23
-;track { active 1 ch1 20 ch2 20 ch3 20 ch4 20 }
24
-;adsr { ch1a 1 ch1d 1 ch1s 1 ch1r 1 ch2a 1 ch2d 1 ch2s 1 ch2r 1 ch3a 1 ch3d 1 ch3s 1 ch3r 1 ch4a 1 ch4d 1 ch4s 1 ch4r 1 }
25
-;volume { ch1 1 ch2 1 ch3 1 ch4 1 }
14
+@pointer [ &x $2 &y $2 ]
15
+@color [ &byte $1 ]
16
+@rect [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
17
+@trkframe [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
18
+@chnframe [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
19
+@ctlframe [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
20
+@label [ &x $2 &y $2 &color $1 &addr $2 ]
21
+@knob [ &x $2 &y $2 &value $1 ]
22
+@head [ &pos $1 ]
23
+@track [ &active $1 &ch1 $20 &ch2 $20 &ch3 $20 &ch4 $20 ]
24
+@adsr [ &ch1a $1 &ch1d $1 &ch1s $1 &ch1r $1 &ch2a $1 &ch2d $1 &ch2s $1 &ch2r $1 &ch3a $1 &ch3d $1 &ch3s $1 &ch3r $1 &ch4a $1 &ch4d $1 &ch4s $1 &ch4r $1 ]
25
+@volume [ &ch1 $1 &ch2 $1 &ch3 $1 &ch4 $1 ]
26 26
 
27 27
 ( devices )
28 28
 
29
-|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
30
-|0110 ;Console { vector 2 pad 6 char 1 byte 1 short 2 string 2 }
31
-|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 addr 2 color 1 }
32
-|0130 ;Audio { wave 2 envelope 2 pad 4 volume 1 pitch 1 play 1 value 2 delay 2 finish 1 }
33
-|0140 ;Controller { vector 2 button 1 key 1 }
34
-|0160 ;Mouse  { vector 2 x 2 y 2 state 1 chord 1 }
35
-|0170 ;File { vector 2 success 2 offset 2 pad 2 name 2 length 2 load 2 save 2 }
29
+|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
30
+|10 @Console [ &vector $2 &pad $6 &char $1 &byte $1 &short $2 &string $2 ]
31
+|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
32
+|30 @Audio [ &wave $2 &envelope $2 &pad $4 &volume $1 &pitch $1 &play $1 &value $2 &delay $2 &finish $1 ]
33
+|40 @Controller [ &vector $2 &button $1 &key $1 ]
34
+|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
35
+|70 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
36 36
 
37 37
 ( vectors )
38 38
 
39
-|0200
39
+|0100
40 40
 
41
-	( theme ) #e0fa =System.r #30fa =System.g #30fa =System.b
42
-	( vectors ) ,on-screen =Screen.vector
43
-	( vectors ) ,on-mouse =Mouse.vector
44
-	( vectors ) ,on-button =Controller.vector
41
+	( theme ) #e0fa .System/r DEO2 #30fa .System/g DEO2 #30fa .System/b DEO2
42
+	( vectors ) ;on-screen .Screen/vector DEO2
43
+	( vectors ) ;on-mouse .Mouse/vector DEO2
44
+	( vectors ) ;on-button .Controller/vector DEO2
45 45
 
46
-	~Screen.width #0002 DIV2 DUP2 #0080 SUB2 =trkframe.x1
47
-	 #0080 ADD2 =trkframe.x2
48
-	~Screen.height #0002 DIV2 DUP2 #0038 SUB2 #0010 SUB2 =trkframe.y1
49
-	 #0038 ADD2 #0010 SUB2 =trkframe.y2
46
+	.Screen/width DEI2 #0002 DIV2 DUP2 #0080 SUB2 .trkframe/x1 POK2
47
+	 #0080 ADD2 .trkframe/x2 POK2
48
+	.Screen/height DEI2 #0002 DIV2 DUP2 #0038 SUB2 #0010 SUB2 .trkframe/y1 POK2
49
+	 #0038 ADD2 #0010 SUB2 .trkframe/y2 POK2
50 50
 
51
-	~trkframe.x1 =chnframe.x1 ~trkframe.y2 =chnframe.y1
52
-	~chnframe.x1 #0030 ADD2 =chnframe.x2 ~chnframe.y1 #0030 ADD2 =chnframe.y2
51
+	.trkframe/x1 PEK2 .chnframe/x1 POK2 .trkframe/y2 PEK2 .chnframe/y1 POK2
52
+	.chnframe/x1 PEK2 #0030 ADD2 .chnframe/x2 POK2 .chnframe/y1 PEK2 #0030 ADD2 .chnframe/y2 POK2
53 53
 
54
-	~chnframe.x2 =ctlframe.x1 ~chnframe.y1 =ctlframe.y1
55
-	~trkframe.x2 =ctlframe.x2 ~chnframe.y2 =ctlframe.y2
54
+	.chnframe/x2 PEK2 .ctlframe/x1 POK2 .chnframe/y1 PEK2 .ctlframe/y1 POK2
55
+	.trkframe/x2 PEK2 .ctlframe/x2 POK2 .chnframe/y2 PEK2 .ctlframe/y2 POK2
56 56
 
57 57
 	( default settings )
58
-	,adsr-envelope =Audio.envelope
59
-	#00 =adsr.ch1a #40 =adsr.ch1d #80 =adsr.ch1s #c0 =adsr.ch1r #88 =volume.ch1
60
-	#10 =adsr.ch2a #50 =adsr.ch2d #90 =adsr.ch2s #d0 =adsr.ch2r #88 =volume.ch2
61
-	#20 =adsr.ch3a #60 =adsr.ch3d #a0 =adsr.ch3s #e0 =adsr.ch3r #88 =volume.ch3
58
+	;adsr-envelope .Audio/envelope DEO2
59
+	#00 .adsr/ch1a POK #40 .adsr/ch1d POK #80 .adsr/ch1s POK #c0 .adsr/ch1r POK #88 .volume/ch1 POK
60
+	#10 .adsr/ch2a POK #50 .adsr/ch2d POK #90 .adsr/ch2s POK #d0 .adsr/ch2r POK #88 .volume/ch2 POK
61
+	#20 .adsr/ch3a POK #60 .adsr/ch3d POK #a0 .adsr/ch3s POK #e0 .adsr/ch3r POK #88 .volume/ch3 POK
62 62
 
63
-	~volume.ch3 =Audio.volume
63
+	.volume/ch3 PEK .Audio/volume DEO
64 64
 
65
-	,draw-timeline JSR2
66
-	,draw-controls JSR2
67
-	,draw-channels JSR2
65
+	;draw-timeline JSR2
66
+	;draw-controls JSR2
67
+	;draw-channels JSR2
68 68
 
69 69
 BRK
70 70
 
71 71
 @on-screen ( -> )
72 72
 	
73
-	,move-head JSR2
74
-	~head.pos #08 MOD #00 NEQ ^$skip JNZ
75
-		,bang JSR2
76
-	$skip
73
+	;move-head JSR2
74
+	.head/pos PEK #08 MOD #00 NEQ ,&skip JNZ
75
+		;bang JSR2
76
+	&skip
77 77
 
78 78
 BRK
79 79
 
80 80
 @on-mouse ( -> )
81 81
 
82
-	~Mouse.state #00 EQU ,$click-end JNZ2
83
-		~Mouse.x ~trkframe.x1 GTH2 ~Mouse.x ~trkframe.x2 LTH2 #0101 EQU2
84
-		~Mouse.y ~trkframe.y1 GTH2 ~Mouse.y ~trkframe.y2 LTH2 #0101 EQU2
85
-		#0101 EQU2 ,touch-trk JNZ2
86
-		~Mouse.x ~chnframe.x1 GTH2 ~Mouse.x ~chnframe.x2 LTH2 #0101 EQU2
87
-		~Mouse.y ~chnframe.y1 8+ GTH2 ~Mouse.y ~chnframe.y2 8- LTH2 #0101 EQU2
88
-		#0101 EQU2 ,touch-chn JNZ2
89
-		~Mouse.x ~ctlframe.x1 GTH2 ~Mouse.x ~ctlframe.x2 LTH2 #0101 EQU2
90
-		~Mouse.y ~ctlframe.y1 8+ GTH2 ~Mouse.y ~ctlframe.y2 8- LTH2 #0101 EQU2
91
-		#0101 EQU2 ,touch-ctl JNZ2	
92
-	$click-end
82
+	.Mouse/state DEI #00 EQU ;&click-end JNZ2
83
+		.Mouse/x DEI2 .trkframe/x1 PEK2 GTH2 .Mouse/x DEI2 .trkframe/x2 PEK2 LTH2 #0101 EQU2
84
+		.Mouse/y DEI2 .trkframe/y1 PEK2 GTH2 .Mouse/y DEI2 .trkframe/y2 PEK2 LTH2 #0101 EQU2
85
+		#0101 EQU2 ;touch-trk JNZ2
86
+		.Mouse/x DEI2 .chnframe/x1 PEK2 GTH2 .Mouse/x DEI2 .chnframe/x2 PEK2 LTH2 #0101 EQU2
87
+		.Mouse/y DEI2 .chnframe/y1 PEK2 8+ GTH2 .Mouse/y DEI2 .chnframe/y2 PEK2 8- LTH2 #0101 EQU2
88
+		#0101 EQU2 ;touch-chn JNZ2
89
+		.Mouse/x DEI2 .ctlframe/x1 PEK2 GTH2 .Mouse/x DEI2 .ctlframe/x2 PEK2 LTH2 #0101 EQU2
90
+		.Mouse/y DEI2 .ctlframe/y1 PEK2 8+ GTH2 .Mouse/y DEI2 .ctlframe/y2 PEK2 8- LTH2 #0101 EQU2
91
+		#0101 EQU2 ;touch-ctl JNZ2	
92
+	&click-end
93 93
 
94
-	,draw-cursor JSR2
94
+	;draw-cursor JSR2
95 95
 
96 96
 BRK
97 97
 
98 98
 @on-button ( -> )
99 99
 
100
-	~Controller.key 
101
-	DUP #61 NEQ ^$no-c JNZ
102
-		,notes PEK2 ,play JSR2 $no-c
103
-	DUP #73 NEQ ^$no-d JNZ
104
-		,notes #0001 ADD2 PEK2 ,play JSR2 $no-d
105
-	DUP #64 NEQ ^$no-e JNZ
106
-		,notes #0002 ADD2 PEK2 ,play JSR2 $no-e
107
-	DUP #66 NEQ ^$no-f JNZ
108
-		,notes #0003 ADD2 PEK2 ,play JSR2 $no-f
109
-	DUP #67 NEQ ^$no-g JNZ
110
-		,notes #0004 ADD2 PEK2 ,play JSR2 $no-g
111
-	DUP #68 NEQ ^$no-a JNZ
112
-		,notes #0005 ADD2 PEK2 ,play JSR2 $no-a
113
-	DUP #6a NEQ ^$no-b JNZ
114
-		,notes #0006 ADD2 PEK2 ,play JSR2 $no-b
115
-	DUP #6b NEQ ^$no-c2 JNZ
116
-		,notes #0007 ADD2 PEK2 ,play JSR2 $no-c2
100
+	.Controller/key DEI
101
+	DUP #61 NEQ ,&no-c JNZ
102
+		;notes GET ;play JSR2 &no-c
103
+	DUP #73 NEQ ,&no-d JNZ
104
+		;notes #0001 ADD2 GET ;play JSR2 &no-d
105
+	DUP #64 NEQ ,&no-e JNZ
106
+		;notes #0002 ADD2 GET ;play JSR2 &no-e
107
+	DUP #66 NEQ ,&no-f JNZ
108
+		;notes #0003 ADD2 GET ;play JSR2 &no-f
109
+	DUP #67 NEQ ,&no-g JNZ
110
+		;notes #0004 ADD2 GET ;play JSR2 &no-g
111
+	DUP #68 NEQ ,&no-a JNZ
112
+		;notes #0005 ADD2 GET ;play JSR2 &no-a
113
+	DUP #6a NEQ ,&no-b JNZ
114
+		;notes #0006 ADD2 GET ;play JSR2 &no-b
115
+	DUP #6b NEQ ,&no-c2 JNZ
116
+		;notes #0007 ADD2 GET ;play JSR2 &no-c2
117 117
 	POP
118 118
 
119 119
 BRK
120 120
 
121 121
 @play ( pitch -- )
122 122
 
123
-	#80 ORA =Audio.pitch
124
-	,triangle-wave =Audio.wave
125
-	~track.active =Audio.play
123
+	#80 ORA .Audio/pitch DEO
124
+	;triangle-wave .Audio/wave DEO2
125
+	.track/active PEK .Audio/play DEO
126 126
 
127 127
 RTN
128 128
 
129 129
 @touch-trk ( -- )
130 130
 	
131
-	,clear-notes JSR2
131
+	;clear-notes JSR2
132 132
 	( get note )
133
-	#0e ~Mouse.y ~trkframe.y1 SUB2 SWP POP #08 DIV SUB
134
-	~Mouse.state #10 NEQ ^$no-erase JNZ POP #00 $no-erase
133
+	#0e .Mouse/y DEI2 .trkframe/y1 PEK2 SUB2 SWP POP #08 DIV SUB
134
+	.Mouse/state DEI #10 NEQ ,&no-erase JNZ POP #00 &no-erase
135 135
 	( edit note )
136
-	TRACK #00 ~Mouse.x ~trkframe.x1 SUB2 SWP POP #08 DIV ADD2 POK2
137
-	( release ) #00 =Mouse.state
138
-	,draw-notes JSR2
136
+	TRACK #00 .Mouse/x DEI2 .trkframe/x1 PEK2 SUB2 SWP POP #08 DIV ADD2 PUT
137
+	( release ) #00 .Mouse/state DEO
138
+	;draw-notes JSR2
139 139
 
140 140
 BRK
141 141
 
142 142
 @touch-chn ( -- )
143 143
 	
144
-	,clear-notes JSR2
145
-	( save ) ~Mouse.y ~chnframe.y1 SUB2 SWP POP #08 DIV #01 SUB =track.active
146
-	( release ) #00 =Mouse.state
147
-	,draw-channels JSR2
148
-	,draw-notes JSR2
149
-	,draw-controls JSR2
144
+	;clear-notes JSR2
145
+	( save ) .Mouse/y DEI2 .chnframe/y1 PEK2 SUB2 SWP POP #08 DIV #01 SUB .track/active POK
146
+	( release ) #00 .Mouse/state DEO
147
+	;draw-channels JSR2
148
+	;draw-notes JSR2
149
+	;draw-controls JSR2
150 150
 
151 151
 BRK
152 152
 
153 153
 @touch-ctl ( -- )
154 154
 	
155
-	~Mouse.x ~ctlframe.x1 SUB2 8- 8/ SWP POP #02 DIV
156
-	DUP #00 NEQ ^$no-a JNZ
157
-		,adsr #00 ~track.active #04 MUL ADD2 PEK2
158
-		#10 ~Mouse.state #10 EQU #e0 MUL ADD ADD
159
-		,adsr #00 ~track.active #04 MUL ADD2 POK2 $no-a
160
-	DUP #01 NEQ ^$no-d JNZ
161
-		,adsr #00 ~track.active #04 MUL ADD2 #0001 ADD2 PEK2
162
-		#10 ~Mouse.state #10 EQU #e0 MUL ADD ADD
163
-		,adsr #00 ~track.active #04 MUL ADD2 #0001 ADD2 POK2 $no-d
164
-	DUP #02 NEQ ^$no-s JNZ
165
-		,adsr #00 ~track.active #04 MUL ADD2 #0002 ADD2 PEK2
166
-		#10 ~Mouse.state #10 EQU #e0 MUL ADD ADD
167
-		,adsr #00 ~track.active #04 MUL ADD2 #0002 ADD2 POK2 $no-s
168
-	DUP #03 NEQ ^$no-r JNZ
169
-		,adsr #00 ~track.active #04 MUL ADD2 #0003 ADD2 PEK2
170
-		#10 ~Mouse.state #10 EQU #e0 MUL ADD ADD
171
-		,adsr #00 ~track.active #04 MUL ADD2 #0003 ADD2 POK2 $no-r
172
-	DUP #05 NEQ ^$no-left JNZ
173
-		,volume #00 ~track.active ADD2 PEK2
174
-		#10 ~Mouse.state #10 EQU #e0 MUL ADD ADD
175
-		,volume #00 ~track.active ADD2 POK2 $no-left
176
-	DUP #06 NEQ ^$no-right JNZ
177
-		,volume #00 ~track.active ADD2 PEK2
178
-		DUP #f0 AND STH #01 ~Mouse.state #10 EQU #0e MUL ADD ADD #0f AND STHr ADD
179
-		,volume #00 ~track.active ADD2 POK2 $no-right
155
+	.Mouse/x DEI2 .ctlframe/x1 PEK2 SUB2 8- 8/ SWP POP #02 DIV
156
+	DUP #00 NEQ ,&no-a JNZ
157
+		;adsr #00 .track/active PEK #04 MUL ADD2 GET
158
+		#10 .Mouse/state DEI #10 EQU #e0 MUL ADD ADD
159
+		;adsr #00 .track/active PEK #04 MUL ADD2 PUT &no-a
160
+	DUP #01 NEQ ,&no-d JNZ
161
+		;adsr #00 .track/active PEK #04 MUL ADD2 #0001 ADD2 GET
162
+		#10 .Mouse/state DEI #10 EQU #e0 MUL ADD ADD
163
+		;adsr #00 .track/active PEK #04 MUL ADD2 #0001 ADD2 PUT &no-d
164
+	DUP #02 NEQ ,&no-s JNZ
165
+		;adsr #00 .track/active PEK #04 MUL ADD2 #0002 ADD2 GET
166
+		#10 .Mouse/state DEI #10 EQU #e0 MUL ADD ADD
167
+		;adsr #00 .track/active PEK #04 MUL ADD2 #0002 ADD2 PUT &no-s
168
+	DUP #03 NEQ ,&no-r JNZ
169
+		;adsr #00 .track/active PEK #04 MUL ADD2 #0003 ADD2 GET
170
+		#10 .Mouse/state DEI #10 EQU #e0 MUL ADD ADD
171
+		;adsr #00 .track/active PEK #04 MUL ADD2 #0003 ADD2 PUT &no-r
172
+	DUP #05 NEQ ,&no-left JNZ
173
+		;volume #00 .track/active PEK ADD2 GET
174
+		#10 .Mouse/state DEI #10 EQU #e0 MUL ADD ADD
175
+		;volume #00 .track/active PEK ADD2 PUT &no-left
176
+	DUP #06 NEQ ,&no-right JNZ
177
+		;volume #00 .track/active PEK ADD2 GET
178
+		DUP #f0 AND STH #01 .Mouse/state DEI #10 EQU #0e MUL ADD ADD #0f AND STHr ADD
179
+		;volume #00 .track/active PEK ADD2 PUT &no-right
180 180
 	POP
181
-	( release ) #00 =Mouse.state
182
-	,draw-controls JSR2
181
+	( release ) #00 .Mouse/state DEO
182
+	;draw-controls JSR2
183 183
 
184 184
 BRK
185 185
 
186 186
 @bang ( -- )
187 187
 		
188
-	,track.ch1 #00 ~head.pos #08 DIV ADD2 PEK2 
188
+	;track/ch1 #00 .head/pos PEK #08 DIV ADD2 GET
189 189
 	#01 SUB
190
-	DUP #ff NEQ ^$skip1 JNZ
191
-		POP ^$listen2 JMP
192
-	$skip1
193
-	#00 SWP ,notes ADD2 PEK2 #80 ORA =Audio.pitch
194
-	~volume.ch1 =Audio.volume
195
-	,square-wave =Audio.wave
196
-	#00 =Audio.play
197
-	$listen2
198
-	,track.ch2 #00 ~head.pos #08 DIV ADD2 PEK2 
190
+	DUP #ff NEQ ,&skip1 JNZ
191
+		POP ,&listen2 JMP
192
+	&skip1
193
+	#00 SWP ;notes ADD2 GET #80 ORA .Audio/pitch DEO
194
+	.volume/ch1 PEK .Audio/volume DEO
195
+	;square-wave .Audio/wave DEO2
196
+	#00 .Audio/play DEO
197
+	&listen2
198
+	;track/ch2 #00 .head/pos PEK #08 DIV ADD2 GET
199 199
 	#01 SUB
200
-	DUP #ff NEQ ^$skip2 JNZ
201
-		POP ^$listen3 JMP
202
-	$skip2
203
-	#00 SWP ,notes ADD2 PEK2 #80 ORA =Audio.pitch
204
-	~volume.ch2 =Audio.volume
205
-	,square-wave =Audio.wave
206
-	#01 =Audio.play
207
-	$listen3
208
-	,track.ch3 #00 ~head.pos #08 DIV ADD2 PEK2 
200
+	DUP #ff NEQ ,&skip2 JNZ
201
+		POP ,&listen3 JMP
202
+	&skip2
203
+	#00 SWP ;notes ADD2 GET #80 ORA .Audio/pitch DEO
204
+	.volume/ch2 PEK .Audio/volume DEO
205
+	;square-wave .Audio/wave DEO2
206
+	#01 .Audio/play DEO
207
+	&listen3
208
+	;track/ch3 #00 .head/pos PEK #08 DIV ADD2 GET
209 209
 	#01 SUB
210
-	DUP #ff NEQ ^$skip3 JNZ
211
-		POP ^$end JMP
212
-	$skip3
213
-	#00 SWP ,notes ADD2 PEK2 #80 ORA =Audio.pitch
214
-	~volume.ch3 =Audio.volume
215
-	,triangle-wave =Audio.wave
216
-	#02 =Audio.play
217
-	$end
210
+	DUP #ff NEQ ,&skip3 JNZ
211
+		POP ,&end JMP
212
+	&skip3
213
+	#00 SWP ;notes ADD2 GET #80 ORA .Audio/pitch DEO
214
+	.volume/ch3 PEK .Audio/volume DEO
215
+	;triangle-wave .Audio/wave DEO2
216
+	#02 .Audio/play DEO
217
+	&end
218 218
 
219 219
 RTN
220 220
 
221 221
 @move-head ( -- )
222 222
 
223 223
 	( clear )
224
-	~trkframe.y1 8- =Screen.y
225
-	~trkframe.x1 #00 ~head.pos ADD2 =Screen.x
226
-	,head_icn =Screen.addr
227
-	#20 =Screen.color
228
-	( incr ) ~head.pos #01 ADD =head.pos
229
-	~trkframe.x1 #00 ~head.pos ADD2 =Screen.x
230
-	,head_icn =Screen.addr 
231
-	#21 ( if note ) TRACK #00 ~head.pos #08 DIV ADD2 PEK2 #00 NEQ ADD =Screen.color
224
+	.trkframe/y1 PEK2 8- .Screen/y DEO2
225
+	.trkframe/x1 PEK2 #00 .head/pos PEK ADD2 .Screen/x DEO2
226
+	;head_icn .Screen/addr DEO2
227
+	#20 .Screen/color DEO
228
+	( incr ) .head/pos PEK #01 ADD .head/pos POK
229
+	.trkframe/x1 PEK2 #00 .head/pos PEK ADD2 .Screen/x DEO2
230
+	;head_icn .Screen/addr DEO2
231
+	#21 ( if note ) TRACK #00 .head/pos PEK #08 DIV ADD2 GET #00 NEQ ADD .Screen/color DEO
232 232
 
233 233
 RTN
234 234
 
235 235
 @clear-notes ( -- )
236 236
 
237 237
 	#00 #20
238
-	$loop
239
-		( load ) OVR #00 SWP TRACK ADD2 PEK2
240
-		DUP STH #00 SWP #0e SWP SUB 8* ~trkframe.y1 ADD2 =Screen.y
241
-		OVR #00 SWP 8* ~trkframe.x1 ADD2 =Screen.x
242
-		STHr #00 EQU ^$skip JNZ
243
-			#20 =Screen.color
244
-		$skip
238
+	&loop
239
+		( load ) OVR #00 SWP TRACK ADD2 GET
240
+		DUP STH #00 SWP #0e SWP SUB 8* .trkframe/y1 PEK2 ADD2 .Screen/y DEO2
241
+		OVR #00 SWP 8* .trkframe/x1 PEK2 ADD2 .Screen/x DEO2
242
+		STHr #00 EQU ,&skip JNZ
243
+			#20 .Screen/color DEO
244
+		&skip
245 245
 		( incr ) SWP #01 ADD SWP
246
-		DUP2 LTH ^$loop JNZ
246
+		DUP2 LTH ,&loop JNZ
247 247
 	POP2
248 248
 
249 249
 RTN
... ...
@@ -251,63 +251,63 @@ RTN
251 251
 @draw-notes ( -- )
252 252
 
253 253
 	#00 #20
254
-	$notes-loop
255
-		( load ) OVR #00 SWP TRACK ADD2 PEK2
256
-		DUP STH #00 SWP #0e SWP SUB 8* ~trkframe.y1 ADD2 =Screen.y
257
-		OVR #00 SWP 8* ~trkframe.x1 ADD2 =Screen.x
258
-		,note_icn =Screen.addr
259
-		STHr #00 EQU ^$skip JNZ
260
-			#25 =Screen.color
261
-		$skip
254
+	&notes-loop
255
+		( load ) OVR #00 SWP TRACK ADD2 GET
256
+		DUP STH #00 SWP #0e SWP SUB 8* .trkframe/y1 PEK2 ADD2 .Screen/y DEO2
257
+		OVR #00 SWP 8* .trkframe/x1 PEK2 ADD2 .Screen/x DEO2
258
+		;note_icn .Screen/addr DEO2
259
+		STHr #00 EQU ,&skip JNZ
260
+			#25 .Screen/color DEO
261
+		&skip
262 262
 		( incr ) SWP #01 ADD SWP
263
-		DUP2 LTH ^$notes-loop JNZ
263
+		DUP2 LTH ,&notes-loop JNZ
264 264
 	POP2
265
-	,draw-bars JSR2
265
+	;draw-bars JSR2
266 266
 
267 267
 RTN
268 268
 
269 269
 @draw-bars ( -- )
270 270
 
271
-	~trkframe.x1 ~trkframe.y1 ~trkframe.x2 ~trkframe.y2 #01 ,line-rect JSR2
271
+	.trkframe/x1 PEK2 .trkframe/y1 PEK2 .trkframe/x2 PEK2 .trkframe/y2 PEK2 #01 ;line-rect JSR2
272 272
 
273 273
 	( grid )
274
-	~trkframe.y1 #0010 SUB2 =Screen.y
275
-	,font_hex =Screen.addr
276
-	#0000 #0100 
277
-	$loop 
278
-		OVR2 SWP POP #02 DIV #0f AND #00 NEQ ^$skip JNZ
279
-			OVR2 ~trkframe.x1 ADD2 =Screen.x
280
-			~trkframe.y1 #0010 SUB2 =Screen.y
281
-			#22 =Screen.color
282
-			~Screen.addr 8+ =Screen.addr
283
-			OVR2 ~trkframe.x1 ADD2 ~trkframe.y1 ++ ~trkframe.y2 #01 ,line-vertical-dotted JSR2
284
-		$skip
285
-		OVR2 ~trkframe.x1 ADD2 ~trkframe.y1 ~trkframe.y2 #01 ,line-vertical-dotted JSR2
274
+	.trkframe/y1 PEK2 #0010 SUB2 .Screen/y DEO2
275
+	;font_hex .Screen/addr DEO2
276
+	#0000 #0100
277
+	&loop
278
+		OVR2 SWP POP #02 DIV #0f AND #00 NEQ ,&skip JNZ
279
+			OVR2 .trkframe/x1 PEK2 ADD2 .Screen/x DEO2
280
+			.trkframe/y1 PEK2 #0010 SUB2 .Screen/y DEO2
281
+			#22 .Screen/color DEO
282
+			.Screen/addr DEI2 8+ .Screen/addr DEO2
283
+			OVR2 .trkframe/x1 PEK2 ADD2 .trkframe/y1 PEK2 ++ .trkframe/y2 PEK2 #01 ;line-vertical-dotted JSR2
284
+		&skip
285
+		OVR2 .trkframe/x1 PEK2 ADD2 .trkframe/y1 PEK2 .trkframe/y2 PEK2 #01 ;line-vertical-dotted JSR2
286 286
 		SWP2 8+ SWP2
287
-		OVR2 OVR2 LTH2 ^$loop JNZ
287
+		OVR2 OVR2 LTH2 ,&loop JNZ
288 288
 	POP2
289 289
 	POP2
290 290
 
291
-	~trkframe.x1 ~trkframe.x2 ~trkframe.y1 8- #0040 ADD2 #01 ,line-horizontal-dotted JSR2
291
+	.trkframe/x1 PEK2 .trkframe/x2 PEK2 .trkframe/y1 PEK2 8- #0040 ADD2 #01 ;line-horizontal-dotted JSR2
292 292
 
293 293
 RTN
294 294
 
295 295
 @draw-octave ( x y -- )
296 296
 
297
-	=Screen.y
298
-	=Screen.x
299
-	,octave_icn =Screen.addr
300
-	~Screen.y ~Screen.y #0038 ADD2
301
-	$loop
302
-		OVR2 =Screen.y
303
-		#21 =Screen.color
304
-		~Screen.addr 8+ =Screen.addr
305
-		~Screen.x 8+ =Screen.x
306
-		#21 =Screen.color
307
-		~Screen.addr 8+ =Screen.addr
308
-		~Screen.x 8- =Screen.x
297
+	.Screen/y DEO2
298
+	.Screen/x DEO2
299
+	;octave_icn .Screen/addr DEO2
300
+	.Screen/y DEI2 .Screen/y DEI2 #0038 ADD2
301
+	&loop
302
+		OVR2 .Screen/y DEO2
303
+		#21 .Screen/color DEO
304
+		.Screen/addr DEI2 8+ .Screen/addr DEO2
305
+		.Screen/x DEI2 8+ .Screen/x DEO2
306
+		#21 .Screen/color DEO
307
+		.Screen/addr DEI2 8+ .Screen/addr DEO2
308
+		.Screen/x DEI2 8- .Screen/x DEO2
309 309
 		SWP2 8+ SWP2
310
-		OVR2 OVR2 LTH2 ^$loop JNZ
310
+		OVR2 OVR2 LTH2 ,&loop JNZ
311 311
 	POP2
312 312
 	POP2
313 313
 
... ...
@@ -315,103 +315,103 @@ RTN
315 315
 
316 316
 @draw-octaves ( -- )
317 317
 	
318
-	~trkframe.x1 #0018 SUB2 DUP2 ~trkframe.y1 ,draw-octave JSR2
319
-	~trkframe.y1 #0038 ADD2 ,draw-octave JSR2
320
-	~trkframe.x1 #0028 SUB2 =Screen.x
321
-	~trkframe.y1 #0030 ADD2 =Screen.y
322
-	,font_hex #0028 ADD2 =Screen.addr
323
-	#23 =Screen.color 
324
-	~trkframe.x1 #0030 SUB2 =Screen.x
325
-	,font_hex #0060 ADD2 =Screen.addr
326
-	#23 =Screen.color 
327
-	~trkframe.x1 #0028 SUB2 =Screen.x
328
-	~trkframe.y1 #0068 ADD2 =Screen.y
329
-	,font_hex #0020 ADD2 =Screen.addr
330
-	#23 =Screen.color 
331
-	~trkframe.x1 #0030 SUB2 =Screen.x
332
-	,font_hex #0060 ADD2 =Screen.addr
333
-	#23 =Screen.color 
318
+	.trkframe/x1 PEK2 #0018 SUB2 DUP2 .trkframe/y1 PEK2 ;draw-octave JSR2
319
+	.trkframe/y1 PEK2 #0038 ADD2 ;draw-octave JSR2
320
+	.trkframe/x1 PEK2 #0028 SUB2 .Screen/x DEO2
321
+	.trkframe/y1 PEK2 #0030 ADD2 .Screen/y DEO2
322
+	;font_hex #0028 ADD2 .Screen/addr DEO2
323
+	#23 .Screen/color DEO
324
+	.trkframe/x1 PEK2 #0030 SUB2 .Screen/x DEO2
325
+	;font_hex #0060 ADD2 .Screen/addr DEO2
326
+	#23 .Screen/color DEO
327
+	.trkframe/x1 PEK2 #0028 SUB2 .Screen/x DEO2
328
+	.trkframe/y1 PEK2 #0068 ADD2 .Screen/y DEO2
329
+	;font_hex #0020 ADD2 .Screen/addr DEO2
330
+	#23 .Screen/color DEO
331
+	.trkframe/x1 PEK2 #0030 SUB2 .Screen/x DEO2
332
+	;font_hex #0060 ADD2 .Screen/addr DEO2
333
+	#23 .Screen/color DEO
334 334
 
335 335
 RTN
336 336
 
337 337
 @draw-timeline ( -- )
338 338
 
339
-	,draw-bars JSR2
340
-	,draw-octaves JSR2
339
+	;draw-bars JSR2
340
+	;draw-octaves JSR2
341 341
 
342 342
 RTN
343 343
 
344 344
 @draw-knob ( x* y* value -- )
345 345
 	
346
-	( load ) =knob.value =knob.y =knob.x
347
-	~knob.x =Screen.x
348
-	~knob.y =Screen.y ,knob_icns =Screen.addr #21 =Screen.color 
349
-	~knob.x 8+ =Screen.x ,knob_icns 8+ =Screen.addr #21 =Screen.color 
350
-	~knob.y 8+ =Screen.y ,knob_icns #0018 ADD2 =Screen.addr #21 =Screen.color 
351
-	~knob.x =Screen.x ,knob_icns #0010 ADD2 =Screen.addr #21 =Screen.color 
352
-	~knob.x #00 #00 ~knob.value ,knob_offsetx ADD2 PEK2 ADD2 =Screen.x
353
-	~knob.y #00 #00 ~knob.value ,knob_offsety ADD2 PEK2 ADD2 =Screen.y
354
-	,knob_icns #0020 ADD2 =Screen.addr
355
-	#25 =Screen.color 
356
-	~knob.x #0004 ADD2 =Screen.x
357
-	~knob.y #0010 ADD2 =Screen.y
358
-	,font_hex #00 ~knob.value #08 MUL ADD2 =Screen.addr
359
-	#21 =Screen.color 
346
+	( load ) .knob/value POK .knob/y POK2 .knob/x POK2
347
+	.knob/x PEK2 .Screen/x DEO2
348
+	.knob/y PEK2 .Screen/y DEO2 ;knob_icns .Screen/addr DEO2 #21 .Screen/color DEO
349
+	.knob/x PEK2 8+ .Screen/x DEO2 ;knob_icns 8+ .Screen/addr DEO2 #21 .Screen/color DEO
350
+	.knob/y PEK2 8+ .Screen/y DEO2 ;knob_icns #0018 ADD2 .Screen/addr DEO2 #21 .Screen/color DEO
351
+	.knob/x PEK2 .Screen/x DEO2 ;knob_icns #0010 ADD2 .Screen/addr DEO2 #21 .Screen/color DEO
352
+	.knob/x PEK2 #00 #00 .knob/value PEK ;knob_offsetx ADD2 GET ADD2 .Screen/x DEO2
353
+	.knob/y PEK2 #00 #00 .knob/value PEK ;knob_offsety ADD2 GET ADD2 .Screen/y DEO2
354
+	;knob_icns #0020 ADD2 .Screen/addr DEO2
355
+	#25 .Screen/color DEO
356
+	.knob/x PEK2 #0004 ADD2 .Screen/x DEO2
357
+	.knob/y PEK2 #0010 ADD2 .Screen/y DEO2
358
+	;font_hex #00 .knob/value PEK #08 MUL ADD2 .Screen/addr DEO2
359
+	#21 .Screen/color DEO
360 360
 
361 361
 RTN
362 362
 
363 363
 @draw-controls ( -- )
364 364
 	
365
-	~ctlframe.x1 ~ctlframe.y1 ~ctlframe.x2 ~ctlframe.y2 #01 ,line-rect JSR2
365
+	.ctlframe/x1 PEK2 .ctlframe/y1 PEK2 .ctlframe/x2 PEK2 .ctlframe/y2 PEK2 #01 ;line-rect JSR2
366 366
 	( env )
367
-	~ctlframe.x1 8+ ~ctlframe.y1 8+ #22 ,env_txt ,draw-label JSR2
368
-	~ctlframe.x1 8+ ~ctlframe.y1 #0010 ADD2 
369
-		,adsr #00 ~track.active #04 MUL ADD2 PEK2 #04 SFT
370
-		,draw-knob JSR2
371
-	~ctlframe.x1 #0018 ADD2 ~ctlframe.y1 #0010 ADD2
372
-		,adsr #00 ~track.active #04 MUL ADD2 #0001 ADD2 PEK2 #04 SFT
373
-		,draw-knob JSR2
374
-	~ctlframe.x1 #0028 ADD2 ~ctlframe.y1 #0010 ADD2
375
-		,adsr #00 ~track.active #04 MUL ADD2 #0002 ADD2 PEK2 #04 SFT
376
-		,draw-knob JSR2
377
-	~ctlframe.x1 #0038 ADD2 ~ctlframe.y1 #0010 ADD2 
378
-		,adsr #00 ~track.active #04 MUL ADD2 #0003 ADD2 PEK2 #04 SFT
379
-		,draw-knob JSR2
367
+	.ctlframe/x1 PEK2 8+ .ctlframe/y1 PEK2 8+ #22 ;env_txt ;draw-label JSR2
368
+	.ctlframe/x1 PEK2 8+ .ctlframe/y1 PEK2 #0010 ADD2
369
+		;adsr #00 .track/active PEK #04 MUL ADD2 GET #04 SFT
370
+		;draw-knob JSR2
371
+	.ctlframe/x1 PEK2 #0018 ADD2 .ctlframe/y1 PEK2 #0010 ADD2
372
+		;adsr #00 .track/active PEK #04 MUL ADD2 #0001 ADD2 GET #04 SFT
373
+		;draw-knob JSR2
374
+	.ctlframe/x1 PEK2 #0028 ADD2 .ctlframe/y1 PEK2 #0010 ADD2
375
+		;adsr #00 .track/active PEK #04 MUL ADD2 #0002 ADD2 GET #04 SFT
376
+		;draw-knob JSR2
377
+	.ctlframe/x1 PEK2 #0038 ADD2 .ctlframe/y1 PEK2 #0010 ADD2
378
+		;adsr #00 .track/active PEK #04 MUL ADD2 #0003 ADD2 GET #04 SFT
379
+		;draw-knob JSR2
380 380
 	( vol )
381
-	~ctlframe.x1 #0058 ADD2 ~ctlframe.y1 8+ #22 ,vol_txt ,draw-label JSR2
382
-	~ctlframe.x1 #0058 ADD2 ~ctlframe.y1 #0010 ADD2
383
-		,volume #00 ~track.active ADD2 PEK2 #04 SFT
384
-	,draw-knob JSR2
385
-	~ctlframe.x1 #0068 ADD2 ~ctlframe.y1 #0010 ADD2 
386
-		,volume #00 ~track.active ADD2 PEK2 #0f AND
387
-	,draw-knob JSR2
381
+	.ctlframe/x1 PEK2 #0058 ADD2 .ctlframe/y1 PEK2 8+ #22 ;vol_txt ;draw-label JSR2
382
+	.ctlframe/x1 PEK2 #0058 ADD2 .ctlframe/y1 PEK2 #0010 ADD2
383
+		;volume #00 .track/active PEK ADD2 GET #04 SFT
384
+	;draw-knob JSR2
385
+	.ctlframe/x1 PEK2 #0068 ADD2 .ctlframe/y1 PEK2 #0010 ADD2
386
+		;volume #00 .track/active PEK ADD2 GET #0f AND
387
+	;draw-knob JSR2
388 388
 
389 389
 RTN
390 390
 
391 391
 @draw-channels
392 392
 	
393
-	~chnframe.x1 ~chnframe.y1 ~chnframe.x2 ~chnframe.y2 #01 ,line-rect JSR2
394
-	~chnframe.x1 8+ ~chnframe.y1 8+ #21 ~track.active #00 EQU #07 MUL ADD ,ch1_txt ,draw-label JSR2
395
-	~chnframe.x1 8+ ~chnframe.y1 #0010 ADD2 #21 ~track.active #01 EQU #07 MUL ADD ,ch2_txt ,draw-label JSR2
396
-	~chnframe.x1 8+ ~chnframe.y1 #0018 ADD2 #21 ~track.active #02 EQU #07 MUL ADD ,ch3_txt ,draw-label JSR2
397
-	~chnframe.x1 8+ ~chnframe.y1 #0020 ADD2 #21 ~track.active #03 EQU #07 MUL ADD ,ch4_txt ,draw-label JSR2
393
+	.chnframe/x1 PEK2 .chnframe/y1 PEK2 .chnframe/x2 PEK2 .chnframe/y2 PEK2 #01 ;line-rect JSR2
394
+	.chnframe/x1 PEK2 8+ .chnframe/y1 PEK2 8+ #21 .track/active PEK #00 EQU #07 MUL ADD ;ch1_txt ;draw-label JSR2
395
+	.chnframe/x1 PEK2 8+ .chnframe/y1 PEK2 #0010 ADD2 #21 .track/active PEK #01 EQU #07 MUL ADD ;ch2_txt ;draw-label JSR2
396
+	.chnframe/x1 PEK2 8+ .chnframe/y1 PEK2 #0018 ADD2 #21 .track/active PEK #02 EQU #07 MUL ADD ;ch3_txt ;draw-label JSR2
397
+	.chnframe/x1 PEK2 8+ .chnframe/y1 PEK2 #0020 ADD2 #21 .track/active PEK #03 EQU #07 MUL ADD ;ch4_txt ;draw-label JSR2
398 398
 
399 399
 RTN
400 400
 
401 401
 @draw-cursor ( -- )
402 402
 
403 403
 	( clear last cursor )
404
-	,clear_icn =Screen.addr 
405
-	~pointer.x =Screen.x 
406
-	~pointer.y =Screen.y 
407
-	#30 =Screen.color
404
+	;clear_icn .Screen/addr DEO2
405
+	.pointer/x PEK2 .Screen/x DEO2
406
+	.pointer/y PEK2 .Screen/y DEO2
407
+	#30 .Screen/color DEO
408 408
 	( record pointer positions )
409
-	~Mouse.x =pointer.x ~Mouse.y =pointer.y
409
+	.Mouse/x DEI2 .pointer/x POK2 .Mouse/y DEI2 .pointer/y POK2
410 410
 	( draw new cursor )
411
-	,cursor_icn =Screen.addr 
412
-	~pointer.x =Screen.x 
413
-	~pointer.y =Screen.y 
414
-	#32 ~Mouse.state #00 NEQ ADD =Screen.color
411
+	;cursor_icn .Screen/addr DEO2
412
+	.pointer/x PEK2 .Screen/x DEO2
413
+	.pointer/y PEK2 .Screen/y DEO2
414
+	#32 .Mouse/state DEI #00 NEQ ADD .Screen/color DEO
415 415
 
416 416
 RTN
417 417
 
... ...
@@ -419,61 +419,61 @@ RTN
419 419
 
420 420
 @draw-label ( x y color addr -- )
421 421
 	
422
-	( load ) =label.addr =label.color =Screen.y =Screen.x 
423
-	~label.addr
424
-	$loop
425
-		( draw ) DUP2 PEK2 #00 SWP 8* ,font ADD2 =Screen.addr ~label.color =Screen.color
422
+	( load ) .label/addr POK2 .label/color POK .Screen/y DEO2 .Screen/x DEO2
423
+	.label/addr PEK2
424
+	&loop
425
+		( draw ) DUP2 GET #00 SWP 8* ;font ADD2 .Screen/addr DEO2 .label/color PEK .Screen/color DEO
426 426
 		( incr ) ++
427
-		( incr ) ~Screen.x 8+ =Screen.x
428
-		DUP2 PEK2 #00 NEQ ^$loop JNZ
427
+		( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
428
+		DUP2 GET #00 NEQ ,&loop JNZ
429 429
 	POP2
430 430
 
431 431
 RTN
432 432
 
433 433
 @line-vertical-dotted ( x y0 y1 color -- )
434 434
 	
435
-	=color STH2 SWP2 =Screen.x STH2r OVR2 =Screen.y
436
-	$draw-ver
437
-		( draw ) ~color =Screen.color
438
-		( incr ) SWP2 #0002 ADD2 DUP2 =Screen.y SWP2
439
-		OVR2 OVR2 LTH2 ^$draw-ver JNZ
435
+	.color POK STH2 SWP2 .Screen/x DEO2 STH2r OVR2 .Screen/y DEO2
436
+	&draw-ver
437
+		( draw ) .color PEK .Screen/color DEO
438
+		( incr ) SWP2 #0002 ADD2 DUP2 .Screen/y DEO2 SWP2
439
+		OVR2 OVR2 LTH2 ,&draw-ver JNZ
440 440
 	POP2 POP2
441 441
 
442 442
 RTN
443 443
 
444 444
 @line-horizontal-dotted ( x0 x1 y color -- )
445 445
 	
446
-	=color =Screen.y OVR2 =Screen.x
447
-	$draw-hor
448
-		( draw ) ~color =Screen.color
449
-		( incr ) SWP2 #0002 ADD2 DUP2 =Screen.x SWP2
450
-		OVR2 OVR2 LTH2 ^$draw-hor JNZ
446
+	.color POK .Screen/y DEO2 OVR2 .Screen/x DEO2
447
+	&draw-hor
448
+		( draw ) .color PEK .Screen/color DEO
449
+		( incr ) SWP2 #0002 ADD2 DUP2 .Screen/x DEO2 SWP2
450
+		OVR2 OVR2 LTH2 ,&draw-hor JNZ
451 451
 	POP2 POP2
452 452
 
453 453
 RTN
454 454
 
455 455
 @line-rect ( x1 y1 x2 y2 color )
456 456
 
457
-	( load ) =color =rect.y2 =rect.x2 DUP2 =Screen.y =rect.y1 DUP2 =Screen.x =rect.x1
458
-	$hor
459
-		( incr ) ~Screen.x ++ =Screen.x
460
-		( draw ) ~rect.y1 =Screen.y ~color =Screen.color
461
-		( draw ) ~rect.y2 =Screen.y ~color =Screen.color
462
-		~Screen.x ~rect.x2 LTH2 ^$hor JNZ
463
-	~rect.y1 =Screen.y
464
-	$ver
465
-		( draw ) ~rect.x1 =Screen.x ~color =Screen.color
466
-		( draw ) ~rect.x2 =Screen.x ~color =Screen.color
467
-		( incr ) ~Screen.y ++ =Screen.y
468
-		~Screen.y ~rect.y2 ++ LTH2 ^$ver JNZ
457
+	( load ) .color POK .rect/y2 POK2 .rect/x2 POK2 DUP2 .Screen/y DEO2 .rect/y1 POK2 DUP2 .Screen/x DEO2 .rect/x1 POK2
458
+	&hor
459
+		( incr ) .Screen/x DEI2 ++ .Screen/x DEO2
460
+		( draw ) .rect/y1 PEK2 .Screen/y DEO2 .color PEK .Screen/color DEO
461
+		( draw ) .rect/y2 PEK2 .Screen/y DEO2 .color PEK .Screen/color DEO
462
+		.Screen/x DEI2 .rect/x2 PEK2 LTH2 ,&hor JNZ
463
+	.rect/y1 PEK2 .Screen/y DEO2
464
+	&ver
465
+		( draw ) .rect/x1 PEK2 .Screen/x DEO2 .color PEK .Screen/color DEO
466
+		( draw ) .rect/x2 PEK2 .Screen/x DEO2 .color PEK .Screen/color DEO
467
+		( incr ) .Screen/y DEI2 ++ .Screen/y DEO2
468
+		.Screen/y DEI2 .rect/y2 PEK2 ++ LTH2 ,&ver JNZ
469 469
 
470 470
 RTN
471 471
 
472 472
 @adsr-envelope ( -- )
473
-	#ff ,adsr #00 ~Audio.play #04 MUL ADD2 PEK2 SOUND
474
-	#80 ,adsr #00 ~Audio.play #04 MUL ADD2 #0001 ADD2 PEK2 SOUND
475
-	#80 ,adsr #00 ~Audio.play #04 MUL ADD2 #0002 ADD2 PEK2 SOUND
476
-	#00 ,adsr #00 ~Audio.play #04 MUL ADD2 #0003 ADD2 PEK2 SOUND
473
+	#ff ;adsr #00 .Audio/play DEI #04 MUL ADD2 GET SOUND
474
+	#80 ;adsr #00 .Audio/play DEI #04 MUL ADD2 #0001 ADD2 GET SOUND
475
+	#80 ;adsr #00 .Audio/play DEI #04 MUL ADD2 #0002 ADD2 GET SOUND
476
+	#00 ;adsr #00 .Audio/play DEI #04 MUL ADD2 #0003 ADD2 GET SOUND
477 477
 	SOUND_FINISH
478 478
 	BRK
479 479
 
... ...
@@ -490,19 +490,19 @@ RTN
490 490
 	#8040 SOUND
491 491
 	BRK
492 492
 
493
-@ch1_txt [ CHN0 00 ]
494
-@ch2_txt [ CHN1 00 ]
495
-@ch3_txt [ CHN2 00 ]
496
-@ch4_txt [ ---- 00 ]
497
-@env_txt [ Envelope 00 ]
498
-@vol_txt [ Volume 00 ]
493
+@ch1_txt [ "CHN0 00 ]
494
+@ch2_txt [ "CHN1 00 ]
495
+@ch3_txt [ "CHN2 00 ]
496
+@ch4_txt [ "---- 00 ]
497
+@env_txt [ "Envelope 00 ]
498
+@vol_txt [ "Volume 00 ]
499 499
 
500 500
 @clear_icn   [ 0000 0000 0000 0000 ]
501 501
 @cursor_icn  [ 80c0 e0f0 f8e0 1000 ]
502 502
 @note_icn    [ 0000 1c3e 3e3e 1c00 ]
503 503
 @head_icn    [ 0018 1818 7e3c 1800 ]
504 504
 
505
-@notes [ 
505
+@notes [
506 506
 	3c 3e 40 41 43 45 47
507 507
 	48 4a 4c 4d 4f 51 53
508 508
 ]
... ...
@@ -516,20 +516,20 @@ RTN
516 516
 ]
517 517
 
518 518
 @octave_icn [
519
-	ff00 0000 fefe fffe 
520
-	ff01 0101 0102 fc00 
521
-	fffe fc00 fefe fffe 
522
-	ff01 0101 0102 fc00 
523
-	fffe fc00 fefe fffe 
524
-	ff01 0101 0102 fc00 
525
-	fffe fc00 0000 ff00 
526
-	ff01 0101 0102 fc00 
527
-	ff00 0000 fefe fffe 
528
-	ff01 0101 0102 fc00 
529
-	fffe fc00 fefe fffe 
530
-	ff01 0101 0102 fc00 
531
-	fffe fc00 0000 ff00 
532
-	ff01 0101 0102 fc00 
519
+	ff00 0000 fefe fffe
520
+	ff01 0101 0102 fc00
521
+	fffe fc00 fefe fffe
522
+	ff01 0101 0102 fc00
523
+	fffe fc00 fefe fffe
524
+	ff01 0101 0102 fc00
525
+	fffe fc00 0000 ff00
526
+	ff01 0101 0102 fc00
527
+	ff00 0000 fefe fffe
528
+	ff01 0101 0102 fc00
529
+	fffe fc00 fefe fffe
530
+	ff01 0101 0102 fc00
531
+	fffe fc00 0000 ff00
532
+	ff01 0101 0102 fc00
533 533
 ]
534 534
 
535 535
 @knob_offsetx [
... ...
@@ -542,19 +542,19 @@ RTN
542 542
 	00 00 01 02 03 05 06 07
543 543
 ]
544 544
 
545
-@font_hex ( 0-F ) 
545
+@font_hex ( 0-F )
546 546
 [
547 547
 	007c 8282 8282 827c 0030 1010 1010 1010
548 548
 	007c 8202 7c80 80fe 007c 8202 1c02 827c
549 549
 	000c 1424 4484 fe04 00fe 8080 7c02 827c
550 550
 	007c 8280 fc82 827c 007c 8202 1e02 0202
551 551
 	007c 8282 7c82 827c 007c 8282 7e02 827c
552
-	007c 8202 7e82 827e 00fc 8282 fc82 82fc 
553
-	007c 8280 8080 827c 00fc 8282 8282 82fc 
552
+	007c 8202 7e82 827e 00fc 8282 fc82 82fc
553
+	007c 8280 8080 827c 00fc 8282 8282 82fc
554 554
 	007c 8280 f080 827c 007c 8280 f080 8080
555 555
 ]
556 556
 
557
-@font ( spectrum-zx font ) 
557
+@font ( spectrum-zx font )
558 558
 [
559 559
 	0000 0000 0000 0000 0000 2400 7e3c 0000 0000 2400 3c42 0000 0000 6c7c 7c38 1000
560 560
 	0010 387c 7c38 1000 0038 387c 6c10 3800 0010 387c 7c10 3800 0000 0018 1800 0000
... ...
@@ -7,331 +7,337 @@
7 7
 %STEP8 { #0033 SFT2 }
8 8
 %S2B { SWP POP }
9 9
 
10
-;center { x 2 y 2 }
11
-;color { byte 1 }
12
-;pointer { x 2 y 2 sprite 2 } 
13
-;rect { x1 2 y1 2 x2 2 y2 2 }
14
-;window { x1 2 y1 2 x2 2 y2 2 w 2 h 2 }
15
-;label { x 2 y 2 addr 2 }
16
-;slider { x1 2 y 2 x2 2 pos 2 }
17
-;selection { byte 1 }
18
-;addr { short 2 }
19
-;theme { 
20
-	r1 1 r2 1 r3 1 r4 1 
21
-	g1 1 g2 1 g3 1 g4 1 
22
-	b1 1 b2 1 b3 1 b4 1 
23
-}
24
-
25
-|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
26
-|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 addr 2 color 1 }
27
-|0160 ;Mouse  { vector 2 x 2 y 2 state 1 chord 1 }
10
+( devices )
11
+
12
+|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
13
+|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
14
+|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
15
+
16
+( variables )
17
+
18
+|0000
19
+
20
+@center [ &x $2 &y $2 ]
21
+@color [ &byte $1 ]
22
+@pointer [ &x $2 &y $2 &sprite $2 ]
23
+@rect [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
24
+@window [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 &w $2 &h $2 ]
25
+@label [ &x $2 &y $2 &addr $2 ]
26
+@slider [ &x1 $2 &y $2 &x2 $2 &pos $2 ]
27
+@selection [ &byte $1 ]
28
+@addr [ &byte $1 ]
29
+@theme [
30
+	&r1 $1 &r2 $1 &r3 $1 &r4 $1
31
+	&g1 $1 &g2 $1 &g3 $1 &g4 $1
32
+	&b1 $1 &b2 $1 &b3 $1 &b4 $1
33
+]
28 34
 
29 35
 ( program )
30 36
 
31
-|0200
37
+|0100
32 38
 
33
-	( theme ) #127f =System.r #34e7 =System.g #56c4 =System.b
34
-	( vectors ) ,on-mouse =Mouse.vector
39
+	( theme ) #127f .System/r DEO2 #34e7 .System/g DEO2 #56c4 .System/b DEO2
40
+	( vectors ) ;on-mouse .Mouse/vector DEO2
35 41
 	
36
-	#00b0 =window.w
37
-	#0050 =window.h
42
+	#00b0 .window/w POK2
43
+	#0050 .window/h POK2
38 44
 
39 45
 	( center window )
40 46
 
41
-	~Screen.width #0002 DIV2 ~window.w #0002 DIV2 SUB2 =window.x1
42
-	~Screen.height #0002 DIV2 ~window.h #0002 DIV2 SUB2 =window.y1
47
+	.Screen/width DEI2 #0002 DIV2 .window/w PEK2 #0002 DIV2 SUB2 .window/x1 POK2
48
+	.Screen/height DEI2 #0002 DIV2 .window/h PEK2 #0002 DIV2 SUB2 .window/y1 POK2
43 49
 
44
-	#01 =theme.r1 #02 =theme.g1 #03 =theme.b1 
45
-	#04 =theme.r2 #06 =theme.g2 #07 =theme.b2 
46
-	#0a =theme.r3 #09 =theme.g3 #08 =theme.b3 
47
-	#0c =theme.r4 #0b =theme.g4 #0d =theme.b4 
50
+	#01 .theme/r1 POK #02 .theme/g1 POK #03 .theme/b1 POK
51
+	#04 .theme/r2 POK #06 .theme/g2 POK #07 .theme/b2 POK
52
+	#0a .theme/r3 POK #09 .theme/g3 POK #08 .theme/b3 POK
53
+	#0c .theme/r4 POK #0b .theme/g4 POK #0d .theme/b4 POK
48 54
 
49 55
 	( find screen center )
50
-	~Screen.width #0002 DIV2 =center.x
51
-	~Screen.height #0002 DIV2 =center.y
56
+	.Screen/width DEI2 #0002 DIV2 .center/x POK2
57
+	.Screen/height DEI2 #0002 DIV2 .center/y POK2
52 58
 
53
-	,update-theme JSR2
54
-	,draw-background JSR2
55
-	,draw-window JSR2
59
+	;update-theme JSR2
60
+	;draw-background JSR2
61
+	;draw-window JSR2
56 62
 
57 63
 BRK
58 64
 
59
-@on-mouse 
65
+@on-mouse
60 66
 	
61
-	,draw-cursor JSR2
62
-
63
-	~Mouse.state #00 NEQ ,$no-skip JNZ2 BRK $no-skip
64
-
65
-	~Mouse.y ~window.y1 SUB2 STEP8 
66
-
67
-	DUP2 #0010 NEQ2 ^$no-touch-red JNZ
68
-		~Mouse.x ~window.x1 #0060 ADD2 LTH2 ^$no-touch-red JNZ
69
-		~Mouse.x ~window.x1 #009c ADD2 GTH2 ^$no-touch-red JNZ
70
-		( get new value ) ~Mouse.x ~window.x1 SUB2 #0060 SUB2 #0004 DIV2 S2B ,theme.r1 #00 ~selection ADD2 POK2
71
-	$no-touch-red
72
-	DUP2 #0020 NEQ2 ^$no-touch-green JNZ
73
-		~Mouse.x ~window.x1 #0060 ADD2 LTH2 ^$no-touch-green JNZ
74
-		~Mouse.x ~window.x1 #009c ADD2 GTH2 ^$no-touch-green JNZ
75
-		( get new value ) ~Mouse.x ~window.x1 SUB2 #0060 SUB2 #0004 DIV2 S2B ,theme.g1 #00 ~selection ADD2 POK2
76
-	$no-touch-green
77
-	DUP2 #0030 NEQ2 ^$no-touch-blue JNZ
78
-		~Mouse.x ~window.x1 #0060 ADD2 LTH2 ^$no-touch-blue JNZ
79
-		~Mouse.x ~window.x1 #009c ADD2 GTH2 ^$no-touch-blue JNZ
80
-		( get new value ) ~Mouse.x ~window.x1 SUB2 #0060 SUB2 #0004 DIV2 S2B ,theme.b1 #00 ~selection ADD2 POK2
81
-	$no-touch-blue
82
-	DUP2 #0040 NEQ2 ^$no-touch-radio JNZ
83
-		~Mouse.x ~window.x1 #0050 ADD2 LTH2 ^$no-touch-radio JNZ
84
-		~Mouse.x ~window.x1 #008c ADD2 GTH2 ^$no-touch-radio JNZ
85
-		~Mouse.x ~window.x1 SUB2 #0050 SUB2 STEP8 2/ #0008 DIV2 S2B =selection
86
-	$no-touch-radio
67
+	;draw-cursor JSR2
68
+
69
+	.Mouse/state DEI #00 NEQ ;&no-skip JNZ2 BRK &no-skip
70
+
71
+	.Mouse/y DEI2 .window/y1 PEK2 SUB2 STEP8
72
+
73
+	DUP2 #0010 NEQ2 ,&no-touch-red JNZ
74
+		.Mouse/x DEI2 .window/x1 PEK2 #0060 ADD2 LTH2 ,&no-touch-red JNZ
75
+		.Mouse/x DEI2 .window/x1 PEK2 #009c ADD2 GTH2 ,&no-touch-red JNZ
76
+		( get new value ) .Mouse/x DEI2 .window/x1 PEK2 SUB2 #0060 SUB2 #0004 DIV2 S2B ;theme/r1 #00 .selection PEK ADD2 PUT
77
+	&no-touch-red
78
+	DUP2 #0020 NEQ2 ,&no-touch-green JNZ
79
+		.Mouse/x DEI2 .window/x1 PEK2 #0060 ADD2 LTH2 ,&no-touch-green JNZ
80
+		.Mouse/x DEI2 .window/x1 PEK2 #009c ADD2 GTH2 ,&no-touch-green JNZ
81
+		( get new value ) .Mouse/x DEI2 .window/x1 PEK2 SUB2 #0060 SUB2 #0004 DIV2 S2B ;theme/g1 #00 .selection PEK ADD2 PUT
82
+	&no-touch-green
83
+	DUP2 #0030 NEQ2 ,&no-touch-blue JNZ
84
+		.Mouse/x DEI2 .window/x1 PEK2 #0060 ADD2 LTH2 ,&no-touch-blue JNZ
85
+		.Mouse/x DEI2 .window/x1 PEK2 #009c ADD2 GTH2 ,&no-touch-blue JNZ
86
+		( get new value ) .Mouse/x DEI2 .window/x1 PEK2 SUB2 #0060 SUB2 #0004 DIV2 S2B ;theme/b1 #00 .selection PEK ADD2 PUT
87
+	&no-touch-blue
88
+	DUP2 #0040 NEQ2 ,&no-touch-radio JNZ
89
+		.Mouse/x DEI2 .window/x1 PEK2 #0050 ADD2 LTH2 ,&no-touch-radio JNZ
90
+		.Mouse/x DEI2 .window/x1 PEK2 #008c ADD2 GTH2 ,&no-touch-radio JNZ
91
+		.Mouse/x DEI2 .window/x1 PEK2 SUB2 #0050 SUB2 STEP8 2/ #0008 DIV2 S2B .selection POK
92
+	&no-touch-radio
87 93
 
88 94
 	POP2
89 95
 
90
-	,update-theme JSR2
91
-	,draw-window JSR2 
96
+	;update-theme JSR2
97
+	;draw-window JSR2
92 98
 
93
-BRK 
99
+BRK
94 100
 
95 101
 @update-theme
96 102
 
97
-	#0108 PEK2 #0f AND ~theme.r1 #40 SFT ADD #0108 POK2
98
-	#010a PEK2 #0f AND ~theme.g1 #40 SFT ADD #010a POK2
99
-	#010c PEK2 #0f AND ~theme.b1 #40 SFT ADD #010c POK2
100
-	#0108 PEK2 #f0 AND ~theme.r2 ADD #0108 POK2
101
-	#010a PEK2 #f0 AND ~theme.g2 ADD #010a POK2
102
-	#010c PEK2 #f0 AND ~theme.b2 ADD #010c POK2
103
-	#0109 PEK2 #0f AND ~theme.r3 #40 SFT ADD #0109 POK2
104
-	#010b PEK2 #0f AND ~theme.g3 #40 SFT ADD #010b POK2
105
-	#010d PEK2 #0f AND ~theme.b3 #40 SFT ADD #010d POK2
106
-	#0109 PEK2 #f0 AND ~theme.r4 ADD #0109 POK2
107
-	#010b PEK2 #f0 AND ~theme.g4 ADD #010b POK2
108
-	#010d PEK2 #f0 AND ~theme.b4 ADD #010d POK2
103
+	#08 DEI #0f AND .theme/r1 PEK #40 SFT ADD #08 DEO
104
+	#0a DEI #0f AND .theme/g1 PEK #40 SFT ADD #0a DEO
105
+	#0c DEI #0f AND .theme/b1 PEK #40 SFT ADD #0c DEO
106
+	#08 DEI #f0 AND .theme/r2 PEK ADD #08 DEO
107
+	#0a DEI #f0 AND .theme/g2 PEK ADD #0a DEO
108
+	#0c DEI #f0 AND .theme/b2 PEK ADD #0c DEO
109
+	#09 DEI #0f AND .theme/r3 PEK #40 SFT ADD #09 DEO
110
+	#0b DEI #0f AND .theme/g3 PEK #40 SFT ADD #0b DEO
111
+	#0d DEI #0f AND .theme/b3 PEK #40 SFT ADD #0d DEO
112
+	#09 DEI #f0 AND .theme/r4 PEK ADD #09 DEO
113
+	#0b DEI #f0 AND .theme/g4 PEK ADD #0b DEO
114
+	#0d DEI #f0 AND .theme/b4 PEK ADD #0d DEO
109 115
 
110 116
 RTN
111 117
 
112 118
 @draw-background
113 119
 	
114 120
 	( draw hor line )
115
-	#0000 =Screen.x ~center.y =Screen.y
116
-	#0000 ~Screen.width ( from/to )
117
-	$draw-hor
118
-		( draw ) #01 =Screen.color
119
-		( incr ) SWP2 #0002 ADD2 DUP2 =Screen.x SWP2
120
-		OVR2 OVR2 LTH2 ^$draw-hor JNZ
121
+	#0000 .Screen/x DEO2 .center/y PEK2 .Screen/y DEO2
122
+	#0000 .Screen/width DEI2 ( from/to )
123
+	&draw-hor
124
+		( draw ) #01 .Screen/color DEO
125
+		( incr ) SWP2 #0002 ADD2 DUP2 .Screen/x DEO2 SWP2
126
+		OVR2 OVR2 LTH2 ,&draw-hor JNZ
121 127
 	POP2 POP2
122 128
 
123 129
 	( draw ver line )
124
-	~center.x =Screen.x #0000 =Screen.y
125
-	#0000 ~Screen.height ( from/to )
126
-	$draw-ver
127
-		( draw ) #02 =Screen.color
128
-		( incr ) SWP2 #0002 ADD2 DUP2 =Screen.y SWP2
129
-		OVR2 OVR2 LTH2 ^$draw-ver JNZ
130
+	.center/x PEK2 .Screen/x DEO2 #0000 .Screen/y DEO2
131
+	#0000 .Screen/height DEI2 ( from/to )
132
+	&draw-ver
133
+		( draw ) #02 .Screen/color DEO
134
+		( incr ) SWP2 #0002 ADD2 DUP2 .Screen/y DEO2 SWP2
135
+		OVR2 OVR2 LTH2 ,&draw-ver JNZ
130 136
 	POP2 POP2
131 137
 
132 138
 	( draw blending modes )
133
-	,preview_icn =Screen.addr
134
-	#0010 =Screen.y 
139
+	;preview_icn .Screen/addr DEO2
140
+	#0010 .Screen/y DEO2
135 141
 	#00 #08
136
-	$draw-pixel1
137
-		( move ) OVR #00 SWP #0008 MUL2 #0010 ADD2 =Screen.x
138
-		( draw ) OVR =Screen.color
139
-		( incr ) SWP #01 ADD SWP 
140
-		DUP2 LTH ^$draw-pixel1 JNZ
142
+	&draw-pixel1
143
+		( move ) OVR #00 SWP #0008 MUL2 #0010 ADD2 .Screen/x DEO2
144
+		( draw ) OVR .Screen/color DEO
145
+		( incr ) SWP #01 ADD SWP
146
+		DUP2 LTH ,&draw-pixel1 JNZ
141 147
 	POP POP
142
-	#0018 =Screen.y
148
+	#0018 .Screen/y DEO2
143 149
 	#00 #08
144
-	$draw-pixel2
145
-		( move ) OVR #00 SWP #0008 MUL2 #0010 ADD2 =Screen.x
146
-		( draw ) OVR #08 ADD =Screen.color
147
-		( incr ) SWP #01 ADD SWP 
148
-		DUP2 LTH ^$draw-pixel2 JNZ
150
+	&draw-pixel2
151
+		( move ) OVR #00 SWP #0008 MUL2 #0010 ADD2 .Screen/x DEO2
152
+		( draw ) OVR #08 ADD .Screen/color DEO
153
+		( incr ) SWP #01 ADD SWP
154
+		DUP2 LTH ,&draw-pixel2 JNZ
149 155
 	POP POP
150
-	#0020 =Screen.y 
156
+	#0020 .Screen/y DEO2
151 157
 	#00 #08
152
-	$draw-icn1
153
-		( move ) OVR #00 SWP #0008 MUL2 #0010 ADD2 =Screen.x
154
-		( draw ) OVR #20 ADD =Screen.color
155
-		( incr ) SWP #01 ADD SWP 
156
-		DUP2 LTH ^$draw-icn1 JNZ
158
+	&draw-icn1
159
+		( move ) OVR #00 SWP #0008 MUL2 #0010 ADD2 .Screen/x DEO2
160
+		( draw ) OVR #20 ADD .Screen/color DEO
161
+		( incr ) SWP #01 ADD SWP
162
+		DUP2 LTH ,&draw-icn1 JNZ
157 163
 	POP POP
158
-	#0028 =Screen.y
164
+	#0028 .Screen/y DEO2
159 165
 	#00 #08
160
-	$draw-icn2
161
-		( move ) OVR #00 SWP #0008 MUL2 #0010 ADD2 =Screen.x
162
-		( draw ) OVR #28 ADD =Screen.color
163
-		( incr ) SWP #01 ADD SWP 
164
-		DUP2 LTH ^$draw-icn2 JNZ
166
+	&draw-icn2
167
+		( move ) OVR #00 SWP #0008 MUL2 #0010 ADD2 .Screen/x DEO2
168
+		( draw ) OVR #28 ADD .Screen/color DEO
169
+		( incr ) SWP #01 ADD SWP
170
+		DUP2 LTH ,&draw-icn2 JNZ
165 171
 	POP POP
166
-	#0030 =Screen.y 
172
+	#0030 .Screen/y DEO2
167 173
 	#00 #08
168
-	$draw-chr1
169
-		( move ) OVR #00 SWP #0008 MUL2 #0010 ADD2 =Screen.x
170
-		( draw ) OVR #40 ADD =Screen.color
171
-		( incr ) SWP #01 ADD SWP 
172
-		DUP2 LTH ^$draw-chr1 JNZ
174
+	&draw-chr1
175
+		( move ) OVR #00 SWP #0008 MUL2 #0010 ADD2 .Screen/x DEO2
176
+		( draw ) OVR #40 ADD .Screen/color DEO
177
+		( incr ) SWP #01 ADD SWP
178
+		DUP2 LTH ,&draw-chr1 JNZ
173 179
 	POP POP
174
-	#0038 =Screen.y
180
+	#0038 .Screen/y DEO2
175 181
 	#00 #08
176
-	$draw-chr2
177
-		( move ) OVR #00 SWP #0008 MUL2 #0010 ADD2 =Screen.x
178
-		( draw ) OVR #48 ADD =Screen.color
179
-		( incr ) SWP #01 ADD SWP 
180
-		DUP2 LTH ^$draw-chr2 JNZ
182
+	&draw-chr2
183
+		( move ) OVR #00 SWP #0008 MUL2 #0010 ADD2 .Screen/x DEO2
184
+		( draw ) OVR #48 ADD .Screen/color DEO
185
+		( incr ) SWP #01 ADD SWP
186
+		DUP2 LTH ,&draw-chr2 JNZ
181 187
 	POP POP
182 188
 
183 189
 RTN
184 190
 
185 191
 @draw-window
186 192
 	
187
-	~window.x1 ~window.w ADD2 =window.x2
188
-	~window.y1 ~window.h ADD2 =window.y2
189
-	~window.x1 ~window.y1 ~window.x2 ~window.y2 #02 ,fill-rect JSR2
190
-	~window.x1 ~window.y1 ~window.x2 ~window.y2 #01 ,line-rect JSR2
191
-	~window.x1 #0002 SUB2 ~window.y1 #0002 SUB2 ~window.x2 #0002 ADD2 ~window.y2 #0002 ADD2 #01 ,line-rect JSR2
192
-
193
-	~window.x1 #0008 ADD2 ~window.y1 #0010 ADD2 #25 ,red_txt ,draw-label JSR2
194
-	~window.x1 #0038 ADD2 ~window.y1 #0010 ADD2 #28 ,System.r ,draw-byte JSR2
195
-	~window.x1 #0048 ADD2 ~window.y1 #0010 ADD2 #28 ,System.r #0001 ADD2 ,draw-byte JSR2
196
-
197
-	~window.x1 #0008 ADD2 ~window.y1 #0020 ADD2 #25 ,green_txt ,draw-label JSR2
198
-	~window.x1 #0038 ADD2 ~window.y1 #0020 ADD2 #28 ,System.g ,draw-byte JSR2
199
-	~window.x1 #0048 ADD2 ~window.y1 #0020 ADD2 #28 ,System.g #0001 ADD2 ,draw-byte JSR2
200
-
201
-	~window.x1 #0008 ADD2 ~window.y1 #0030 ADD2 #25 ,blue_txt ,draw-label JSR2
202
-	~window.x1 #0038 ADD2 ~window.y1 #0030 ADD2 #28 ,System.b ,draw-byte JSR2
203
-	~window.x1 #0048 ADD2 ~window.y1 #0030 ADD2 #28 ,System.b #0001 ADD2 ,draw-byte JSR2
204
-
205
-	~window.x1 #0060 ADD2 ~window.y1 #0010 ADD2 ~window.x1 #0090 ADD2 #00 ,theme.r1 ~selection ADD PEK2 #0004 MUL2 #01 ,draw-slider JSR2
206
-	~window.x1 #0060 ADD2 ~window.y1 #0020 ADD2 ~window.x1 #0090 ADD2 #00 ,theme.g1 ~selection ADD PEK2 #0004 MUL2 #01 ,draw-slider JSR2
207
-	~window.x1 #0060 ADD2 ~window.y1 #0030 ADD2 ~window.x1 #0090 ADD2 #00 ,theme.b1 ~selection ADD PEK2 #0004 MUL2 #01 ,draw-slider JSR2
208
-
209
-	~window.x1 #0050 ADD2 =Screen.x
210
-	~window.y1 #0040 ADD2 =Screen.y
211
-	,radio_icns #00 ~selection #00 EQU #0008 MUL2 ADD2 =Screen.addr
212
-	#25 =Screen.color
213
-
214
-	~window.x1 #0060 ADD2 =Screen.x
215
-	~window.y1 #0040 ADD2 =Screen.y
216
-	,radio_icns #00 ~selection #01 EQU #0008 MUL2 ADD2 =Screen.addr
217
-	#25 =Screen.color
218
-
219
-	~window.x1 #0070 ADD2 =Screen.x
220
-	~window.y1 #0040 ADD2 =Screen.y
221
-	,radio_icns #00 ~selection #02 EQU #0008 MUL2 ADD2 =Screen.addr
222
-	#25 =Screen.color
223
-
224
-	~window.x1 #0080 ADD2 =Screen.x
225
-	~window.y1 #0040 ADD2 =Screen.y
226
-	,radio_icns #00 ~selection #03 EQU #0008 MUL2 ADD2 =Screen.addr
227
-	#25 =Screen.color
193
+	.window/x1 PEK2 .window/w PEK2 ADD2 .window/x2 POK2
194
+	.window/y1 PEK2 .window/h PEK2 ADD2 .window/y2 POK2
195
+	.window/x1 PEK2 .window/y1 PEK2 .window/x2 PEK2 .window/y2 PEK2 #02 ;fill-rect JSR2
196
+	.window/x1 PEK2 .window/y1 PEK2 .window/x2 PEK2 .window/y2 PEK2 #01 ;line-rect JSR2
197
+	.window/x1 PEK2 #0002 SUB2 .window/y1 PEK2 #0002 SUB2 .window/x2 PEK2 #0002 ADD2 .window/y2 PEK2 #0002 ADD2 #01 ;line-rect JSR2
198
+
199
+	.window/x1 PEK2 #0008 ADD2 .window/y1 PEK2 #0010 ADD2 #25 ;red_txt ;draw-label JSR2
200
+	.window/x1 PEK2 #0038 ADD2 .window/y1 PEK2 #0010 ADD2 #28 .System/r ;draw-byte JSR2
201
+	.window/x1 PEK2 #0048 ADD2 .window/y1 PEK2 #0010 ADD2 #28 .System/r #01 ADD ;draw-byte JSR2
202
+
203
+	.window/x1 PEK2 #0008 ADD2 .window/y1 PEK2 #0020 ADD2 #25 ;green_txt ;draw-label JSR2
204
+	.window/x1 PEK2 #0038 ADD2 .window/y1 PEK2 #0020 ADD2 #28 .System/g ;draw-byte JSR2
205
+	.window/x1 PEK2 #0048 ADD2 .window/y1 PEK2 #0020 ADD2 #28 .System/g #01 ADD ;draw-byte JSR2
206
+
207
+	.window/x1 PEK2 #0008 ADD2 .window/y1 PEK2 #0030 ADD2 #25 ;blue_txt ;draw-label JSR2
208
+	.window/x1 PEK2 #0038 ADD2 .window/y1 PEK2 #0030 ADD2 #28 .System/b ;draw-byte JSR2
209
+	.window/x1 PEK2 #0048 ADD2 .window/y1 PEK2 #0030 ADD2 #28 .System/b #01 ADD ;draw-byte JSR2
210
+
211
+	.window/x1 PEK2 #0060 ADD2 .window/y1 PEK2 #0010 ADD2 .window/x1 PEK2 #0090 ADD2 #00 ;theme/r1 .selection PEK ADD GET #0004 MUL2 #01 ;draw-slider JSR2
212
+	.window/x1 PEK2 #0060 ADD2 .window/y1 PEK2 #0020 ADD2 .window/x1 PEK2 #0090 ADD2 #00 ;theme/g1 .selection PEK ADD GET #0004 MUL2 #01 ;draw-slider JSR2
213
+	.window/x1 PEK2 #0060 ADD2 .window/y1 PEK2 #0030 ADD2 .window/x1 PEK2 #0090 ADD2 #00 ;theme/b1 .selection PEK ADD GET #0004 MUL2 #01 ;draw-slider JSR2
214
+
215
+	.window/x1 PEK2 #0050 ADD2 .Screen/x DEO2
216
+	.window/y1 PEK2 #0040 ADD2 .Screen/y DEO2
217
+	;radio_icns #00 .selection PEK #00 EQU #0008 MUL2 ADD2 .Screen/addr DEO2
218
+	#25 .Screen/color DEO
219
+
220
+	.window/x1 PEK2 #0060 ADD2 .Screen/x DEO2
221
+	.window/y1 PEK2 #0040 ADD2 .Screen/y DEO2
222
+	;radio_icns #00 .selection PEK #01 EQU #0008 MUL2 ADD2 .Screen/addr DEO2
223
+	#25 .Screen/color DEO
224
+
225
+	.window/x1 PEK2 #0070 ADD2 .Screen/x DEO2
226
+	.window/y1 PEK2 #0040 ADD2 .Screen/y DEO2
227
+	;radio_icns #00 .selection PEK #02 EQU #0008 MUL2 ADD2 .Screen/addr DEO2
228
+	#25 .Screen/color DEO
229
+
230
+	.window/x1 PEK2 #0080 ADD2 .Screen/x DEO2
231
+	.window/y1 PEK2 #0040 ADD2 .Screen/y DEO2
232
+	;radio_icns #00 .selection PEK #03 EQU #0008 MUL2 ADD2 .Screen/addr DEO2
233
+	#25 .Screen/color DEO
228 234
 
229 235
 RTN
230 236
 
231 237
 @draw-cursor ( -- )
232 238
 
233 239
 	( clear last cursor )
234
-	,clear_icn =Screen.addr 
235
-	~pointer.x =Screen.x 
236
-	~pointer.y =Screen.y 
237
-	#30 =Screen.color
240
+	;clear_icn .Screen/addr DEO2
241
+	.pointer/x PEK2 .Screen/x DEO2
242
+	.pointer/y PEK2 .Screen/y DEO2
243
+	#30 .Screen/color DEO
238 244
 
239 245
 	( record pointer positions )
240
-	~Mouse.x =pointer.x ~Mouse.y =pointer.y
246
+	.Mouse/x DEI2 .pointer/x POK2 .Mouse/y DEI2 .pointer/y POK2
241 247
 
242 248
 	( draw new cursor )
243
-	,pointer_icn =Screen.addr 
244
-	~pointer.x =Screen.x 
245
-	~pointer.y =Screen.y 
246
-	#33 ~Mouse.state #00 NEQ #02 MUL SUB =Screen.color
249
+	;pointer_icn .Screen/addr DEO2
250
+	.pointer/x PEK2 .Screen/x DEO2
251
+	.pointer/y PEK2 .Screen/y DEO2
252
+	#33 .Mouse/state DEI #00 NEQ #02 MUL SUB .Screen/color DEO
247 253
 
248 254
 RTN
249 255
 
250 256
 @draw-slider ( x1 y x2 pos color -- )
251 257
 	
252
-	( load ) =color =slider.pos =slider.x2 =slider.y =slider.x1
258
+	( load ) .color POK .slider/pos POK2 .slider/x2 POK2 .slider/y POK2 .slider/x1 POK2
253 259
 
254
-	~slider.x1 =Screen.x
255
-	~slider.y =Screen.y
256
-	,halftone_icn =Screen.addr
260
+	.slider/x1 PEK2 .Screen/x DEO2
261
+	.slider/y PEK2 .Screen/y DEO2
262
+	;halftone_icn .Screen/addr DEO2
257 263
 
258
-	,slidera_icn =Screen.addr
259
-	( draw ) #25 =Screen.color
260
-	,sliderb_icn =Screen.addr
264
+	;slidera_icn .Screen/addr DEO2
265
+	( draw ) #25 .Screen/color DEO
266
+	;sliderb_icn .Screen/addr DEO2
261 267
 
262
-	$loop
263
-		( incr ) ~Screen.x 8+ =Screen.x
264
-		( draw ) #25 =Screen.color
265
-		~Screen.x ~slider.x2 #0008 ADD2 LTH2 ^$loop JNZ
268
+	&loop
269
+		( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
270
+		( draw ) #25 .Screen/color DEO
271
+		.Screen/x DEI2 .slider/x2 PEK2 #0008 ADD2 LTH2 ,&loop JNZ
266 272
 
267
-	( incr ) ~Screen.x #0004 ADD2 =Screen.x
268
-	,sliderc_icn =Screen.addr
269
-	( draw ) #25 =Screen.color
273
+	( incr ) .Screen/x DEI2 #0004 ADD2 .Screen/x DEO2
274
+	;sliderc_icn .Screen/addr DEO2
275
+	( draw ) #25 .Screen/color DEO
270 276
 
271
-	~slider.x1 ~slider.pos ADD2 =Screen.x
272
-	,sliderd_icn =Screen.addr
273
-	( draw ) #2a =Screen.color
277
+	.slider/x1 PEK2 .slider/pos PEK2 ADD2 .Screen/x DEO2
278
+	;sliderd_icn .Screen/addr DEO2
279
+	( draw ) #2a .Screen/color DEO
274 280
 
275 281
 RTN
276 282
 
277 283
 @fill-rect ( x1 y1 x2 y2 color )
278 284
 	
279
-	=color
285
+	.color POK
280 286
 	( x1 x2 y1 y2 ) ROT2 SWP2
281
-	$ver
282
-		( save ) OVR2 =Screen.y
283
-		STH2 STH2 OVR2 OVR2 
284
-		$hor
285
-			( save ) OVR2 =Screen.x
286
-			( draw ) ~color =Screen.color
287
+	&ver
288
+		( save ) OVR2 .Screen/y DEO2
289
+		STH2 STH2 OVR2 OVR2
290
+		&hor
291
+			( save ) OVR2 .Screen/x DEO2
292
+			( draw ) .color PEK .Screen/color DEO
287 293
 			( incr ) SWP2 #0001 ADD2 SWP2
288
-			OVR2 OVR2 LTH2 ^$hor JNZ
294
+			OVR2 OVR2 LTH2 ,&hor JNZ
289 295
 		POP2 POP2 STH2r STH2r
290 296
 		( incr ) SWP2 #0001 ADD2 SWP2
291
-		OVR2 OVR2 LTH2 ^$ver JNZ
297
+		OVR2 OVR2 LTH2 ,&ver JNZ
292 298
 	POP2 POP2 POP2 POP2
293 299
 
294 300
 RTN
295 301
 
296 302
 @line-rect ( x1 y1 x2 y2 color -- )
297 303
 
298
-	( load ) =color =rect.y2 =rect.x2 DUP2 =Screen.y =rect.y1 DUP2 =Screen.x =rect.x1
299
-	$hor
300
-		( incr ) ~Screen.x ++ =Screen.x
301
-		( draw ) ~rect.y1 =Screen.y ~color =Screen.color
302
-		( draw ) ~rect.y2 =Screen.y ~color =Screen.color
303
-		~Screen.x ~rect.x2 LTH2 ^$hor JNZ
304
-	~rect.y1 =Screen.y
305
-	$ver
306
-		( draw ) ~rect.x1 =Screen.x ~color =Screen.color
307
-		( draw ) ~rect.x2 =Screen.x ~color =Screen.color
308
-		( incr ) ~Screen.y ++ =Screen.y
309
-		~Screen.y ~rect.y2 ++ LTH2 ^$ver JNZ
304
+	( load ) .color POK .rect/y2 POK2 .rect/x2 POK2 DUP2 .Screen/y DEO2 .rect/y1 POK2 DUP2 .Screen/x DEO2 .rect/x1 POK2
305
+	&hor
306
+		( incr ) .Screen/x DEI2 ++ .Screen/x DEO2
307
+		( draw ) .rect/y1 PEK2 .Screen/y DEO2 .color PEK .Screen/color DEO
308
+		( draw ) .rect/y2 PEK2 .Screen/y DEO2 .color PEK .Screen/color DEO
309
+		.Screen/x DEI2 .rect/x2 PEK2 LTH2 ,&hor JNZ
310
+	.rect/y1 PEK2 .Screen/y DEO2
311
+	&ver
312
+		( draw ) .rect/x1 PEK2 .Screen/x DEO2 .color PEK .Screen/color DEO
313
+		( draw ) .rect/x2 PEK2 .Screen/x DEO2 .color PEK .Screen/color DEO
314
+		( incr ) .Screen/y DEI2 ++ .Screen/y DEO2
315
+		.Screen/y DEI2 .rect/y2 PEK2 ++ LTH2 ,&ver JNZ
310 316
 
311 317
 RTN
312 318
 
313 319
 @draw-label ( x y color addr -- )
314 320
 	
315
-	( load ) =label.addr =color =Screen.y =Screen.x ~label.addr
316
-	$loop
317
-		( draw ) DUP2 PEK2 #00 SWP #0008 MUL2 ,font ADD2 =Screen.addr ~color =Screen.color
321
+	( load ) .label/addr POK2 .color POK .Screen/y DEO2 .Screen/x DEO2 .label/addr PEK2
322
+	&loop
323
+		( draw ) DUP2 GET #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2 .color PEK .Screen/color DEO
318 324
 		( incr ) ++
319
-		( incr ) ~Screen.x 8+ =Screen.x
320
-		DUP2 PEK2 #00 NEQ ^$loop JNZ
325
+		( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
326
+		DUP2 GET #00 NEQ ,&loop JNZ
321 327
 	POP2
322 328
 
323 329
 RTN
324 330
 
325 331
 @draw-byte ( x y color addr -- )
326 332
 
327
-	=addr STH
328
-	=Screen.y
329
-	=Screen.x
330
-	,font_hex #00 ~addr PEK2 #04 SFT #0008 MUL2 ADD2 =Screen.addr
331
-	STHr DUP STH =Screen.color
332
-	,font_hex #00 ~addr PEK2 #0f AND #0008 MUL2 ADD2 =Screen.addr
333
-	~Screen.x 8+ =Screen.x
334
-	STHr =Screen.color
333
+	.addr POK STH
334
+	.Screen/y DEO2
335
+	.Screen/x DEO2
336
+	;font_hex #00 .addr PEK DEI #04 SFT #0008 MUL2 ADD2 .Screen/addr DEO2
337
+	STHr DUP STH .Screen/color DEO
338
+	;font_hex #00 .addr PEK DEI #0f AND #0008 MUL2 ADD2 .Screen/addr DEO2
339
+	.Screen/x DEI2 8+ .Screen/x DEO2
340
+	STHr .Screen/color DEO
335 341
 
336 342
 RTN
337 343
 
... ...
@@ -342,28 +348,28 @@ RTN
342 348
 @sliderb_icn  [ ffff ffff ffff ffff ]
343 349
 @sliderc_icn  [ fcfe ffff ffff fefc ]
344 350
 @sliderd_icn  [ 003c 7e7e 7e7e 3c00 ]
345
-@preview_icn     [ 183c 66db db66 3c18 0000 183c 3c18 0000 ]
346
-@radio_icns  
351
+@preview_icn  [ 183c 66db db66 3c18 0000 183c 3c18 0000 ]
352
+@radio_icns
347 353
 	[ 3c42 8181 8181 423c ]
348 354
 	[ 3c42 99bd bd99 423c ]
349 355
 
350
-@red_txt      [ Red 00 ]
351
-@green_txt    [ Green 00 ]
352
-@blue_txt     [ Blue 00 ]
356
+@red_txt   [ "Red 00 ]
357
+@green_txt [ "Green 00 ]
358
+@blue_txt  [ "Blue 00 ]
353 359
 
354
-@font_hex ( 0-F TODO: should pull from @font instead.. ) 
360
+@font_hex ( 0-F TODO: should pull from @font instead.. )
355 361
 [
356 362
 	003c 464a 5262 3c00 0018 0808 0808 1c00
357 363
 	003c 4202 3c40 7e00 003c 421c 0242 3c00
358 364
 	000c 1424 447e 0400 007e 407c 0242 3c00
359 365
 	003c 407c 4242 3c00 007e 0204 0810 1000
360 366
 	003c 423c 4242 3c00 003c 4242 3e02 3c00
361
-	003c 4242 7e42 4200 007c 427c 4242 7c00 
362
-	003c 4240 4042 3c00 007c 4242 4242 7c00 
367
+	003c 4242 7e42 4200 007c 427c 4242 7c00
368
+	003c 4240 4042 3c00 007c 4242 4242 7c00
363 369
 	007e 4078 4040 7e00 007e 4078 4040 4000
364 370
 ]
365 371
 
366
-@font ( spectrum-zx font ) 
372
+@font ( spectrum-zx font )
367 373
 [
368 374
 	0000 0000 0000 0000 0000 2400 7e3c 0000 0000 2400 3c42 0000 0000 6c7c 7c38 1000
369 375
 	0010 387c 7c38 1000 0038 387c 6c10 3800 0010 387c 7c10 3800 0000 0018 1800 0000
... ...
@@ -2,94 +2,100 @@
2 2
 
3 3
 %RTN { JMP2r }
4 4
 
5
-;color { byte 1 }
6
-;pointer { x 2 y 2 sprite 2 } 
7
-;rect { x1 2 y1 2 x2 2 y2 2 }
8
-;r1 { x1 2 y1 2 x2 2 y2 2 }
9
-;r2 { x1 2 y1 2 x2 2 y2 2 }
10
-;r3 { x1 2 y1 2 x2 2 y2 2 }
5
+( devices )
11 6
 
12
-|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
13
-|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 addr 2 color 1 }
14
-|0160 ;Mouse  { vector 2 x 2 y 2 state 1 chord 1 }
7
+|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
8
+|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
9
+|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
10
+
11
+( variables )
12
+
13
+|0000
14
+
15
+@color [ &byte $1 ]
16
+@pointer [ &x $2 &y $2 &sprite $2 ]
17
+@rect [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
18
+@r1 [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
19
+@r2 [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
20
+@r3 [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
15 21
 
16 22
 ( program )
17 23
 
18
-|0200
24
+|0100
19 25
 
20
-	( theme ) #0f0f =System.r #0fff =System.g #0ff0 =System.b
21
-	( vectors ) ,on-mouse =Mouse.vector
26
+	( theme ) #0f0f .System/r DEO2 #0fff .System/g DEO2 #0ff0 .System/b DEO2
27
+	( vectors ) ;on-mouse .Mouse/vector DEO2
22 28
 	
23
-	#0020 #0030 #0060 #0060 =r1.y2 =r1.x2 =r1.y1 =r1.x1
24
-	#0058 #0050 #0090 #0080 =r2.y2 =r2.x2 =r2.y1 =r2.x1
25
-	#0048 #0048 #0080 #0098 =r3.y2 =r3.x2 =r3.y1 =r3.x1
29
+	#0020 #0030 #0060 #0060 .r1/y2 POK2 .r1/x2 POK2 .r1/y1 POK2 .r1/x1 POK2
30
+	#0058 #0050 #0090 #0080 .r2/y2 POK2 .r2/x2 POK2 .r2/y1 POK2 .r2/x1 POK2
31
+	#0048 #0048 #0080 #0098 .r3/y2 POK2 .r3/x2 POK2 .r3/y1 POK2 .r3/x1 POK2
26 32
 
27
-BRK
33
+( no BRK, run through to on-mouse )
28 34
 
29
-@on-mouse 
35
+@on-mouse
30 36
 
31
-	,pointer_icn =pointer.sprite
37
+	;pointer_icn .pointer/sprite POK2
32 38
 
33
-	#01 =color
39
+	#01 .color POK
34 40
 	( matrix comparison )
35
-	~Mouse.x ~r1.x1 GTH2 ~Mouse.x ~r1.x2 LTH2 #0101 EQU2
36
-	~Mouse.y ~r1.y1 GTH2 ~Mouse.y ~r1.y2 LTH2 #0101 EQU2
37
-	#0101 NEQ2 ^$draw1 JNZ #02 =color ,hand_icn =pointer.sprite 
38
-	$draw1 ~r1.x1 ~r1.y1 ~r1.x2 ~r1.y2 ~color ,line-rect JSR2
41
+	.Mouse/x DEI2 .r1/x1 PEK2 GTH2 .Mouse/x DEI2 .r1/x2 PEK2 LTH2 #0101 EQU2
42
+	.Mouse/y DEI2 .r1/y1 PEK2 GTH2 .Mouse/y DEI2 .r1/y2 PEK2 LTH2 #0101 EQU2
43
+	#0101 NEQ2 ,&draw1 JNZ #02 .color POK ;hand_icn .pointer/sprite POK2
44
+	&draw1 .r1/x1 PEK2 .r1/y1 PEK2 .r1/x2 PEK2 .r1/y2 PEK2 .color PEK ;line-rect JSR2
39 45
 	
40
-	#01 =color
46
+	#01 .color POK
41 47
 	( 2-step comparison )
42
-	~Mouse.x ~r2.x1 GTH2 ~Mouse.x ~r2.x2 LTH2 #0101 NEQ2 ^$draw2 JNZ
43
-		~Mouse.y ~r2.y1 GTH2 ~Mouse.y ~r2.y2 LTH2 #0101 NEQ2 ^$draw2 JNZ
44
-			#03 =color ,hand_icn =pointer.sprite 
45
-	$draw2 ~r2.x1 ~r2.y1 ~r2.x2 ~r2.y2 ~color ,line-rect JSR2
48
+	.Mouse/x DEI2 .r2/x1 PEK2 GTH2 .Mouse/x DEI2 .r2/x2 PEK2 LTH2 #0101 NEQ2 ,&draw2 JNZ
49
+		.Mouse/y DEI2 .r2/y1 PEK2 GTH2 .Mouse/y DEI2 .r2/y2 PEK2 LTH2 #0101 NEQ2 ,&draw2 JNZ
50
+			#03 .color POK ;hand_icn .pointer/sprite POK2
51
+	&draw2 .r2/x1 PEK2 .r2/y1 PEK2 .r2/x2 PEK2 .r2/y2 PEK2 .color PEK ;line-rect JSR2
46 52
 	
47
-	#01 =color
53
+	#01 .color POK
48 54
 	( 4-step comparison )
49
-	~Mouse.x ~r3.x1 LTH2 ^$draw3 JNZ
50
-		~Mouse.x ~r3.x2 GTH2 ^$draw3 JNZ
51
-			~Mouse.y ~r3.y1 LTH2 ^$draw3 JNZ
52
-				~Mouse.y ~r3.y2 GTH2 ^$draw3 JNZ
53
-					#02 =color ,hand_icn =pointer.sprite
54
-	$draw3 ~r3.x1 ~r3.y1 ~r3.x2 ~r3.y2 ~color ,line-rect JSR2
55
+	.Mouse/x DEI2 .r3/x1 PEK2 LTH2 ,&draw3 JNZ
56
+		.Mouse/x DEI2 .r3/x2 PEK2 GTH2 ,&draw3 JNZ
57
+			.Mouse/y DEI2 .r3/y1 PEK2 LTH2 ,&draw3 JNZ
58
+				.Mouse/y DEI2 .r3/y2 PEK2 GTH2 ,&draw3 JNZ
59
+					#02 .color POK ;hand_icn .pointer/sprite POK2
60
+	&draw3 .r3/x1 PEK2 .r3/y1 PEK2 .r3/x2 PEK2 .r3/y2 PEK2 .color PEK ;line-rect JSR2
55 61
 
56
-	,draw-cursor JSR2
62
+	;draw-cursor JSR2
57 63
 
58
-BRK 
64
+BRK
59 65
 
60 66
 @draw-cursor
61 67
 
62 68
 	( clear last cursor )
63
-	,clear_icn =Screen.addr 
64
-	~pointer.x =Screen.x 
65
-	~pointer.y =Screen.y 
66
-	#30 =Screen.color
69
+	;clear_icn .Screen/addr DEO2
70
+	.pointer/x PEK2 .Screen/x DEO2
71
+	.pointer/y PEK2 .Screen/y DEO2
72
+	#30 .Screen/color DEO
67 73
 
68 74
 	( record pointer positions )
69
-	~Mouse.x =pointer.x ~Mouse.y =pointer.y
75
+	.Mouse/x DEI2 .pointer/x POK2 .Mouse/y DEI2 .pointer/y POK2
70 76
 
71 77
 	( draw new cursor )
72
-	~pointer.sprite =Screen.addr 
73
-	~pointer.x =Screen.x 
74
-	~pointer.y =Screen.y 
75
-	#31 =Screen.color
78
+	.pointer/sprite PEK2 .Screen/addr DEO2
79
+	.pointer/x PEK2 .Screen/x DEO2
80
+	.pointer/y PEK2 .Screen/y DEO2
81
+	#31 .Screen/color DEO
76 82
 
77 83
 RTN
78 84
 
79 85
 @line-rect ( x1 y1 x2 y2 color )
80 86
 
81
-	( load ) =color =rect.y2 =rect.x2 DUP2 =Screen.y =rect.y1 DUP2 =Screen.x =rect.x1
82
-	$hor
83
-		( incr ) ~Screen.x #0001 ADD2 =Screen.x
84
-		( draw ) ~rect.y1 =Screen.y ~color =Screen.color
85
-		( draw ) ~rect.y2 =Screen.y ~color =Screen.color
86
-		~Screen.x ~rect.x2 LTH2 ^$hor JNZ
87
-	~rect.y1 =Screen.y
88
-	$ver
89
-		( draw ) ~rect.x1 =Screen.x ~color =Screen.color
90
-		( draw ) ~rect.x2 =Screen.x ~color =Screen.color
91
-		( incr ) ~Screen.y #0001 ADD2 =Screen.y
92
-		~Screen.y ~rect.y2 #0001 ADD2 LTH2 ^$ver JNZ
87
+	( load ) .color POK .rect/y2 POK2 .rect/x2 POK2 DUP2 .Screen/y DEO2 .rect/y1 POK2 DUP2 .Screen/x DEO2 .rect/x1 POK2
88
+	&hor
89
+		( incr ) .Screen/x DEI2 #0001 ADD2 .Screen/x DEO2
90
+		( draw ) .rect/y1 PEK2 .Screen/y DEO2 .color PEK .Screen/color DEO
91
+		( draw ) .rect/y2 PEK2 .Screen/y DEO2 .color PEK .Screen/color DEO
92
+		.Screen/x DEI2 .rect/x2 PEK2 LTH2 ,&hor JNZ
93
+	.rect/y1 PEK2 .Screen/y DEO2
94
+	&ver
95
+		( draw ) .rect/x1 PEK2 .Screen/x DEO2 .color PEK .Screen/color DEO
96
+		( draw ) .rect/x2 PEK2 .Screen/x DEO2 .color PEK .Screen/color DEO
97
+		( incr ) .Screen/y DEI2 #0001 ADD2 .Screen/y DEO2
98
+		.Screen/y DEI2 .rect/y2 PEK2 #0001 ADD2 LTH2 ,&ver JNZ
93 99
 
94 100
 RTN
95 101
 
... ...
@@ -2,80 +2,86 @@
2 2
 
3 3
 %RTN { JMP2r }
4 4
 
5
-;label { x 2 y 2 color 1 addr 2 }
6
-;center { x 2 y 2 }
5
+( devices )
7 6
 
8
-|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
9
-|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 addr 2 color 1 }
7
+|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
8
+|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
9
+
10
+( variables )
11
+
12
+|0000
13
+
14
+@label [ &x $2 &y $2 &color $1 &addr $2 ]
15
+@center [ &x $2 &y $2 ]
10 16
 
11 17
 ( program )
12 18
 
13
-|0200
19
+|0100
14 20
 	
15
-	( theme ) #0f0f =System.r #0fff =System.g #0ff0 =System.b
21
+	( theme ) #0f0f .System/r DEO2 #0fff .System/g DEO2 #0ff0 .System/b DEO2
16 22
 	
17
-	,draw JSR2
23
+	;draw JSR2
18 24
 	
19 25
 BRK
20 26
 
21 27
 @draw ( -- )
22 28
 	
23 29
 	( find screen center )
24
-	~Screen.width #0002 DIV2 =center.x
25
-	~Screen.height #0002 DIV2 =center.y
30
+	.Screen/width DEI2 #0002 DIV2 .center/x POK2
31
+	.Screen/height DEI2 #0002 DIV2 .center/y POK2
26 32
 
27 33
 	( draw ver line )
28
-	~center.x =Screen.x #0000 =Screen.y
29
-	$draw-ver
30
-		( draw ) #02 =Screen.color
31
-		( incr ) ~Screen.y #0002 ADD2 =Screen.y
32
-		~Screen.y ~Screen.height LTH2 ^$draw-ver JNZ
33
-
34
-	~center.x ~center.y #0010 SUB2 #2c ,text1 ,draw-label-left JSR2
35
-	~center.x ~center.y #2c ,text2 ,draw-label-middle JSR2
36
-	~center.x ~center.y #0010 ADD2 #2c ,text3 ,draw-label-right JSR2
37
-	~center.x ~center.y #0020 ADD2 #2c ,text4 ,draw-label-middle JSR2
38
-	~center.x ~center.y #0030 ADD2 #2c ,text5 ,draw-label-middle JSR2
34
+	.center/x PEK2 .Screen/x DEO2 #0000 .Screen/y DEO2
35
+	&draw-ver
36
+		( draw ) #02 .Screen/color DEO
37
+		( incr ) .Screen/y DEI2 #0002 ADD2 .Screen/y DEO2
38
+		.Screen/y DEI2 .Screen/height DEI2 LTH2 ,&draw-ver JNZ
39
+
40
+	.center/x PEK2 .center/y PEK2 #0010 SUB2 #2c ;text1 ;draw-label-left JSR2
41
+	.center/x PEK2 .center/y PEK2 #2c ;text2 ;draw-label-middle JSR2
42
+	.center/x PEK2 .center/y PEK2 #0010 ADD2 #2c ;text3 ;draw-label-right JSR2
43
+	.center/x PEK2 .center/y PEK2 #0020 ADD2 #2c ;text4 ;draw-label-middle JSR2
44
+	.center/x PEK2 .center/y PEK2 #0030 ADD2 #2c ;text5 ;draw-label-middle JSR2
39 45
 
40 46
 RTN
41 47
 
42 48
 @draw-label-left ( x y color addr -- )
43 49
 	
44
-	( load ) =label.addr =label.color =Screen.y =Screen.x 
45
-	~label.addr
46
-	$loop
47
-		( draw ) DUP2 PEK2 #00 SWP #0008 MUL2 ,font ADD2 =Screen.addr ~label.color =Screen.color
50
+	( load ) .label/addr POK2 .label/color POK .Screen/y DEO2 .Screen/x DEO2
51
+	.label/addr PEK2
52
+	&loop
53
+		( draw ) DUP2 GET #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2 .label/color PEK .Screen/color DEO
48 54
 		( incr ) #0001 ADD2
49
-		( incr ) ~Screen.x #0008 ADD2 =Screen.x
50
-		DUP2 PEK2 #00 NEQ ^$loop JNZ
55
+		( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
56
+		DUP2 GET #00 NEQ ,&loop JNZ
51 57
 	POP2
52 58
 
53 59
 RTN
54 60
 
55 61
 @draw-label-middle ( x y color addr -- )
56 62
 	
57
-	( load ) =label.addr =label.color =Screen.y
58
-	( align ) ~label.addr ,get-text-length JSR2 #0008 MUL2 #0002 DIV2 SUB2 =Screen.x 
59
-	~label.addr
60
-	$loop
61
-		( draw ) DUP2 PEK2 #00 SWP #0008 MUL2 ,font ADD2 =Screen.addr ~label.color =Screen.color
63
+	( load ) .label/addr POK2 .label/color POK .Screen/y DEO2
64
+	( align ) .label/addr PEK2 ;get-text-length JSR2 #0008 MUL2 #0002 DIV2 SUB2 .Screen/x DEO2
65
+	.label/addr PEK2
66
+	&loop
67
+		( draw ) DUP2 GET #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2 .label/color PEK .Screen/color DEO
62 68
 		( incr ) #0001 ADD2
63
-		( incr ) ~Screen.x #0008 ADD2 =Screen.x
64
-		DUP2 PEK2 #00 NEQ ^$loop JNZ
69
+		( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
70
+		DUP2 GET #00 NEQ ,&loop JNZ
65 71
 	POP2
66 72
 
67 73
 RTN
68 74
 
69 75
 @draw-label-right ( x y color addr -- )
70 76
 	
71
-	( load ) =label.addr =label.color =Screen.y
72
-	( align ) ~label.addr ,get-text-length JSR2 #0008 MUL2 SUB2 #0008 SUB2 =Screen.x 
73
-	~label.addr
74
-	$loop
75
-		( draw ) DUP2 PEK2 #00 SWP #0008 MUL2 ,font ADD2 =Screen.addr ~label.color =Screen.color
77
+	( load ) .label/addr POK2 .label/color POK .Screen/y DEO2
78
+	( align ) .label/addr PEK2 ;get-text-length JSR2 #0008 MUL2 SUB2 #0008 SUB2 .Screen/x DEO2
79
+	.label/addr PEK2
80
+	&loop
81
+		( draw ) DUP2 GET #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2 .label/color PEK .Screen/color DEO
76 82
 		( incr ) #0001 ADD2
77
-		( incr ) ~Screen.x #0008 ADD2 =Screen.x
78
-		DUP2 PEK2 #00 NEQ ^$loop JNZ
83
+		( incr ) .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2
84
+		DUP2 GET #00 NEQ ,&loop JNZ
79 85
 	POP2
80 86
 
81 87
 RTN
... ...
@@ -83,14 +89,14 @@ RTN
83 89
 @get-text-length ( label* -- length )
84 90
 	
85 91
 	#0000 ( counter )
86
-	$loop
87
-		( incr ) #0001 ADD2 OVR2 OVR2 ADD2 
88
-		PEK2 #00 NEQ ^$loop JNZ
92
+	&loop
93
+		( incr ) #0001 ADD2 OVR2 OVR2 ADD2
94
+		GET #00 NEQ ,&loop JNZ
89 95
 	SWP2 POP2
90 96
 
91 97
 RTN
92 98
 
93
-@font ( spectrum-zx font ) 
99
+@font ( spectrum-zx font )
94 100
 [
95 101
 	0000 0000 0000 0000 0000 2400 7e3c 0000 0000 2400 3c42 0000 0000 6c7c 7c38 1000
96 102
 	0010 387c 7c38 1000 0038 387c 6c10 3800 0010 387c 7c10 3800 0000 0018 1800 0000
... ...
@@ -126,8 +132,8 @@ RTN
126 132
 	0008 0808 0808 0800 0030 1008 0810 3000 0000 0032 4c00 0000 3c42 99a1 a199 423c
127 133
 ]
128 134
 
129
-@text1 [ Left 20 Aligned 00 ]
130
-@text2 [ Middle 20 Aligned 00 ]
131
-@text3 [ Right 20 Aligned 00 ]
132
-@text4 [ even 00 ]
133
-@text5 [ odd 00 ]
134 135
\ No newline at end of file
136
+@text1 [ "Left 20 "Aligned 00 ]
137
+@text2 [ "Middle 20 "Aligned 00 ]
138
+@text3 [ "Right 20 "Aligned 00 ]
139
+@text4 [ "even 00 ]
140
+@text5 [ "odd 00 ]
135 141
\ No newline at end of file
... ...
@@ -1,103 +1,109 @@
1 1
 ( GUI Picture )
2 2
 
3 3
 %RTN { JMP2r }
4
-%8+  { #0008 ADD2 }
4
+%8+ { #0008 ADD2 }
5 5
 
6
-;color { byte 1 }
7
-;position { x 2 y 2 }
8
-;size { width 2 height 2 }
6
+( devices )
9 7
 
10
-|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
11
-|0110 ;Console { vector 2 pad 6 char 1 byte 1 short 2 string 2 }
12
-|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 addr 2 color 1 }
13
-|0170 ;File { vector 2 success 2 offset 2 pad 2 name 2 length 2 load 2 save 2 }
8
+|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
9
+|10 @Console [ &vector $2 &pad $6 &char $1 &byte $1 &short $2 &string $2 ]
10
+|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
11
+|70 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
12
+
13
+( variables )
14
+
15
+|0000
16
+
17
+@color [ &byte $1 ]
18
+@position [ &x $2 &y $2 ]
19
+@size [ &width $2 &height $2 ]
14 20
 
15 21
 ( program )
16 22
 
17
-|0200
23
+|0100
18 24
 
19
-	( theme ) #037a =System.r #032a =System.g #052a =System.b
25
+	( theme ) #037a .System/r DEO2 #032a .System/g DEO2 #052a .System/b DEO2
20 26
 
21
-	( background ) ,checker_icn #22 ,cover-pattern JSR2
27
+	( background ) ;checker_icn #22 ;cover-pattern JSR2
22 28
 
23
-	( load ) ,icn1_path =File.name #1800 =File.length ,image =File.load
24
-	( draw ) #0008 #0008 #0100 #00c0 #27 ,image ,draw-icn JSR2
29
+	( load ) ;icn1_path .File/name DEO2 #1800 .File/length DEO2 ;image .File/load DEO2
30
+	( draw ) #0008 #0008 #0100 #00c0 #27 ;image ;draw-icn JSR2
25 31
 
26
-	( load ) ,icn2_path =File.name #0800 =File.length ,image =File.load
27
-	( draw ) #0010 #0078 #0080 #0080 #27 ,image ,draw-icn JSR2
32
+	( load ) ;icn2_path .File/name DEO2 #0800 .File/length DEO2 ;image .File/load DEO2
33
+	( draw ) #0010 #0078 #0080 #0080 #27 ;image ;draw-icn JSR2
28 34
 
29
-	( load ) ,chr1_path =File.name #4000 =File.length ,image =File.load
30
-	( draw ) #00a8 #0010 #0100 #0100 #4f ,image ,draw-chr JSR2
35
+	( load ) ;chr1_path .File/name DEO2 #4000 .File/length DEO2 ;image .File/load DEO2
36
+	( draw ) #00a8 #0010 #0100 #0100 #4f ;image ;draw-chr JSR2
31 37
 
32
-	( load ) ,chr2_path =File.name #0900 =File.length ,image =File.load
33
-	( draw ) #0088 #0088 #0060 #0060 #41 ,image ,draw-chr JSR2
38
+	( load ) ;chr2_path .File/name DEO2 #0900 .File/length DEO2 ;image .File/load DEO2
39
+	( draw ) #0088 #0088 #0060 #0060 #41 ;image ;draw-chr JSR2
34 40
 
35 41
 BRK
36 42
 
37 43
 @draw-icn ( x y width height color addr -- )
38 44
 	
39
-	( load ) =Screen.addr =color =size.height =size.width =position.y =position.x
40
-	#0000 ~size.height
41
-	$ver
42
-		( save ) OVR2 ~position.y ADD2 =Screen.y
43
-		#0000 ~size.width
44
-		$hor
45
-			( save ) OVR2 ~position.x ADD2 =Screen.x
46
-			( draw ) ~color =Screen.color
47
-			( incr ) ~Screen.addr 8+ =Screen.addr
45
+	( load ) .Screen/addr DEO2 .color POK .size/height POK2 .size/width POK2 .position/y POK2 .position/x POK2
46
+	#0000 .size/height PEK2
47
+	&ver
48
+		( save ) OVR2 .position/y PEK2 ADD2 .Screen/y DEO2
49
+		#0000 .size/width PEK2
50
+		&hor
51
+			( save ) OVR2 .position/x PEK2 ADD2 .Screen/x DEO2
52
+			( draw ) .color PEK .Screen/color DEO
53
+			( incr ) .Screen/addr DEI2 8+ .Screen/addr DEO2
48 54
 			( incr ) SWP2 8+ SWP2
49
-			OVR2 OVR2 LTH2 ^$hor JNZ
55
+			OVR2 OVR2 LTH2 ,&hor JNZ
50 56
 		POP2 POP2
51 57
 		( incr ) SWP2 8+ SWP2
52
-		OVR2 OVR2 LTH2 ^$ver JNZ
58
+		OVR2 OVR2 LTH2 ,&ver JNZ
53 59
 	POP2 POP2
54 60
 
55 61
 RTN
56 62
 
57 63
 @draw-chr ( x y width height color addr -- )
58 64
 	
59
-	( load ) =Screen.addr =color =size.height =size.width =position.y =position.x
60
-	#0000 ~size.height
61
-	$ver
62
-		( save ) OVR2 ~position.y ADD2 =Screen.y
63
-		#0000 ~size.width
64
-		$hor
65
-			( save ) OVR2 ~position.x ADD2 =Screen.x
66
-			( draw ) ~color =Screen.color
67
-			( incr ) ~Screen.addr #0010 ADD2 =Screen.addr
65
+	( load ) .Screen/addr DEO2 .color POK .size/height POK2 .size/width POK2 .position/y POK2 .position/x POK2
66
+	#0000 .size/height PEK2
67
+	&ver
68
+		( save ) OVR2 .position/y PEK2 ADD2 .Screen/y DEO2
69
+		#0000 .size/width PEK2
70
+		&hor
71
+			( save ) OVR2 .position/x PEK2 ADD2 .Screen/x DEO2
72
+			( draw ) .color PEK .Screen/color DEO
73
+			( incr ) .Screen/addr DEI2 #0010 ADD2 .Screen/addr DEO2
68 74
 			( incr ) SWP2 8+ SWP2
69
-			OVR2 OVR2 LTH2 ^$hor JNZ
75
+			OVR2 OVR2 LTH2 ,&hor JNZ
70 76
 		POP2 POP2
71 77
 		( incr ) SWP2 8+ SWP2
72
-		OVR2 OVR2 LTH2 ^$ver JNZ
78
+		OVR2 OVR2 LTH2 ,&ver JNZ
73 79
 	POP2 POP2
74 80
 
75 81
 RTN
76 82
 
77 83
 @cover-pattern ( addr color -- )
78 84
 	
79
-	( load ) =color =Screen.addr
80
-	#0000 ~Screen.height
81
-	$ver
82
-		( save ) OVR2 =Screen.y
83
-		#0000 ~Screen.width
84
-		$hor
85
-			( save ) OVR2 =Screen.x
86
-			( draw ) ~color =Screen.color
85
+	( load ) .color POK .Screen/addr DEO2
86
+	#0000 .Screen/height DEI2
87
+	&ver
88
+		( save ) OVR2 .Screen/y DEO2
89
+		#0000 .Screen/width DEI2
90
+		&hor
91
+			( save ) OVR2 .Screen/x DEO2
92
+			( draw ) .color PEK .Screen/color DEO
87 93
 			( incr ) SWP2 8+ SWP2
88
-			OVR2 OVR2 LTH2 ^$hor JNZ
94
+			OVR2 OVR2 LTH2 ,&hor JNZ
89 95
 		POP2 POP2
90 96
 		( incr ) SWP2 8+ SWP2
91
-		OVR2 OVR2 LTH2 ^$ver JNZ
97
+		OVR2 OVR2 LTH2 ,&ver JNZ
92 98
 	POP2 POP2
93 99
 
94 100
 RTN
95 101
 
96 102
 @checker_icn [ f0f0 f0f0 0f0f 0f0f ]
97 103
 
98
-@icn1_path      [ projects/pictures/ergo100x0c0.bit 00 ]
99
-@icn2_path      [ projects/pictures/dafu80x80.bit 00 ]
100
-@chr1_path      [ projects/pictures/zerotwo2020.chr 00 ]
101
-@chr2_path      [ projects/pictures/felix0cx0c.chr 00 ]
104
+@icn1_path [ "projects/pictures/ergo100x0c0.bit 00 ]
105
+@icn2_path [ "projects/pictures/dafu80x80.bit 00 ]
106
+@chr1_path [ "projects/pictures/zerotwo2020.chr 00 ]
107
+@chr2_path [ "projects/pictures/felix0cx0c.chr 00 ]
102 108
 
103 109
 @image [ ]
104 110
\ No newline at end of file
... ...
@@ -7,147 +7,153 @@
7 7
 %ABS2 { DUP2 #000f SFT2 EQU #04 JNZ #ffff MUL2 }
8 8
 
9 9
 %SIZE-TO-RECT {
10
-	STH2 STH2 OVR2 STH2r ADD2 OVR2 STH2r ADD2 
10
+	STH2 STH2 OVR2 STH2r ADD2 OVR2 STH2r ADD2
11 11
 } ( x y w h -- x1 y1 x2 y2 )
12 12
 
13
-( draw requirements )
14
-;color { byte 1 }
13
+( devices )
14
+
15
+|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
16
+|10 @Console [ &vector $2 &pad $6 &char $1 &byte $1 &short $2 &string $2 ]
17
+|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
18
+
19
+( variables )
15 20
 
16
-;rect { x1 2 y1 2 x2 2 y2 2 }
17
-;line { x0 2 y0 2 x 2 y 2 sx 2 sy 2 dx 2 dy 2 e1 2 e2 2 }
18
-;circle { xc 2 yc 2 x 2 y 2 r 2 d 2 }
21
+|0000
22
+
23
+( draw requirements )
24
+@color [ &byte $1 ]
19 25
 
20
-|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
21
-|0110 ;Console { vector 2 pad 6 char 1 byte 1 short 2 string 2 }
22
-|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 addr 2 color 1 }
26
+@rect [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
27
+@line [ &x0 $2 &y0 $2 &x $2 &y $2 &sx $2 &sy $2 &dx $2 &dy $2 &e1 $2 &e2 $2 ]
28
+@circle [ &xc $2 &yc $2 &x $2 &y $2 &r $2 &d $2 ]
23 29
 
24 30
 ( program )
25 31
 
26
-|0200
32
+|0100
27 33
 	
28
-	( theme ) #f03f =System.r #f03f =System.g #003f =System.b
34
+	( theme ) #f03f .System/r DEO2 #f03f .System/g DEO2 #003f .System/b DEO2
29 35
 
30
-	( background ) ,checker_icn #23 ,cover-pattern JSR2
36
+	( background ) ;checker_icn #23 ;cover-pattern JSR2
31 37
 
32
-	#0010 #0030 #0020 #0020 SIZE-TO-RECT #01 ,line-slow JSR2
33
-	#0070 #0040 #0010 #01 ,draw-circle JSR2
34
-	#0038 #0030 #0020 #0020 SIZE-TO-RECT #01 ,line-rect JSR2
35
-	#0038 #0058 #0020 #0020 SIZE-TO-RECT #01 ,fill-rect JSR2
38
+	#0010 #0030 #0020 #0020 SIZE-TO-RECT #01 ;line-slow JSR2
39
+	#0070 #0040 #0010 #01 ;draw-circle JSR2
40
+	#0038 #0030 #0020 #0020 SIZE-TO-RECT #01 ;line-rect JSR2
41
+	#0038 #0058 #0020 #0020 SIZE-TO-RECT #01 ;fill-rect JSR2
36 42
 	
37 43
 BRK
38 44
 
39 45
 @line-slow ( x1 y1 x2 y2 color -- )
40 46
 	
41
-	( load ) =color -- =line.y0 -- =line.x0 =line.y =line.x
42
-	~line.x0 ~line.x SUB2 ABS2 =line.dx
43
-	~line.y0 ~line.y SUB2 ABS2 #0000 SWP2 SUB2 =line.dy
44
-	#ffff #00 ~line.x ~line.x0 LTS2 #0002 MUL2 ADD2 =line.sx 
45
-	#ffff #00 ~line.y ~line.y0 LTS2 #0002 MUL2 ADD2 =line.sy 
46
-	~line.dx ~line.dy ADD2 =line.e1
47
-	$loop
48
-		~line.x =Screen.x ~line.y =Screen.y ~color =Screen.color
49
-		~line.x ~line.x0 EQU2 ~line.y ~line.y0 EQU2 #0101 EQU2 ^$end JNZ
50
-		~line.e1 #0002 MUL2 =line.e2
51
-		~line.e2 ~line.dy LTS2 ^$skipy JNZ
52
-			~line.e1 ~line.dy ADD2 =line.e1
53
-			~line.x ~line.sx ADD2 =line.x
54
-		$skipy
55
-		~line.e2 ~line.dx GTS2 ^$skipx JNZ
56
-			~line.e1 ~line.dx ADD2 =line.e1
57
-			~line.y ~line.sy ADD2 =line.y
58
-		$skipx
59
-		,$loop JMP2
60
-
61
-	$end
47
+	( load ) .color POK -- .line/y0 POK2 -- .line/x0 POK2 .line/y POK2 .line/x POK2
48
+	.line/x0 PEK2 .line/x PEK2 SUB2 ABS2 .line/dx POK2
49
+	.line/y0 PEK2 .line/y PEK2 SUB2 ABS2 #0000 SWP2 SUB2 .line/dy POK2
50
+	#ffff #00 .line/x PEK2 .line/x0 PEK2 LTS2 #0002 MUL2 ADD2 .line/sx POK2
51
+	#ffff #00 .line/y PEK2 .line/y0 PEK2 LTS2 #0002 MUL2 ADD2 .line/sy POK2
52
+	.line/dx PEK2 .line/dy PEK2 ADD2 .line/e1 POK2
53
+	&loop
54
+		.line/x PEK2 .Screen/x DEO2 .line/y PEK2 .Screen/y DEO2 .color PEK .Screen/color DEO
55
+		.line/x PEK2 .line/x0 PEK2 EQU2 .line/y PEK2 .line/y0 PEK2 EQU2 #0101 EQU2 ,&end JNZ
56
+		.line/e1 PEK2 #0002 MUL2 .line/e2 POK2
57
+		.line/e2 PEK2 .line/dy PEK2 LTS2 ,&skipy JNZ
58
+			.line/e1 PEK2 .line/dy PEK2 ADD2 .line/e1 POK2
59
+			.line/x PEK2 .line/sx PEK2 ADD2 .line/x POK2
60
+		&skipy
61
+		.line/e2 PEK2 .line/dx PEK2 GTS2 ,&skipx JNZ
62
+			.line/e1 PEK2 .line/dx PEK2 ADD2 .line/e1 POK2
63
+			.line/y PEK2 .line/sy PEK2 ADD2 .line/y POK2
64
+		&skipx
65
+		;&loop JMP2
66
+
67
+	&end
62 68
 
63 69
 RTN
64 70
 
65 71
 @line-rect ( x1 y1 x2 y2 color -- )
66 72
 
67
-	( load ) =color DUP2 STH2 -- =rect.y2 -- =rect.x2 DUP2 STH2 =rect.y1 =rect.x1
73
+	( load ) .color POK DUP2 STH2 -- .rect/y2 POK2 -- .rect/x2 POK2 DUP2 STH2 .rect/y1 POK2 .rect/x1 POK2
68 74
 	STH2r STH2r
69
-	$ver
70
-		( save ) OVR2 =Screen.y
71
-		( draw ) ~rect.x1 =Screen.x ~color DUP =Screen.color 
72
-		( draw ) ~rect.x2 =Screen.x =Screen.color
75
+	&ver
76
+		( save ) OVR2 .Screen/y DEO2
77
+		( draw ) .rect/x1 PEK2 .Screen/x DEO2 .color PEK DUP .Screen/color DEO
78
+		( draw ) .rect/x2 PEK2 .Screen/x DEO2 .Screen/color DEO
73 79
 		( incr ) SWP2 ++ SWP2
74
-		OVR2 OVR2 LTS2 ^$ver JNZ
80
+		OVR2 OVR2 LTS2 ,&ver JNZ
75 81
 	POP2 POP2
76
-	~rect.x1 ~rect.x2
77
-	$hor
78
-		( save ) OVR2 =Screen.x
79
-		( draw ) ~rect.y1 =Screen.y ~color DUP =Screen.color 
80
-		( draw ) ~rect.y2 =Screen.y =Screen.color
82
+	.rect/x1 PEK2 .rect/x2 PEK2
83
+	&hor
84
+		( save ) OVR2 .Screen/x DEO2
85
+		( draw ) .rect/y1 PEK2 .Screen/y DEO2 .color PEK DUP .Screen/color DEO
86
+		( draw ) .rect/y2 PEK2 .Screen/y DEO2 .Screen/color DEO
81 87
 		( incr ) SWP2 ++ SWP2
82
-		OVR2 OVR2 ++ LTS2 ^$hor JNZ
88
+		OVR2 OVR2 ++ LTS2 ,&hor JNZ
83 89
 	POP2 POP2
84 90
 
85 91
 RTN
86 92
 
87 93
 @fill-rect ( x1 y1 x2 y2 color -- )
88 94
 	
89
-	=color
95
+	.color POK
90 96
 	( x1 x2 y1 y2 ) ROT2 SWP2
91
-	$ver
92
-		( save ) OVR2 =Screen.y
93
-		STH2 STH2 OVR2 OVR2 
94
-		$hor
95
-			( save ) OVR2 =Screen.x
96
-			( draw ) ~color =Screen.color
97
+	&ver
98
+		( save ) OVR2 .Screen/y DEO2
99
+		STH2 STH2 OVR2 OVR2
100
+		&hor
101
+			( save ) OVR2 .Screen/x DEO2
102
+			( draw ) .color PEK .Screen/color DEO
97 103
 			( incr ) SWP2 ++ SWP2
98
-			OVR2 OVR2 LTS2 ^$hor JNZ
104
+			OVR2 OVR2 LTS2 ,&hor JNZ
99 105
 		POP2 POP2 STH2r STH2r
100 106
 		( incr ) SWP2 ++ SWP2
101
-		OVR2 OVR2 LTS2 ^$ver JNZ
107
+		OVR2 OVR2 LTS2 ,&ver JNZ
102 108
 	POP2 POP2 POP2 POP2
103 109
 
104 110
 RTN
105 111
 
106 112
 @draw-circle ( xc yc r color -- )
107 113
 
108
-	( load ) =color =circle.r =circle.yc =circle.xc
109
-	#0000 =circle.x ~circle.r =circle.y
110
-	~circle.r #0002 MUL2 =circle.d
111
-	( draw ) ,$seg JSR2
112
-	$loop
113
-		( incr ) ~circle.x ++ =circle.x
114
-		~circle.d #0001 LTS2 ^$else JNZ
115
-			( decr ) ~circle.y -- =circle.y
116
-			~circle.x ~circle.y SUB2 #0004 MUL2 ~circle.d ADD2 =circle.d
117
-			,$end JMP2
118
-		$else
119
-			~circle.x #0004 MUL2 ~circle.d ADD2 =circle.d
120
-		$end
121
-		( draw ) ,$seg JSR2
122
-		~circle.y ~circle.x -- GTS2 ^$loop JNZ
114
+	( load ) .color POK .circle/r POK2 .circle/yc POK2 .circle/xc POK2
115
+	#0000 .circle/x POK2 .circle/r PEK2 .circle/y POK2
116
+	.circle/r PEK2 #0002 MUL2 .circle/d POK2
117
+	( draw ) ;&seg JSR2
118
+	&loop
119
+		( incr ) .circle/x PEK2 ++ .circle/x POK2
120
+		.circle/d PEK2 #0001 LTS2 ,&else JNZ
121
+			( decr ) .circle/y PEK2 -- .circle/y POK2
122
+			.circle/x PEK2 .circle/y PEK2 SUB2 #0004 MUL2 .circle/d PEK2 ADD2 .circle/d POK2
123
+			;&end JMP2
124
+		&else
125
+			.circle/x PEK2 #0004 MUL2 .circle/d PEK2 ADD2 .circle/d POK2
126
+		&end
127
+		( draw ) ;&seg JSR2
128
+		.circle/y PEK2 .circle/x PEK2 -- GTS2 ,&loop JNZ
123 129
 	RTN
124
-	$seg
125
-		~circle.xc ~circle.x ADD2 =Screen.x ~circle.yc ~circle.y ADD2 =Screen.y ~color =Screen.color
126
-		~circle.xc ~circle.x SUB2 =Screen.x ~circle.yc ~circle.y ADD2 =Screen.y ~color =Screen.color
127
-		~circle.xc ~circle.x ADD2 =Screen.x ~circle.yc ~circle.y SUB2 =Screen.y ~color =Screen.color
128
-		~circle.xc ~circle.x SUB2 =Screen.x ~circle.yc ~circle.y SUB2 =Screen.y ~color =Screen.color
129
-		~circle.xc ~circle.y ADD2 =Screen.x ~circle.yc ~circle.x ADD2 =Screen.y ~color =Screen.color
130
-		~circle.xc ~circle.y SUB2 =Screen.x ~circle.yc ~circle.x ADD2 =Screen.y ~color =Screen.color
131
-		~circle.xc ~circle.y ADD2 =Screen.x ~circle.yc ~circle.x SUB2 =Screen.y ~color =Screen.color
132
-		~circle.xc ~circle.y SUB2 =Screen.x ~circle.yc ~circle.x SUB2 =Screen.y ~color =Screen.color
130
+	&seg
131
+		.circle/xc PEK2 .circle/x PEK2 ADD2 .Screen/x DEO2 .circle/yc PEK2 .circle/y PEK2 ADD2 .Screen/y DEO2 .color PEK .Screen/color DEO
132
+		.circle/xc PEK2 .circle/x PEK2 SUB2 .Screen/x DEO2 .circle/yc PEK2 .circle/y PEK2 ADD2 .Screen/y DEO2 .color PEK .Screen/color DEO
133
+		.circle/xc PEK2 .circle/x PEK2 ADD2 .Screen/x DEO2 .circle/yc PEK2 .circle/y PEK2 SUB2 .Screen/y DEO2 .color PEK .Screen/color DEO
134
+		.circle/xc PEK2 .circle/x PEK2 SUB2 .Screen/x DEO2 .circle/yc PEK2 .circle/y PEK2 SUB2 .Screen/y DEO2 .color PEK .Screen/color DEO
135
+		.circle/xc PEK2 .circle/y PEK2 ADD2 .Screen/x DEO2 .circle/yc PEK2 .circle/x PEK2 ADD2 .Screen/y DEO2 .color PEK .Screen/color DEO
136
+		.circle/xc PEK2 .circle/y PEK2 SUB2 .Screen/x DEO2 .circle/yc PEK2 .circle/x PEK2 ADD2 .Screen/y DEO2 .color PEK .Screen/color DEO
137
+		.circle/xc PEK2 .circle/y PEK2 ADD2 .Screen/x DEO2 .circle/yc PEK2 .circle/x PEK2 SUB2 .Screen/y DEO2 .color PEK .Screen/color DEO
138
+		.circle/xc PEK2 .circle/y PEK2 SUB2 .Screen/x DEO2 .circle/yc PEK2 .circle/x PEK2 SUB2 .Screen/y DEO2 .color PEK .Screen/color DEO
133 139
 
134 140
 RTN
135 141
 
136 142
 @cover-pattern ( addr color -- )
137 143
 	
138
-	( load ) =color =Screen.addr
139
-	#0000 ~Screen.height
140
-	$ver
141
-		( save ) OVR2 =Screen.y
142
-		#0000 ~Screen.width
143
-		$hor
144
-			( save ) OVR2 =Screen.x
145
-			( draw ) ~color =Screen.color
144
+	( load ) .color POK .Screen/addr DEO2
145
+	#0000 .Screen/height DEI2
146
+	&ver
147
+		( save ) OVR2 .Screen/y DEO2
148
+		#0000 .Screen/width DEI2
149
+		&hor
150
+			( save ) OVR2 .Screen/x DEO2
151
+			( draw ) .color PEK .Screen/color DEO
146 152
 			( incr ) SWP2 8+ SWP2
147
-			OVR2 OVR2 LTH2 ^$hor JNZ
153
+			OVR2 OVR2 LTH2 ,&hor JNZ
148 154
 		POP2 POP2
149 155
 		( incr ) SWP2 8+ SWP2
150
-		OVR2 OVR2 LTH2 ^$ver JNZ
156
+		OVR2 OVR2 LTH2 ,&ver JNZ
151 157
 	POP2 POP2
152 158
 
153 159
 RTN
... ...
@@ -1,65 +1,69 @@
1
-;scroll { x 2 y 2 wait 1 }
2
-
3 1
 ( devices )
4 2
 
5
-|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
6
-|0110 ;Console { vector 2 pad 6 char 1 byte 1 short 2 string 2 }
7
-|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 addr 2 color 1 }
8
-|0130 ;Audio { wave 2 envelope 2 pad 4 volume 1 pitch 1 play 1 value 2 delay 2 finish 1 }
9
-|0140 ;Controller { vector 2 button 1 key 1 }
10
-|0160 ;Mouse { vector 2 x 2 y 2 state 1 chord 1 }
11
-|0170 ;File { vector 2 success 2 offset 2 pad 2 name 2 length 2 load 2 save 2 }
12
-|01a0 ;DateTime { year 2 month 1 day 1 hour 1 minute 1 second 1 dotw 1 doty 2 isdst 1 refresh 1 }
3
+|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
4
+|10 @Console [ &vector $2 &pad $6 &char $1 &byte $1 &short $2 &string $2 ]
5
+|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
6
+|30 @Audio [ &wave $2 &envelope $2 &pad $4 &volume $1 &pitch $1 &play $1 &value $2 &delay $2 &finish $1 ]
7
+|40 @Controller [ &vector $2 &button $1 &key $1 ]
8
+|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
9
+|70 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
10
+|a0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 &refresh $1 ]
11
+
12
+( variables )
13
+
14
+|0000
15
+
16
+@scroll [ &x $2 &y $2 &wait $1 ]
13 17
 
14
-|0200
15
-    #90ff =System.r #9000 =System.g #900f =System.b
16
-    #08e0 ~Screen.width #0001 SFT2 SUB2 =scroll.x
17
-    #09b0 =scroll.y
18
-    ,frame =Screen.vector
19
-    #30 =scroll.wait
20
-    BRK
18
+|0100 ( -> )
19
+	#90ff .System/r DEO2 #9000 .System/g DEO2 #900f .System/b DEO2
20
+	#08e0 .Screen/width DEI2 #0001 SFT2 SUB2 .scroll/x POK2
21
+	#09b0 .scroll/y POK2
22
+	;frame .Screen/vector DEO2
23
+	#30 .scroll/wait POK
24
+	BRK
21 25
 
22 26
 @frame ( -> )
23
-    #ffff
24
-    $loop
25
-    DUP2 ^row JSR
26
-    #0001 ADD2
27
-    DUP2 ~Screen.height LTH2 ^$loop JNZ
28
-    POP2
29
-    ~scroll.wait ^$noscroll JNZ
30
-    ~scroll.y #0001 ADD2 =scroll.y
31
-    BRK
27
+	#ffff
28
+	&loop
29
+	DUP2 ,row JSR
30
+	#0001 ADD2
31
+	DUP2 .Screen/height DEI2 LTH2 ,&loop JNZ
32
+	POP2
33
+	.scroll/wait PEK ,&noscroll JNZ
34
+	.scroll/y PEK2 #0001 ADD2 .scroll/y POK2
35
+	BRK
32 36
 
33
-    $noscroll
34
-    ~scroll.wait #01 SUB =scroll.wait
35
-    BRK
37
+	&noscroll
38
+	.scroll/wait PEK #01 SUB .scroll/wait POK
39
+	BRK
36 40
 
37 41
 @row ( y* -- )
38
-    DUP2 =Screen.y
39
-    ~scroll.y ADD2
42
+	DUP2 .Screen/y DEO2
43
+	.scroll/y PEK2 ADD2
40 44
 
41
-    ~Screen.width
42
-    $loop
43
-    #0001 SUB2
44
-    OVR2 OVR2 ~scroll.x ADD2 EOR2 DUP2 #0013 DIV2 #0013 MUL2 SUB2
45
-    DUP #00 EQU ^$draw JNZ
46
-    DUP #05 EQU ^$draw JNZ
47
-    POP2
48
-    $rest
49
-    DUP2 ORA ^$loop JNZ
50
-    POP2 POP2
51
-    JMP2r
45
+	.Screen/width DEI2
46
+	&loop
47
+	#0001 SUB2
48
+	OVR2 OVR2 .scroll/x PEK2 ADD2 EOR2 DUP2 #0013 DIV2 #0013 MUL2 SUB2
49
+	DUP #00 EQU ,&draw JNZ
50
+	DUP #05 EQU ,&draw JNZ
51
+	POP2
52
+	&rest
53
+	DUP2 ORA ,&loop JNZ
54
+	POP2 POP2
55
+	JMP2r
52 56
 
53
-    #15 =Screen.color
54
-    JMP2r
57
+	#15 .Screen/color DEO
58
+	JMP2r
55 59
 
56
-    $draw
57
-    OVR2 =Screen.x
58
-    #05 ADD =Screen.color
59
-    ~Screen.y
60
-    DUP2 #0001 ADD2 =Screen.y
61
-    #00 =Screen.color
62
-    =Screen.y
63
-    POP
64
-    ^$rest JMP
60
+	&draw
61
+	OVR2 .Screen/x DEO2
62
+	#05 ADD .Screen/color DEO
63
+	.Screen/y DEI2
64
+	DUP2 #0001 ADD2 .Screen/y DEO2
65
+	#00 .Screen/color DEO
66
+	.Screen/y DEO2
67
+	POP
68
+	,&rest JMP
65 69
 
... ...
@@ -1,4 +1,4 @@
1
-( 
1
+(
2 2
 	app/left : text editor
3 3
 
4 4
 	TODO
... ...
@@ -14,7 +14,10 @@
14 14
 			- Don't scroll past oef
15 15
 			- Hor scroll
16 16
 			- Real scrolling distance
17
-)  
17
+	FIXME
18
+		- Imperfect port from previous assembler syntax
19
+)
20
+
18 21
 
19 22
 %RTN { JMP2r }
20 23
 %RTN? { #00 EQU #02 JNZ STH2r JMP2 }
... ...
@@ -23,420 +26,422 @@
23 26
 %8/ { #0003 SFT2 } %8* { #0030 SFT2 }
24 27
 %8- { #0008 SUB2 } %8+ { #0008 ADD2 }
25 28
 
26
-( variables )
29
+( devices )
27 30
 
28
-;lock { byte 1 }
29
-;k { byte 1 } 
30
-;l { byte 1 } 
31
-;i { short 2 } 
32
-;j { short 2 } 
33
-;addr { short 2 }
34
-;selection { from 2 to 2 } 
35
-;position { x 2 y 2 } 
36
-;scroll { x 2 y 2 }
37
-;pt { x 2 y 2 } 
38
-;mouse { x 2 y 2 } 
39
-;touch { x1 2 y1 2 x2 2 y2 2 state 1 }
40
-;textarea { x1 2 y1 2 x2 2 y2 2 addr 2 cursor 1 }
41
-;label { x 2 y 2 color 1 addr 2 } ( remove )
31
+|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
32
+|10 @Console [ &vector $2 &pad $6 &char $1 &byte $1 &short $2 &string $2 ]
33
+|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
34
+|40 @Controller [ &vector $2 &button $1 &key $1 ]
35
+|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
36
+|70 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
42 37
 
43
-( devices )
38
+( variables )
44 39
 
45
-|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
46
-|0110 ;Console { vector 2 pad 6 char 1 byte 1 short 2 string 2 }
47
-|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 addr 2 color 1 }
48
-|0140 ;Controller { vector 2 button 1 key 1 }
49
-|0160 ;Mouse  { vector 2 x 2 y 2 state 1 chord 1 }
50
-|0170 ;File { vector 2 success 2 offset 2 pad 2 name 2 length 2 load 2 save 2 }
40
+|0000
41
+
42
+@lock [ &byte $1 ]
43
+@k [ &byte $1 ]
44
+@l [ &byte $1 ]
45
+@i [ &short $2 ]
46
+@j [ &short $2 ]
47
+@addr [ &short $2 ]
48
+@selection [ &from $2 &to $2 ]
49
+@position [ &x $2 &y $2 ]
50
+@scroll [ &x $2 &y $2 ]
51
+@pt [ &x $2 &y $2 ]
52
+@mouse [ &x $2 &y $2 ]
53
+@touch [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 &state $1 ]
54
+@textarea [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 &addr $2 &cursor $1 ]
55
+@label [ &x $2 &y $2 &color $1 &addr $2 ] ( remove )
51 56
 
52 57
 ( program )
53 58
 
54
-|0200 @RESET
59
+|0100 @RESET
55 60
 	
56
-	( theme ) #e0fa =System.r #30fa =System.g #30fa =System.b
57
-	( vectors ) ,on-mouse =Mouse.vector
58
-	( vectors ) ,on-button =Controller.vector
61
+	( theme ) #e0fa .System/r DEO2 #30fa .System/g DEO2 #30fa .System/b DEO2
62
+	( vectors ) ;on-mouse .Mouse/vector DEO2
63
+	( vectors ) ;on-button .Controller/vector DEO2
59 64
 
60 65
 	( load file )
61
-	,filepath ,load-file JSR2
66
+	;filepath ;load-file JSR2
62 67
 
63 68
 	( place textarea )
64
-	#0018 =textarea.x1 ~Screen.height 8- =textarea.y2
69
+	#0018 .textarea/x1 POK2 .Screen/height DEI2 8- .textarea/y2 POK2
65 70
 
66
-	,select JSR2
67
-	,redraw JSR2
71
+	;select JSR2
72
+	;redraw JSR2
68 73
 
69 74
 BRK
70 75
 
71 76
 @on-button ( -> )
72 77
 	
73 78
 	( alt + arrow )
74
-	~Controller.button #0f AND #02 NEQ ^$no-alt JNZ
75
-		~Controller.button #04 SFT 
76
-		DUP #01 NEQ ^$no-aup JNZ
77
-			( sel word ) ,find-wordstart JSR2 =selection.to $no-aup
78
-		DUP #02 NEQ ^$no-adown JNZ
79
-			( sel word ) ,find-wordend JSR2 =selection.to $no-adown
80
-		DUP #04 NEQ ^$no-aleft JNZ
81
-			( sel decr ) ~selection.to -- =selection.to $no-aleft
82
-		DUP #08 NEQ ^$no-aright JNZ
83
-			( sel incr ) ~selection.to ++ =selection.to $no-aright
79
+	.Controller/button DEI #0f AND #02 NEQ ,&no-alt JNZ
80
+		.Controller/button DEI #04 SFT
81
+		DUP #01 NEQ ,&no-aup JNZ
82
+			( sel word ) ;find-wordstart JSR2 .selection/to POK2 &no-aup
83
+		DUP #02 NEQ ,&no-adown JNZ
84
+			( sel word ) ;find-wordend JSR2 .selection/to POK2 &no-adown
85
+		DUP #04 NEQ ,&no-aleft JNZ
86
+			( sel decr ) .selection/to PEK2 -- .selection/to POK2 &no-aleft
87
+		DUP #08 NEQ ,&no-aright JNZ
88
+			( sel incr ) .selection/to PEK2 ++ .selection/to POK2 &no-aright
84 89
 		POP
85
-		,clamp-selection JSR2 
86
-		,redraw JSR2
90
+		;clamp-selection JSR2
91
+		;redraw JSR2
87 92
 		BRK
88
-	$no-alt
93
+	&no-alt
89 94
 
90 95
 	( ctrl + arrow )
91
-	~Controller.button #0f AND #01 NEQ ^$no-ctrl JNZ
92
-		~Controller.button #04 SFT 
93
-		DUP #01 NEQ ^$no-cup JNZ
94
-			( jump scroll ) #0004 ,scroll-up JSR2 $no-cup
95
-		DUP #02 NEQ ^$no-cdown JNZ
96
-			( jump scroll ) #0004 ,scroll-down JSR2 $no-cdown
97
-		DUP #04 NEQ ^$no-cleft JNZ
98
-			( jump line ) ,goto-linestart JSR2 $no-cleft
99
-		DUP #08 NEQ ^$no-cright JNZ
100
-			( jump line ) ,goto-lineend JSR2 $no-cright
96
+	.Controller/button DEI #0f AND #01 NEQ ,&no-ctrl JNZ
97
+		.Controller/button DEI #04 SFT
98
+		DUP #01 NEQ ,&no-cup JNZ
99
+			( jump scroll ) #0004 ;scroll-up JSR2 &no-cup
100
+		DUP #02 NEQ ,&no-cdown JNZ
101
+			( jump scroll ) #0004 ;scroll-down JSR2 &no-cdown
102
+		DUP #04 NEQ ,&no-cleft JNZ
103
+			( jump line ) ;goto-linestart JSR2 &no-cleft
104
+		DUP #08 NEQ ,&no-cright JNZ
105
+			( jump line ) ;goto-lineend JSR2 &no-cright
101 106
 		POP
102
-		,redraw JSR2
107
+		;redraw JSR2
103 108
 		BRK
104
-	$no-ctrl
109
+	&no-ctrl
105 110
 
106 111
 	( arrow )
107
-	~Controller.button #f0 AND #00 EQU ,$no-arrow JNZ2
108
-		~Controller.button #f0 AND
109
-		DUP #10 NEQ ^$no-arrowup JNZ
110
-			( clamp ) ~position.y #0000 EQU2 ^$no-arrowup JNZ
111
-			,find-lineoffset JSR2 =position.x ~position.y -- =position.y 
112
-			,find-selection JSR2 DUP2 =selection.from ++ =selection.to $no-arrowup
113
-		DUP #20 NEQ ^$no-arrowdown JNZ
112
+	.Controller/button DEI #f0 AND #00 EQU ;&no-arrow JNZ2
113
+		.Controller/button DEI #f0 AND
114
+		DUP #10 NEQ ,&no-arrowup JNZ
115
+			( clamp ) .position/y PEK2 #0000 EQU2 ,&no-arrowup JNZ
116
+			;find-lineoffset JSR2 .position/x POK2 .position/y PEK2 -- .position/y POK2
117
+			;find-selection JSR2 DUP2 .selection/from POK2 ++ .selection/to POK2 &no-arrowup
118
+		DUP #20 NEQ ,&no-arrowdown JNZ
114 119
 			( clamp:TODO )
115
-			,find-lineoffset JSR2 =position.x ~position.y ++ =position.y 
116
-			,find-selection JSR2 DUP2 =selection.from ++ =selection.to $no-arrowdown
117
-		DUP #40 NEQ ^$no-arrowleft JNZ
118
-			( clamp ) ~selection.from ,document.body EQU2 ^$no-arrowleft JNZ
119
-			~selection.from -- DUP2 =selection.from ++ =selection.to $no-arrowleft
120
-		DUP #80 NEQ ^$no-arrowright JNZ
120
+			;find-lineoffset JSR2 .position/x POK2 .position/y PEK2 ++ .position/y POK2
121
+			;find-selection JSR2 DUP2 .selection/from POK2 ++ .selection/to POK2 &no-arrowdown
122
+		DUP #40 NEQ ,&no-arrowleft JNZ
123
+			( clamp ) .selection/from PEK2 ;document/body EQU2 ,&no-arrowleft JNZ
124
+			.selection/from PEK2 -- DUP2 .selection/from POK2 ++ .selection/to POK2 &no-arrowleft
125
+		DUP #80 NEQ ,&no-arrowright JNZ
121 126
 			( clamp:TODO )
122
-			#aa =Console.byte
123
-			~selection.from ++ DUP2 =selection.from ++ =selection.to $no-arrowright
127
+			#aa .Console/byte DEO
128
+			.selection/from PEK2 ++ DUP2 .selection/from POK2 ++ .selection/to POK2 &no-arrowright
124 129
 		POP
125
-		,clamp-selection JSR2 
126
-		,follow-selection JSR2 
127
-		,redraw JSR2 
128
-	$no-arrow
130
+		;clamp-selection JSR2
131
+		;follow-selection JSR2
132
+		;redraw JSR2
133
+	&no-arrow
129 134
 
130
-	~Controller.key #08 NEQ ^$no-backspace JNZ
135
+	.Controller/key DEI #08 NEQ ,&no-backspace JNZ
131 136
 		( erase )
132
-		~selection.to ~selection.from SUB2 #0001 NEQ2 ^$erase-multiple JNZ
133
-			~selection.to ~selection.from SUB2 ,shift-left JSR2
134
-			,$erase-end JMP2
135
-		$erase-multiple
136
-			~selection.from ++ =selection.from
137
-			~selection.to ~selection.from SUB2 ++ ,shift-left JSR2
138
-		$erase-end
139
-		~selection.from -- =selection.from
140
-		~selection.from ++ =selection.to
141
-		,redraw JSR2
137
+		.selection/to PEK2 .selection/from PEK2 SUB2 #0001 NEQ2 ,&erase-multiple JNZ
138
+			.selection/to PEK2 .selection/from PEK2 SUB2 ;shift-left JSR2
139
+			;&erase-end JMP2
140
+		&erase-multiple
141
+			.selection/from PEK2 ++ .selection/from POK2
142
+			.selection/to PEK2 .selection/from PEK2 SUB2 ++ ;shift-left JSR2
143
+		&erase-end
144
+		.selection/from PEK2 -- .selection/from POK2
145
+		.selection/from PEK2 ++ .selection/to POK2
146
+		;redraw JSR2
142 147
 		BRK
143
-	$no-backspace
148
+	&no-backspace
144 149
 
145 150
 	( insert )
146
-	~selection.to ~selection.from SUB2 ,shift-right JSR2
147
-	~Controller.key ~selection.from POK2
148
-	~selection.from ++ =selection.from
149
-	~selection.from ++ =selection.to
150
-	,redraw JSR2
151
+	.selection/to PEK2 .selection/from PEK2 SUB2 ;shift-right JSR2
152
+	.Controller/key DEI .selection/from PEK2 PUT
153
+	.selection/from PEK2 ++ .selection/from POK2
154
+	.selection/from PEK2 ++ .selection/to POK2
155
+	;redraw JSR2
151 156
 
152 157
 BRK
153 158
 
154 159
 @on-mouse ( -> )
155 160
 	
156
-	~Mouse.state #00 EQU ^$touch-end JNZ
157
-		~Mouse.x #0010 LTH2 ,touch-linebar JNZ2
158
-		~Mouse.x ~Screen.width 8- LTH2 ,touch-body JNZ2
159
-		,touch-scrollbar JMP2
160
-	$touch-end
161
+	.Mouse/state DEI #00 EQU ,&touch-end JNZ
162
+		.Mouse/x DEI2 #0010 LTH2 ;touch-linebar JNZ2
163
+		.Mouse/x DEI2 .Screen/width DEI2 8- LTH2 ;touch-body JNZ2
164
+		;touch-scrollbar JMP2
165
+	&touch-end
161 166
 
162
-	~Mouse.state =touch.state
167
+	.Mouse/state DEI .touch/state POK
163 168
 
164
-	,draw-cursor JSR2
169
+	;draw-cursor JSR2
165 170
 
166 171
 BRK
167 172
 
168 173
 @touch-linebar ( -- )
169 174
 	
170
-	#0000 =position.x
171
-	~Mouse.y 8/ ~scroll.y ADD2 =position.y 
172
-	,find-selection JSR2 DUP2 =selection.from ++ =selection.to
173
-	,goto-linestart JSR2
174
-	,redraw JSR2 
175
-	,draw-cursor JSR2
175
+	#0000 .position/x POK2
176
+	.Mouse/y DEI2 8/ .scroll/y PEK2 ADD2 .position/y POK2
177
+	;find-selection JSR2 DUP2 .selection/from POK2 ++ .selection/to POK2
178
+	;goto-linestart JSR2
179
+	;redraw JSR2
180
+	;draw-cursor JSR2
176 181
 
177 182
 BRK
178 183
 
179 184
 @touch-body ( -- )
180 185
 	
181
-	~Mouse.y 8/ ~scroll.y ADD2 =position.y
182
-	~Mouse.x ~textarea.x1 SUB2 #0007 ADD2 #0007 DIV2 =position.x
186
+	.Mouse/y DEI2 8/ .scroll/y PEK2 ADD2 .position/y POK2
187
+	.Mouse/x DEI2 .textarea/x1 PEK2 SUB2 #0007 ADD2 #0007 DIV2 .position/x POK2
183 188
 	( chords )
184
-	~Mouse.chord #00 EQU ^$no-chords JNZ
185
-		~Mouse.chord
186
-		DUP #01 NEQ ^$no-chord-cut JNZ
187
-			,cut JSR2 ( release ) #00 DUP =Mouse.state =Mouse.chord $no-chord-cut
188
-		DUP #10 NEQ ^$no-chord-paste JNZ
189
-			,paste JSR2 ( release ) #00 DUP =Mouse.state =Mouse.chord $no-chord-paste
189
+	.Mouse/chord DEI #00 EQU ,&no-chords JNZ
190
+		.Mouse/chord DEI
191
+		DUP #01 NEQ ,&no-chord-cut JNZ
192
+			;cut JSR2 ( release ) #00 DUP .Mouse/state DEO .Mouse/chord DEO &no-chord-cut
193
+		DUP #10 NEQ ,&no-chord-paste JNZ
194
+			;paste JSR2 ( release ) #00 DUP .Mouse/state DEO .Mouse/chord DEO &no-chord-paste
190 195
 		POP
191
-		,redraw JSR2
196
+		;redraw JSR2
192 197
 		BRK
193
-	$no-chords
198
+	&no-chords
194 199
 	( drag )
195
-	~Mouse.state ~touch.state NEQ ~Controller.button #0f AND #02 NEQ #0101 EQU2 ^$no-drag JNZ
200
+	.Mouse/state DEI .touch/state PEK NEQ .Controller/button DEI #0f AND #02 NEQ #0101 EQU2 ,&no-drag JNZ
196 201
 		( on drag )
197
-		,find-selection JSR2 ++ =selection.to
198
-		,clamp-selection JSR2
199
-		^$end JMP
200
-	$no-drag
202
+		;find-selection JSR2 ++ .selection/to POK2
203
+		;clamp-selection JSR2
204
+		,&end JMP
205
+	&no-drag
201 206
 	( on click )
202
-	,find-selection JSR2 DUP2 =selection.from ++ =selection.to 
203
-	$end
204
-	~Mouse.state =touch.state
205
-	,draw-cursor JSR2
206
-	,redraw JSR2
207
+	;find-selection JSR2 DUP2 .selection/from POK2 ++ .selection/to POK2
208
+	&end
209
+	.Mouse/state DEI .touch/state POK
210
+	;draw-cursor JSR2
211
+	;redraw JSR2
207 212
 
208 213
 BRK
209 214
 
210 215
 @touch-scrollbar ( -- )
211 216
 
212
-	~Mouse.y #0008 GTH2 ^$no-up JNZ
213
-		( decr ) ~scroll.y #00 ~scroll.y #0000 NEQ2 SUB2 =scroll.y
214
-		^$end JMP
215
-	$no-up 
216
-	~Mouse.y ~Screen.height 8- LTH2 ^$no-down JNZ
217
-		( incr ) ~scroll.y ++ =scroll.y
218
-		^$end JMP
219
-	$no-down 
220
-	~Mouse.y 8- =scroll.y
221
-	$end
222
-	~Mouse.state =touch.state
223
-	,draw-cursor JSR2
224
-	,redraw JSR2 
217
+	.Mouse/y DEI2 #0008 GTH2 ,&no-up JNZ
218
+		( decr ) .scroll/y PEK2 #00 .scroll/y PEK2 #0000 NEQ2 SUB2 .scroll/y POK2
219
+		,&end JMP
220
+	&no-up
221
+	.Mouse/y DEI2 .Screen/height DEI2 8- LTH2 ,&no-down JNZ
222
+		( incr ) .scroll/y PEK2 ++ .scroll/y POK2
223
+		,&end JMP
224
+	&no-down
225
+	.Mouse/y DEI2 8- .scroll/y POK2
226
+	&end
227
+	.Mouse/state DEI .touch/state POK
228
+	;draw-cursor JSR2
229
+	;redraw JSR2
225 230
 
226 231
 BRK
227 232
 
228 233
 @load-file ( path )
229 234
 
230
-	=File.name #8000 =File.length ,document.body =File.load
235
+	.File/name DEO2 #8000 .File/length DEO2 ;document/body .File/load DEO2
231 236
 	( get file length )
232
-	,document.body =document.eof
233
-	$loop
234
-		( incr ) ~document.eof ++ =document.eof
235
-	~document.eof PEK2 #00 NEQ ^$loop JNZ
237
+	;document/body ;document/eof PUT2
238
+	&loop
239
+		( incr ) ;document/eof GET2 ++ ;document/eof PUT2
240
+	;document/eof GET2 GET #00 NEQ ,&loop JNZ
236 241
 
237 242
 RTN
238 243
 
239 244
 @scroll-up ( length -- )
240 245
 	
241
-	DUP2 ~scroll.y LTH2 ^$clamp JNZ
242
-		#0000 =scroll.y POP2 RTN
243
-	$clamp
244
-	~scroll.y SWP2 SUB2 =scroll.y
246
+	DUP2 .scroll/y PEK2 LTH2 ,&clamp JNZ
247
+		#0000 .scroll/y POK2 POP2 RTN
248
+	&clamp
249
+	.scroll/y PEK2 SWP2 SUB2 .scroll/y POK2
245 250
 
246 251
 RTN
247 252
 
248 253
 @scroll-down ( length -- )
249 254
 
250 255
 	( TODO: Clamp )
251
-	~scroll.y SWP2 ADD2 =scroll.y
256
+	.scroll/y PEK2 SWP2 ADD2 .scroll/y POK2
252 257
 
253 258
 RTN
254 259
 
255 260
 @shift-left ( length -- )
256 261
 
257
-	=i
258
-	~selection.from -- =j ( start -> end )
259
-	$loop
260
-		( move ) ~j ~i ADD2 PEK2 ~j POK2
261
-		( incr ) ~j ++ =j
262
-		~j ~document.eof LTH2 ^$loop JNZ
263
-	~document.eof ~i SUB2 =document.eof
262
+	.i POK2
263
+	.selection/from PEK2 -- .j POK2 ( start -> end )
264
+	&loop
265
+		( move ) .j PEK2 .i PEK2 ADD2 GET .j PEK2 PUT
266
+		( incr ) .j PEK2 ++ .j POK2
267
+		.j PEK2 ;document/eof GET2 LTH2 ,&loop JNZ
268
+	;document/eof GET2 .i PEK2 SUB2 ;document/eof PUT2
264 269
 
265 270
 RTN
266 271
 
267 272
 @shift-right ( length -- )
268 273
 
269
-	=i
270
-	~document.eof =j ( end -> start )
271
-	$loop
272
-		( move ) ~j ~i SUB2 PEK2 ~j POK2
273
-		( decr ) ~j -- =j
274
-		~j ~selection.from GTH2 ^$loop JNZ
275
-	~document.eof ~i ADD2 =document.eof
274
+	.i POK2
275
+	;document/eof GET2 .j POK2 ( end -> start )
276
+	&loop
277
+		( move ) .j PEK2 .i PEK2 SUB2 GET .j PEK2 PUT
278
+		( decr ) .j PEK2 -- .j POK2
279
+		.j PEK2 .selection/from PEK2 GTH2 ,&loop JNZ
280
+	;document/eof GET2 .i PEK2 ADD2 ;document/eof PUT2
276 281
 
277 282
 RTN
278 283
 
279 284
 @follow-selection ( -- )
280 285
 
281
-	~position.y ~scroll.y GTH2 ^$no-up JNZ
282
-		~position.y =scroll.y RTN
283
-	$no-up
284
-	~position.y ~Screen.height #0010 SUB2 8/ ~scroll.y ADD2 LTH2 ^$no-down JNZ
285
-		~position.y ~Screen.height #0010 SUB2 8/ SUB2 =scroll.y RTN
286
-	$no-down
286
+	.position/y PEK2 .scroll/y PEK2 GTH2 ,&no-up JNZ
287
+		.position/y PEK2 .scroll/y POK2 RTN
288
+	&no-up
289
+	.position/y PEK2 .Screen/height DEI2 #0010 SUB2 8/ .scroll/y PEK2 ADD2 LTH2 ,&no-down JNZ
290
+		.position/y PEK2 .Screen/height DEI2 #0010 SUB2 8/ SUB2 .scroll/y POK2 RTN
291
+	&no-down
287 292
 
288 293
 RTN
289 294
 
290 295
 @clamp-selection ( -- )
291 296
 
292
-	~selection.from ~selection.to LTH2 RTN?
293
-	~selection.from ++ =selection.to
297
+	.selection/from PEK2 .selection/to PEK2 LTH2 RTN?
298
+	.selection/from PEK2 ++ .selection/to POK2
294 299
 
295 300
 RTN
296 301
 
297 302
 @goto-linestart ( -- )
298 303
 
299
-	$loop
300
-		~selection.from -- PEK2 #0a EQU RTN?
301
-		~selection.from -- PEK2 #0d EQU RTN?
302
-		( decr ) ~selection.from DUP2 =selection.to -- =selection.from
303
-	~selection.from PEK2 #00 NEQ ^$loop JNZ
304
+	&loop
305
+		.selection/from PEK2 -- GET #0a EQU RTN?
306
+		.selection/from PEK2 -- GET #0d EQU RTN?
307
+		( decr ) .selection/from PEK2 DUP2 .selection/to POK2 -- .selection/from POK2
308
+	.selection/from PEK2 GET #00 NEQ ,&loop JNZ
304 309
 	( clamp at document body )
305
-	~selection.from ,document.body GTH2 RTN?
306
-	,document.body DUP2 =selection.from ++ =selection.to
310
+	.selection/from PEK2 ;document/body GTH2 RTN?
311
+	;document/body DUP2 .selection/from POK2 ++ .selection/to POK2
307 312
 
308 313
 RTN
309 314
 
310 315
 @goto-lineend ( -- )
311 316
 	
312
-	$loop
313
-		~selection.from PEK2 #0a EQU RTN?
314
-		~selection.from PEK2 #0d EQU RTN?
315
-		( incr ) ~selection.from ++ DUP2 ++ =selection.to =selection.from
316
-		~selection.from PEK2 #00 NEQ ^$loop JNZ
317
+	&loop
318
+		.selection/from PEK2 GET #0a EQU RTN?
319
+		.selection/from PEK2 GET #0d EQU RTN?
320
+		( incr ) .selection/from PEK2 ++ DUP2 ++ .selection/to POK2 .selection/from POK2
321
+		.selection/from PEK2 GET #00 NEQ ,&loop JNZ
317 322
 	( clamp at document body )
318
-	~selection.from ,document.eof LTH2 RTN?
319
-	,document.eof -- DUP2 =selection.from ++ =selection.to
323
+	.selection/from PEK2 ;document/eof LTH2 RTN?
324
+	;document/eof -- DUP2 .selection/from POK2 ++ .selection/to POK2
320 325
 
321 326
 RTN
322 327
 
323 328
 @find-wordstart ( -- )
324 329
 
325
-	~selection.to =j
326
-	$loop
327
-		( decr ) ~j -- =j
328
-		~j PEK2 #20 EQU ^$end JNZ
329
-		~j PEK2 #0a EQU ^$end JNZ
330
-		~j PEK2 #0d EQU ^$end JNZ
331
-		~j ,document.body GTH2 ^$loop JNZ
332
-	$end 
333
-	( return ) ~j --
330
+	.selection/to PEK2 .j POK2
331
+	&loop
332
+		( decr ) .j PEK2 -- .j POK2
333
+		.j PEK2 GET #20 EQU ,&end JNZ
334
+		.j PEK2 GET #0a EQU ,&end JNZ
335
+		.j PEK2 GET #0d EQU ,&end JNZ
336
+		.j PEK2 ;document/body GTH2 ,&loop JNZ
337
+	&end
338
+	( return ) .j PEK2 --
334 339
 
335 340
 RTN
336 341
 
337 342
 @find-wordend ( -- )
338 343
 	
339
-	~selection.to =j
340
-	$loop
341
-		( incr ) ~j ++ =j
342
-		~j PEK2 #20 EQU ^$end JNZ
343
-		~j PEK2 #0a EQU ^$end JNZ
344
-		~j PEK2 #0d EQU ^$end JNZ
345
-		~j ,document.body GTH2 ^$loop JNZ
346
-	$end 
347
-	( return ) ~j ++
344
+	.selection/to PEK2 .j POK2
345
+	&loop
346
+		( incr ) .j PEK2 ++ .j POK2
347
+		.j PEK2 GET #20 EQU ,&end JNZ
348
+		.j PEK2 GET #0a EQU ,&end JNZ
349
+		.j PEK2 GET #0d EQU ,&end JNZ
350
+		.j PEK2 ;document/body GTH2 ,&loop JNZ
351
+	&end
352
+	( return ) .j PEK2 ++
348 353
 
349 354
 RTN
350 355
 
351 356
 @find-lineoffset ( return character offset from linestart )
352 357
 
353
-	#0000 =j
354
-	$loop
355
-		( incr ) ~j ++ =j
356
-		~selection.from ~j SUB2 PEK2 #0a EQU ^$end JNZ
357
-		~selection.from ~j SUB2 PEK2 #0d EQU ^$end JNZ
358
-		~selection.from ~j SUB2 ,document.body GTH2 ^$loop JNZ
359
-	$end 
360
-	( return ) ~j
358
+	#0000 .j POK2
359
+	&loop
360
+		( incr ) .j PEK2 ++ .j POK2
361
+		.selection/from PEK2 .j PEK2 SUB2 GET #0a EQU ,&end JNZ
362
+		.selection/from PEK2 .j PEK2 SUB2 GET #0d EQU ,&end JNZ
363
+		.selection/from PEK2 .j PEK2 SUB2 ;document/body GTH2 ,&loop JNZ
364
+	&end
365
+	( return ) .j PEK2
361 366
 
362 367
 RTN
363 368
 
364 369
 @find-line ( position -> addr )
365 370
 
366
-	,document.body =j #0000 =pt.y
367
-	$loop
368
-		~pt.y ~position.y -- GTH2 ^$end JNZ
369
-		~j PEK2 #0a NEQ ~j PEK2 #0d NEQ #0101 EQU2 ^$no-space JNZ
370
-			( incr ) ~pt.y ++ =pt.y
371
-		$no-space
372
-		( incr ) ~j ++ =j
373
-	~j PEK2 #00 NEQ ^$loop JNZ
374
-	$end
375
-	( return ) ~j
371
+	;document/body .j POK2 #0000 .pt/y POK2
372
+	&loop
373
+		.pt/y PEK2 .position/y PEK2 -- GTH2 ,&end JNZ
374
+		.j PEK2 GET #0a NEQ .j PEK2 GET #0d NEQ #0101 EQU2 ,&no-space JNZ
375
+			( incr ) .pt/y PEK2 ++ .pt/y POK2
376
+		&no-space
377
+		( incr ) .j PEK2 ++ .j POK2
378
+	.j PEK2 GET #00 NEQ ,&loop JNZ
379
+	&end
380
+	( return ) .j PEK2
376 381
 
377 382
 RTN
378 383
 
379 384
 @find-selection ( position -> addr )
380 385
 
381
-	,find-line JSR2 ( find line )
382
-	#0000 =pt.x
383
-	$loop
384
-		~j ~pt.x ADD2 PEK2 #0a EQU ^$end JNZ
385
-		~j ~pt.x ADD2 PEK2 #0d EQU ^$end JNZ
386
-		( incr ) ~pt.x ++ =pt.x
387
-		~pt.x ~position.x -- LTH2 ^$loop JNZ
388
-	$end
389
-	( return ) ~pt.x ADD2
386
+	;find-line JSR2 ( find line )
387
+	#0000 .pt/x POK2
388
+	&loop
389
+		.j PEK2 .pt/x PEK2 ADD2 GET #0a EQU ,&end JNZ
390
+		.j PEK2 .pt/x PEK2 ADD2 GET #0d EQU ,&end JNZ
391
+		( incr ) .pt/x PEK2 ++ .pt/x POK2
392
+		.pt/x PEK2 .position/x PEK2 -- LTH2 ,&loop JNZ
393
+	&end
394
+	( return ) .pt/x PEK2 ADD2
390 395
 
391 396
 RTN
392 397
 
393 398
 @cut ( -- )
394 399
 
395
-	,copy JSR2
396
-	~selection.to ~selection.from SUB2 ,shift-left JSR2
397
-	~selection.from ++ =selection.to
400
+	;copy JSR2
401
+	.selection/to PEK2 .selection/from PEK2 SUB2 ;shift-left JSR2
402
+	.selection/from PEK2 ++ .selection/to POK2
398 403
 
399 404
 RTN
400 405
 
401 406
 @copy ( -- )
402 407
 	
403
-	#0000 =i ( start )
404
-	~selection.to ~selection.from SUB2 =j ( end )
405
-	~j =clip.len
406
-	$loop
407
-		~selection.from ~i ADD2 PEK2 ,clip.body ~i ADD2 POK2
408
-		( incr ) ~i ++ =i
409
-		~i ~j LTH2 ^$loop JNZ
408
+	#0000 .i POK2 ( start )
409
+	.selection/to PEK2 .selection/from PEK2 SUB2 .j POK2 ( end )
410
+	.j PEK2 ;clip/len PUT2
411
+	&loop
412
+		.selection/from PEK2 .i PEK2 ADD2 GET ;clip/body .i PEK2 ADD2 PUT
413
+		( incr ) .i PEK2 ++ .i POK2
414
+		.i PEK2 .j PEK2 LTH2 ,&loop JNZ
410 415
 
411 416
 RTN
412 417
 
413 418
 @paste ( -- )
414 419
 	
415
-	~clip.len ,shift-right JSR2
416
-	#0000 =i ( start )
417
-	~clip.len =j ( end )
418
-	$loop
419
-		,clip.body ~i ADD2 PEK2 ~selection.from ~i ADD2 POK2
420
-		( incr ) ~i ++ =i
421
-		~i ~j LTH2 ^$loop JNZ
420
+	;clip/len GET2 ;shift-right JSR2
421
+	#0000 .i POK2 ( start )
422
+	;clip/len GET2 .j POK2 ( end )
423
+	&loop
424
+		;clip/body .i PEK2 ADD2 GET .selection/from PEK2 .i PEK2 ADD2 PUT
425
+		( incr ) .i PEK2 ++ .i POK2
426
+		.i PEK2 .j PEK2 LTH2 ,&loop JNZ
422 427
 
423 428
 RTN
424 429
 
425 430
 @select ( position -> selection )
426 431
 	
427
-	,document.body =selection.from #0000 =pt.x #0000 =pt.y
428
-	$loop
429
-		~selection.from PEK2 #0a NEQ ~selection.from PEK2 #0d NEQ #0101 EQU2 ^$no-space JNZ
430
-			( incr ) ~pt.y ++ =pt.y
431
-			#0000 =pt.x
432
-		$no-space
433
-		~pt.y ~position.y -- GTH2 ~pt.x ~position.x -- GTH2 #0101 NEQ2 ^$no-reached JNZ
434
-			~selection.from ++ =selection.to
432
+	;document/body .selection/from POK2 #0000 .pt/x POK2 #0000 .pt/y POK2
433
+	&loop
434
+		.selection/from PEK2 GET #0a NEQ .selection/from PEK2 GET #0d NEQ #0101 EQU2 ,&no-space JNZ
435
+			( incr ) .pt/y PEK2 ++ .pt/y POK2
436
+			#0000 .pt/x POK2
437
+		&no-space
438
+		.pt/y PEK2 .position/y PEK2 -- GTH2 .pt/x PEK2 .position/x PEK2 -- GTH2 #0101 NEQ2 ,&no-reached JNZ
439
+			.selection/from PEK2 ++ .selection/to POK2
435 440
 			RTN
436
-		$no-reached
437
-		( incr ) ~pt.x ++ =pt.x
438
-		( incr ) ~selection.from ++ =selection.from
439
-	~selection.from PEK2 #00 NEQ ^$loop JNZ
441
+		&no-reached
442
+		( incr ) .pt/x PEK2 ++ .pt/x POK2
443
+		( incr ) .selection/from PEK2 ++ .selection/from POK2
444
+	.selection/from PEK2 GET #00 NEQ ,&loop JNZ
440 445
 
441 446
 RTN
442 447
 
... ...
@@ -444,196 +449,196 @@ RTN
444 449
 
445 450
 @redraw
446 451
 
447
-	,draw-textarea JSR2
448
-	,draw-scrollbar JSR2
449
-	,draw-titlebar JSR2
452
+	;draw-textarea JSR2
453
+	;draw-scrollbar JSR2
454
+	;draw-titlebar JSR2
450 455
 
451 456
 	( save/load icons )
452
-	~Screen.height 8- =Screen.y
457
+	.Screen/height DEI2 8- .Screen/y DEO2
453 458
 
454
-	~Screen.width #0030 SUB2 =Screen.x
455
-	,eye_icn =Screen.addr
456
-	#22 =Screen.color
459
+	.Screen/width DEI2 #0030 SUB2 .Screen/x DEO2
460
+	;eye_icn .Screen/addr DEO2
461
+	#22 .Screen/color DEO
457 462
 
458
-	~Screen.width #0028 SUB2 =Screen.x
459
-	,name_icn =Screen.addr
460
-	#22 =Screen.color
463
+	.Screen/width DEI2 #0028 SUB2 .Screen/x DEO2
464
+	;name_icn .Screen/addr DEO2
465
+	#22 .Screen/color DEO
461 466
 
462
-	~Screen.width #0020 SUB2 =Screen.x
463
-	,load_icn =Screen.addr
464
-	#22 =Screen.color
467
+	.Screen/width DEI2 #0020 SUB2 .Screen/x DEO2
468
+	;load_icn .Screen/addr DEO2
469
+	#22 .Screen/color DEO
465 470
 
466
-	~Screen.width #0018 SUB2 =Screen.x
467
-	,save_icn =Screen.addr
468
-	#22 =Screen.color
471
+	.Screen/width DEI2 #0018 SUB2 .Screen/x DEO2
472
+	;save_icn .Screen/addr DEO2
473
+	#22 .Screen/color DEO
469 474
 
470 475
 RTN
471 476
 
472 477
 @draw-short ( short )
473 478
 
474
-	=addr
475
-	,font_hex #00 ,addr PEK2 #f0 AND #04 SFT #08 MUL ADD2 =Screen.addr
476
-	( draw ) #2e =Screen.color
477
-	~Screen.x 8+ =Screen.x
478
-	,font_hex #00 ,addr PEK2 #0f AND #08 MUL ADD2 =Screen.addr
479
-	( draw ) #2e =Screen.color
480
-	~Screen.x 8+ =Screen.x
481
-	,font_hex #00 ,addr ++ PEK2 #f0 AND #04 SFT #08 MUL ADD2 =Screen.addr
482
-	( draw ) #2e =Screen.color
483
-	~Screen.x 8+ =Screen.x
484
-	,font_hex #00 ,addr ++ PEK2 #0f AND #08 MUL ADD2 =Screen.addr
485
-	( draw ) #2e =Screen.color
479
+	.addr POK2
480
+	;font_hex #00 ;addr GET #f0 AND #04 SFT #08 MUL ADD2 .Screen/addr DEO2
481
+	( draw ) #2e .Screen/color DEO
482
+	.Screen/x DEI2 8+ .Screen/x DEO2
483
+	;font_hex #00 ;addr GET #0f AND #08 MUL ADD2 .Screen/addr DEO2
484
+	( draw ) #2e .Screen/color DEO
485
+	.Screen/x DEI2 8+ .Screen/x DEO2
486
+	;font_hex #00 ;addr ++ GET #f0 AND #04 SFT #08 MUL ADD2 .Screen/addr DEO2
487
+	( draw ) #2e .Screen/color DEO
488
+	.Screen/x DEI2 8+ .Screen/x DEO2
489
+	;font_hex #00 ;addr ++ GET #0f AND #08 MUL ADD2 .Screen/addr DEO2
490
+	( draw ) #2e .Screen/color DEO
486 491
 
487 492
 RTN
488 493
 
489 494
 @draw-cursor
490 495
 
491 496
 	( clear last cursor )
492
-	~mouse.x =Screen.x
493
-	~mouse.y =Screen.y
494
-	,blank_icn =Screen.addr
495
-	#30 =Screen.color
497
+	.mouse/x PEK2 .Screen/x DEO2
498
+	.mouse/y PEK2 .Screen/y DEO2
499
+	;blank_icn .Screen/addr DEO2
500
+	#30 .Screen/color DEO
496 501
 
497 502
 	( record mouse positions )
498
-	~Mouse.x =mouse.x 
499
-	~Mouse.y =mouse.y
503
+	.Mouse/x DEI2 .mouse/x POK2
504
+	.Mouse/y DEI2 .mouse/y POK2
500 505
 
501 506
 	( draw new cursor )
502
-	~mouse.x =Screen.x
503
-	~mouse.y =Screen.y
504
-	,cursor_icn =Screen.addr
505
-	#3f ~Mouse.state #01 EQU #0a MUL SUB =Screen.color
507
+	.mouse/x PEK2 .Screen/x DEO2
508
+	.mouse/y PEK2 .Screen/y DEO2
509
+	;cursor_icn .Screen/addr DEO2
510
+	#3f .Mouse/state DEI #01 EQU #0a MUL SUB .Screen/color DEO
506 511
 
507 512
 RTN
508 513
 
509 514
 @draw-textarea ( x y color addr )
510 515
 	
511
-	,document.body =textarea.addr
512
- 
516
+	;document/body .textarea/addr POK2
517
+
513 518
 	( scroll to position )
514
-	#0000 =j ( j is linebreaks )
515
-	$find-offset
516
-		~scroll.y ~j EQU2 ^$find-offset-end JNZ
517
-		~textarea.addr PEK2 #0a NEQ ~textarea.addr PEK2 #0d NEQ #0101 EQU2 ^$no-break JNZ
518
-			( incr ) ~j ++ =j $no-break
519
-		( incr ) ~textarea.addr ++ =textarea.addr
520
-	~textarea.addr PEK2 #00 NEQ ^$find-offset JNZ
521
-	$find-offset-end
519
+	#0000 .j POK2 ( j is linebreaks )
520
+	&find-offset
521
+		.scroll/y PEK2 .j PEK2 EQU2 ,&find-offset-end JNZ
522
+		.textarea/addr PEK2 GET #0a NEQ .textarea/addr PEK2 GET #0d NEQ #0101 EQU2 ,&no-break JNZ
523
+			( incr ) .j PEK2 ++ .j POK2 &no-break
524
+		( incr ) .textarea/addr PEK2 ++ .textarea/addr POK2
525
+	.textarea/addr PEK2 GET #00 NEQ ,&find-offset JNZ
526
+	&find-offset-end
522 527
 
523
-	#0018 =Screen.x #0000 =Screen.y
524
-	~textarea.addr =i
528
+	#0018 .Screen/x DEO2 #0000 .Screen/y DEO2
529
+	.textarea/addr PEK2 .i POK2
525 530
 
526
-	$loop
531
+	&loop
527 532
 
528
-		~Screen.y ~Screen.height #0010 SUB2 GTH2 ,$end JNZ2
533
+		.Screen/y DEI2 .Screen/height DEI2 #0010 SUB2 GTH2 ;&end JNZ2
529 534
 
530 535
 
531
-		~i PEK2 #0a NEQ ~i PEK2 #0d NEQ #0101 EQU2 ,$no-linebreak JNZ2
536
+		.i PEK2 GET #0a NEQ .i PEK2 GET #0d NEQ #0101 EQU2 ;&no-linebreak JNZ2
532 537
 			( draw linebreak )
533
-			,linebreak_icn =Screen.addr
538
+			;linebreak_icn .Screen/addr DEO2
534 539
 			( draw ) #02
535
-			~i ~selection.from -- GTH2 
536
-			~i ~selection.to LTH2 #0101 EQU2
537
-			#26 MUL ADD =Screen.color
540
+			.i PEK2 .selection/from PEK2 -- GTH2
541
+			.i PEK2 .selection/to PEK2 LTH2 #0101 EQU2
542
+			#26 MUL ADD .Screen/color DEO
538 543
 			( fill clear )
539
-			$fill-clear
540
-				( incr ) ~Screen.x 8+ =Screen.x
541
-				,font =Screen.addr
542
-				#21 =Screen.color
543
-				~Screen.x ~Screen.width 8- LTH2 ^$fill-clear JNZ
544
+			&fill-clear
545
+				( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
546
+				;font .Screen/addr DEO2
547
+				#21 .Screen/color DEO
548
+				.Screen/x DEI2 .Screen/width DEI2 8- LTH2 ,&fill-clear JNZ
544 549
 
545 550
 			( draw line number )
546
-			#0000 =Screen.x
547
-			~scroll.y ~Screen.y 8/ ADD2 DUP2 SWP POP =k 
548
-			~position.y EQU2 #05 MUL =l
549
-			,font_hex #00 ~k #f0 AND #04 SFT #08 MUL ADD2 =Screen.addr
550
-			#24 ~l ADD =Screen.color
551
-			#0008 =Screen.x
552
-			,font_hex #00 ~k #0f AND #08 MUL ADD2 =Screen.addr
553
-			#24 ~l ADD =Screen.color
551
+			#0000 .Screen/x DEO2
552
+			.scroll/y PEK2 .Screen/y DEI2 8/ ADD2 DUP2 SWP POP .k POK
553
+			.position/y PEK2 EQU2 #05 MUL .l POK
554
+			;font_hex #00 .k PEK #f0 AND #04 SFT #08 MUL ADD2 .Screen/addr DEO2
555
+			#24 .l PEK ADD .Screen/color DEO
556
+			#0008 .Screen/x DEO2
557
+			;font_hex #00 .k PEK #0f AND #08 MUL ADD2 .Screen/addr DEO2
558
+			#24 .l PEK ADD .Screen/color DEO
554 559
 
555
-			#0010 =Screen.x
556
-			( incr ) ~Screen.y 8+ =Screen.y
557
-		$no-linebreak
560
+			#0010 .Screen/x DEO2
561
+			( incr ) .Screen/y DEI2 8+ .Screen/y DEO2
562
+		&no-linebreak
558 563
 
559 564
 
560 565
 		( get character )
561
-		,font #00 ~i PEK2 #20 SUB 8* ADD2 =Screen.addr
566
+		;font #00 .i PEK2 GET #20 SUB 8* ADD2 .Screen/addr DEO2
562 567
 		( is a special character )
563
-		~i PEK2 #20 GTH ^$no-tab JNZ ,font =Screen.addr $no-tab
568
+		.i PEK2 GET #20 GTH ,&no-tab JNZ ;font .Screen/addr DEO2 &no-tab
564 569
 
565
-		( draw ) #21 
566
-		~i ~selection.from -- GTH2 
567
-		~i ~selection.to LTH2 #0101 EQU2
568
-		#05 MUL ADD =Screen.color
570
+		( draw ) #21
571
+		.i PEK2 .selection/from PEK2 -- GTH2
572
+		.i PEK2 .selection/to PEK2 LTH2 #0101 EQU2
573
+		#05 MUL ADD .Screen/color DEO
569 574
 
570
-		( incr ) ~i ++ =i
571
-		( incr ) ~Screen.x #0007 ADD2 =Screen.x
575
+		( incr ) .i PEK2 ++ .i POK2
576
+		( incr ) .Screen/x DEI2 #0007 ADD2 .Screen/x DEO2
572 577
 
573
-	~i PEK2 #00 NEQ ,$loop JNZ2
578
+	.i PEK2 GET #00 NEQ ;&loop JNZ2
574 579
 
575
-	$end
580
+	&end
576 581
 
577 582
 RTN
578 583
 
579 584
 @draw-scrollbar ( -- )
580 585
 	
581
-	,scrollbar_icn ( keeping a copy on stack )
586
+	;scrollbar_icn ( keeping a copy on stack )
582 587
 
583
-	~Screen.width 8- =Screen.x 
584
-	#0008 =Screen.y
585
-	DUP2 =Screen.addr
588
+	.Screen/width DEI2 8- .Screen/x DEO2
589
+	#0008 .Screen/y DEO2
590
+	DUP2 .Screen/addr DEO2
586 591
 
587
-	#0008 ~Screen.height 8-
588
-	$loop
589
-		( draw ) #21 =Screen.color
590
-		( incr ) SWP2 8+ DUP2 =Screen.y SWP2
591
-		OVR2 OVR2 LTH2 ^$loop JNZ
592
+	#0008 .Screen/height DEI2 8-
593
+	&loop
594
+		( draw ) #21 .Screen/color DEO
595
+		( incr ) SWP2 8+ DUP2 .Screen/y DEO2 SWP2
596
+		OVR2 OVR2 LTH2 ,&loop JNZ
592 597
 	POP2 POP2
593 598
 
594
-	~scroll.y 8+ =Screen.y
595
-	DUP2 #0008 ADD2 =Screen.addr
596
-	( draw ) #21 =Screen.color
599
+	.scroll/y PEK2 8+ .Screen/y DEO2
600
+	DUP2 #0008 ADD2 .Screen/addr DEO2
601
+	( draw ) #21 .Screen/color DEO
597 602
 
598
-	#0000 =Screen.y
599
-	DUP2 #0010 ADD2 =Screen.addr
600
-	( draw ) #24 =Screen.color
603
+	#0000 .Screen/y DEO2
604
+	DUP2 #0010 ADD2 .Screen/addr DEO2
605
+	( draw ) #24 .Screen/color DEO
601 606
 
602
-	~Screen.height 8- =Screen.y
603
-	#0018 ADD2 =Screen.addr
604
-	( draw ) #24 =Screen.color
607
+	.Screen/height DEI2 8- .Screen/y DEO2
608
+	#0018 ADD2 .Screen/addr DEO2
609
+	( draw ) #24 .Screen/color DEO
605 610
 
606 611
 RTN
607 612
 
608 613
 @draw-titlebar
609 614
 	
610
-	#0018 ~Screen.height 8- #29 ,filepath 
611
-	( load ) =label.addr =label.color =Screen.y =Screen.x 
612
-	~label.addr
613
-	$loop
614
-		( draw ) DUP2 PEK2 #00 SWP #20 SUB 8* ,font ADD2 =Screen.addr ~label.color =Screen.color
615
+	#0018 .Screen/height DEI2 8- #29 ;filepath
616
+	( load ) .label/addr POK2 .label/color POK .Screen/y DEO2 .Screen/x DEO2
617
+	.label/addr PEK2
618
+	&loop
619
+		( draw ) DUP2 GET #00 SWP #20 SUB 8* ;font ADD2 .Screen/addr DEO2 .label/color PEK .Screen/color DEO
615 620
 		( incr ) ++
616
-		( incr ) ~Screen.x 8+ =Screen.x
617
-		DUP2 PEK2 #00 NEQ ^$loop JNZ
621
+		( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
622
+		DUP2 GET #00 NEQ ,&loop JNZ
618 623
 	POP2
619 624
 	( selection )
620
-	~selection.from ,document.body SUB2 ,draw-short JSR2
625
+	.selection/from PEK2 ;document/body SUB2 ;draw-short JSR2
621 626
 
622 627
 RTN
623 628
 
624
-@font_hex ( 0-F TODO: should pull from @font instead.. ) 
629
+@font_hex ( 0-F TODO: should pull from @font instead.. )
625 630
 [
626 631
 	003c 464a 5262 3c00 0018 0808 0808 1c00
627 632
 	003c 4202 3c40 7e00 003c 421c 0242 3c00
628 633
 	000c 1424 447e 0400 007e 407c 0242 3c00
629 634
 	003c 407c 4242 3c00 007e 0204 0810 1000
630 635
 	003c 423c 4242 3c00 003c 4242 3e02 3c00
631
-	003c 4242 7e42 4200 007c 427c 4242 7c00 
632
-	003c 4240 4042 3c00 007c 4242 4242 7c00 
636
+	003c 4242 7e42 4200 007c 427c 4242 7c00
637
+	003c 4240 4042 3c00 007c 4242 4242 7c00
633 638
 	007e 4078 4040 7e00 007e 4078 4040 4000
634 639
 ]
635 640
 
636
-@font ( specter8-frag font ) 
641
+@font ( specter8-frag font )
637 642
 [
638 643
 	0000 0000 0000 0000 0008 0808 0800 0800
639 644
 	0014 1400 0000 0000 0024 7e24 247e 2400
... ...
@@ -696,17 +701,18 @@ RTN
696 701
 	[ 0010 387c fe10 1010 ] ( up )
697 702
 	[ 0010 1010 fe7c 3810 ] ( down )
698 703
 
699
-@name_icn       [ 1054 28c6 2854 1000 ]
700
-@load_icn       [ feaa d6aa d4aa f400 ]
701
-@save_icn       [ fe82 8282 848a f400 ]
704
+@name_icn      [ 1054 28c6 2854 1000 ]
705
+@load_icn      [ feaa d6aa d4aa f400 ]
706
+@save_icn      [ fe82 8282 848a f400 ]
702 707
 
703 708
 @linebreak_icn [ 003e 7474 3414 1400 ]
704 709
 
705 710
 @blank_icn     [ 0000 0000 0000 0000 ]
706 711
 @cursor_icn    [ 80c0 e0f0 f8e0 1000 ]
707 712
 
708
-@filepath1     [ projects/examples/gui.hover.usm 00 ]
709
-@filepath      [ projects/examples/dev.time.usm 00 ]
713
+@filepath1 [ "projects/examples/gui.hover.usm 00 ]
714
+@filepath [ "README.md 00 ]
715
+
716
+@clip [ &len $2 &body $100 ]
717
+@document [ &eof $2 &body $0 ]
710 718
 
711
-;clip { len 2 body 256 }
712
-;document { eof 2 body 2 }
713 719
\ No newline at end of file
... ...
@@ -1,4 +1,4 @@
1
-( 
1
+(
2 2
 	app/nasu : spritesheet editor
3 3
 
4 4
 	arrows - move selection
... ...
@@ -12,7 +12,8 @@
12 12
 		Select paint color for 2-bit mode
13 13
 )
14 14
 
15
-%RTN   { JMP2r }
15
+
16
+%RTN { JMP2r }
16 17
 %STEP8 { #0033 SFT2 }
17 18
 
18 19
 %++ { #0001 ADD2 } %-- { #0001 SUB2 }
... ...
@@ -23,87 +24,89 @@
23 24
 %MOD { DUP2 DIV MUL SUB }
24 25
 
25 26
 %SIZE-TO-RECT {
26
-	STH2 STH2 OVR2 STH2r ADD2 OVR2 STH2r ADD2 
27
+	STH2 STH2 OVR2 STH2r ADD2 OVR2 STH2r ADD2
27 28
 } ( x y w h -- x1 y1 x2 y2 )
28 29
 
29 30
 %SET-RECT {
30
-	DUP2 ROT2 SWP2 #0006 ADD2 STR2
31
-	DUP2 ROT2 SWP2 #0004 ADD2 STR2
32
-	DUP2 ROT2 SWP2 #0002 ADD2 STR2
33
-	DUP2 ROT2 SWP2 STR2
31
+	DUP2 ROT2 SWP2 #0006 ADD2 PUT2
32
+	DUP2 ROT2 SWP2 #0004 ADD2 PUT2
33
+	DUP2 ROT2 SWP2 #0002 ADD2 PUT2
34
+	DUP2 ROT2 SWP2 PUT2
34 35
 	POP2
35 36
 } ( x1 y1 x2 y2 addr -- )
36 37
 
37 38
 %BANK { #2000 }
38 39
 
40
+( devices )
41
+
42
+|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
43
+|10 @Console [ &vector $2 &pad $6 &char $1 &byte $1 &short $2 &string $2 ]
44
+|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
45
+|40 @Controller [ &vector $2 &button $1 &key $1 ]
46
+|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
47
+|70 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
48
+
39 49
 ( variables )
40 50
 
41
-;settings { blending 1 depth 1 brush 1 page 2 }
42
-
43
-;frame { x1 2 y1 2 x2 2 y2 2 width 2 height 2 }
44
-;bankview { x 2 y 2 mode 1 selection 1 }
45
-;tileview { x 2 y 2 addr 2 }
46
-;colorview { x1 2 y1 2 x2 2 y2 2 }
47
-;blendview { x1 2 y1 2 x2 2 y2 2 }
48
-;dataview { x1 2 y1 2 x2 2 y2 2 }
49
-;rect { x1 2 y1 2 x2 2 y2 2 }
50
-;mouse { x 2 y 2 }
51
-;color { byte 1 }
52
-;i { byte 1 }
53
-;pt { x 1 y 1 }
54
-;addr { short 2 }
55
-;pos { x 2 y 2 }
51
+|0000
56 52
 
57
-( devices )
53
+@settings [ &blending $1 &depth $1 &brush $1 &page $2 ]
58 54
 
59
-|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
60
-|0110 ;Console { vector 2 pad 6 char 1 byte 1 short 2 string 2 }
61
-|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 addr 2 color 1 }
62
-|0140 ;Controller { vector 2 button 1 key 1 }
63
-|0160 ;Mouse  { vector 2 x 2 y 2 state 1 chord 1 }
64
-|0170 ;File { vector 2 success 2 offset 2 pad 2 name 2 length 2 load 2 save 2 }
55
+@frame [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 &width $2 &height $2 ]
56
+@bankview [ &x $2 &y $2 &mode $1 &selection $1 ]
57
+@tileview [ &x $2 &y $2 &addr $2 ]
58
+@colorview [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
59
+@blendview [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
60
+@dataview [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
61
+@rect [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
62
+@mouse [ &x $2 &y $2 ]
63
+@color [ &byte $1 ]
64
+@i [ &byte $1 ]
65
+@pt [ &x $1 &y $1 ]
66
+@addr [ &short $2 ]
67
+@pos [ &x $2 &y $2 ]
65 68
 
66 69
 ( program )
67 70
 
68
-|0200
71
+|0100
69 72
 
70
-	( theme ) #0efc =System.r #03cc =System.g #03ac =System.b
71
-	( vectors ) ,on-button =Controller.vector
72
-	( vectors ) ,on-mouse =Mouse.vector
73
-	( vectors ) ,on-transfer =File.vector
73
+	( theme ) #0efc .System/r DEO2 #03cc .System/g DEO2 #03ac .System/b DEO2
74
+	( vectors ) ;on-button .Controller/vector DEO2
75
+	( vectors ) ;on-mouse .Mouse/vector DEO2
76
+	( vectors ) ;on-transfer .File/vector DEO2
74 77
 
75 78
 	( set frame )
76
-	#0130 =frame.width
77
-	#00a8 =frame.height
78
-	#01 =settings.brush
79
+	#0130 .frame/width POK2
80
+	#00a8 .frame/height POK2
81
+	#01 .settings/brush POK
79 82
 
80
-	~Screen.width 2/ ~frame.width 2/ SUB2 
81
-	~Screen.height 2/ ~frame.height 2/ SUB2 #0010 ADD2
82
-	~frame.width ~frame.height
83
-	SIZE-TO-RECT ,frame SET-RECT
83
+	.Screen/width DEI2 2/ .frame/width PEK2 2/ SUB2
84
+	.Screen/height DEI2 2/ .frame/height PEK2 2/ SUB2 #0010 ADD2
85
+	.frame/width PEK2 .frame/height PEK2
86
+	SIZE-TO-RECT ;frame SET-RECT
84 87
 
85
-	~frame.x1 #0010 ADD2 =bankview.x 
86
-	~frame.y1 =bankview.y 
87
-	BANK =settings.page
88
+	.frame/x1 PEK2 #0010 ADD2 .bankview/x POK2
89
+	.frame/y1 PEK2 .bankview/y POK2
90
+	BANK .settings/page POK2
88 91
 
89
-	~frame.x2 #0098 SUB2 =tileview.x 
90
-	~frame.y1 =tileview.y 
91
-	BANK #0448 ADD2 =tileview.addr
92
+	.frame/x2 PEK2 #0098 SUB2 .tileview/x POK2
93
+	.frame/y1 PEK2 .tileview/y POK2
94
+	BANK #0448 ADD2 .tileview/addr POK2
92 95
 
93
-	~frame.x1 #0010 ADD2 ~frame.y2 #0020 SUB2 #0020 #0020 SIZE-TO-RECT ,blendview SET-RECT
94
-	~frame.x1 #0038 ADD2 ~frame.y2 #0020 SUB2 #0020 #0020 SIZE-TO-RECT ,colorview SET-RECT
95
-	~frame.x2 #0010 SUB2 ~frame.y1 #0010 #0080 SIZE-TO-RECT ,dataview SET-RECT
96
+	.frame/x1 PEK2 #0010 ADD2 .frame/y2 PEK2 #0020 SUB2 #0020 #0020 SIZE-TO-RECT ;blendview SET-RECT
97
+	.frame/x1 PEK2 #0038 ADD2 .frame/y2 PEK2 #0020 SUB2 #0020 #0020 SIZE-TO-RECT ;colorview SET-RECT
98
+	.frame/x2 PEK2 #0010 SUB2 .frame/y1 PEK2 #0010 #0080 SIZE-TO-RECT ;dataview SET-RECT
96 99
 
97
-	#01 =settings.blending
100
+	#01 .settings/blending POK
98 101
 
99
-	,filepath1 =File.name #0800 =File.length BANK =File.load
100
-	,filepath2 =File.name #0800 =File.length BANK #0800 ADD2 =File.load
101
-	,filepath3 =File.name #1000 =File.length BANK #1000 ADD2 =File.load
102
-	,filepath4 =File.name #1000 =File.length BANK #2000 ADD2 =File.load
103
-	,filepath5 =File.name #1000 =File.length BANK #2800 ADD2 =File.load
104
-	,filepath6 =File.name #1000 =File.length BANK #3800 ADD2 =File.load
102
+	;filepath1 .File/name DEO2 #0800 .File/length DEO2 BANK .File/load DEO2
103
+	;filepath2 .File/name DEO2 #0800 .File/length DEO2 BANK #0800 ADD2 .File/load DEO2
104
+	;filepath3 .File/name DEO2 #1000 .File/length DEO2 BANK #1000 ADD2 .File/load DEO2
105
+	;filepath4 .File/name DEO2 #1000 .File/length DEO2 BANK #2000 ADD2 .File/load DEO2
106
+	;filepath5 .File/name DEO2 #1000 .File/length DEO2 BANK #2800 ADD2 .File/load DEO2
107
+	;filepath6 .File/name DEO2 #1000 .File/length DEO2 BANK #3800 ADD2 .File/load DEO2
105 108
 
106
-	#40 DUP =bankview.selection ,select-tile JSR2
109
+	#40 DUP .bankview/selection POK ;select-tile JSR2
107 110
 
108 111
 	( ~frame.x1 ~frame.y1 ~frame.x2 ~frame.y2 #01 ,line-rect JSR2 )
109 112
 
... ...
@@ -111,221 +114,221 @@ BRK
111 114
 
112 115
 @on-transfer ( -> )
113 116
 	
114
-	,redraw JSR2
117
+	;redraw JSR2
115 118
 	
116 119
 BRK
117 120
 
118 121
 @on-button ( -> )
119 122
 	
120 123
 	( arrow button )
121
-	~Controller.button #00 EQU ,$no-button JNZ2
122
-		~Controller.button #11 NEQ ^$no-pageup JNZ ~settings.page 
123
-			#0800 SUB2 =settings.page ,redraw JSR2 BRK $no-pageup
124
-		~Controller.button #21 NEQ ^$no-pagedown JNZ ~settings.page 
125
-			#0800 ADD2 =settings.page ,redraw JSR2 BRK $no-pagedown
126
-		~Controller.button #f0 AND
127
-		DUP #04 SFT #01 AND #01 NEQ ^$no-up JNZ 
128
-			( move ) ~bankview.selection #10 SUB =bankview.selection $no-up
129
-		DUP #05 SFT #01 AND #01 NEQ ^$no-down JNZ 
130
-			( move ) ~bankview.selection #10 ADD =bankview.selection $no-down
131
-		DUP #06 SFT #01 AND #01 NEQ ^$no-left JNZ 
132
-			( move ) ~bankview.selection #01 SUB =bankview.selection $no-left
133
-		DUP #07 SFT #01 AND #01 NEQ ^$no-right JNZ 
134
-			( move ) ~bankview.selection #01 ADD =bankview.selection $no-right
124
+	.Controller/button DEI #00 EQU ;&no-button JNZ2
125
+		.Controller/button DEI #11 NEQ ,&no-pageup JNZ .settings/page PEK2
126
+			#0800 SUB2 .settings/page POK2 ;redraw JSR2 BRK &no-pageup
127
+		.Controller/button DEI #21 NEQ ,&no-pagedown JNZ .settings/page PEK2
128
+			#0800 ADD2 .settings/page POK2 ;redraw JSR2 BRK &no-pagedown
129
+		.Controller/button DEI #f0 AND
130
+		DUP #04 SFT #01 AND #01 NEQ ,&no-up JNZ
131
+			( move ) .bankview/selection PEK #10 SUB .bankview/selection POK &no-up
132
+		DUP #05 SFT #01 AND #01 NEQ ,&no-down JNZ
133
+			( move ) .bankview/selection PEK #10 ADD .bankview/selection POK &no-down
134
+		DUP #06 SFT #01 AND #01 NEQ ,&no-left JNZ
135
+			( move ) .bankview/selection PEK #01 SUB .bankview/selection POK &no-left
136
+		DUP #07 SFT #01 AND #01 NEQ ,&no-right JNZ
137
+			( move ) .bankview/selection PEK #01 ADD .bankview/selection POK &no-right
135 138
 		POP
136
-		~bankview.selection ,select-tile JSR2
137
-	$no-button
138
-
139
-	~Controller.key #00 EQU ^$no-key JNZ
140
-		~Controller.key #31 LTH ^$no-number JNZ
141
-		~Controller.key #33 GTH ^$no-number JNZ
142
-		( select ) ~Controller.key #31 SUB =bankview.mode
143
-			,redraw JSR2
144
-		$no-number
145
-		~Controller.key #20 NEQ ^$no-space JNZ
146
-			,toggle-depth JSR2
147
-			,redraw JSR2
148
-		$no-space
149
-	$no-key
139
+		.bankview/selection PEK ;select-tile JSR2
140
+	&no-button
141
+
142
+	.Controller/key DEI #00 EQU ,&no-key JNZ
143
+		.Controller/key DEI #31 LTH ,&no-number JNZ
144
+		.Controller/key DEI #33 GTH ,&no-number JNZ
145
+		( select ) .Controller/key DEI #31 SUB .bankview/mode POK
146
+			;redraw JSR2
147
+		&no-number
148
+		.Controller/key DEI #20 NEQ ,&no-space JNZ
149
+			;toggle-depth JSR2
150
+			;redraw JSR2
151
+		&no-space
152
+	&no-key
150 153
 
151 154
 BRK
152 155
 
153 156
 @on-mouse ( -> )
154 157
 	
155
-	,draw-cursor JSR2
158
+	;draw-cursor JSR2
156 159
 
157
-	~Mouse.state #00 NEQ ^$no-touch JNZ BRK $no-touch
160
+	.Mouse/state DEI #00 NEQ ,&no-touch JNZ BRK &no-touch
158 161
 
159 162
 	( toolbar )
160
-	~Mouse.y ~bankview.y #0010 SUB2 SUB2 8/ #0000 NEQ2 ,$no-toolbar-click JNZ2
163
+	.Mouse/y DEI2 .bankview/y PEK2 #0010 SUB2 SUB2 8/ #0000 NEQ2 ;&no-toolbar-click JNZ2
161 164
 		( brush )
162
-		~Mouse.x ~bankview.x SUB2 8/ #000d LTH2 ^$no-brush-click JNZ
163
-		~Mouse.x ~bankview.x SUB2 8/ #000f GTH2 ^$no-brush-click JNZ
164
-			( select ) ~mouse.x ~bankview.x SUB2 8/ #000d SUB2 SWP POP =bankview.mode
165
-		$no-brush-click
166
-		~Mouse.x ~bankview.x SUB2 8/ #0005 NEQ2 ^$no-toggle-depth JNZ
167
-			,toggle-depth JSR2
168
-		$no-toggle-depth
169
-			( release ) #00 =Mouse.state
170
-			,redraw JSR2 BRK
171
-	$no-toolbar-click
165
+		.Mouse/x DEI2 .bankview/x PEK2 SUB2 8/ #000d LTH2 ,&no-brush-click JNZ
166
+		.Mouse/x DEI2 .bankview/x PEK2 SUB2 8/ #000f GTH2 ,&no-brush-click JNZ
167
+			( select ) .mouse/x PEK2 .bankview/x PEK2 SUB2 8/ #000d SUB2 SWP POP .bankview/mode POK
168
+		&no-brush-click
169
+		.Mouse/x DEI2 .bankview/x PEK2 SUB2 8/ #0005 NEQ2 ,&no-toggle-depth JNZ
170
+			;toggle-depth JSR2
171
+		&no-toggle-depth
172
+			( release ) #00 .Mouse/state DEO
173
+			;redraw JSR2 BRK
174
+	&no-toolbar-click
172 175
 
173 176
 	( bankview )
174
-	~Mouse.x ~bankview.x GTH2 ~Mouse.x ~bankview.x #0080 ADD2 LTH2 #0101 EQU2
175
-	~Mouse.y ~bankview.y GTH2 ~Mouse.y ~bankview.y #0080 ADD2 LTH2 #0101 EQU2
176
-	#0101 EQU2 ,on-touch-bankview JNZ2
177
+	.Mouse/x DEI2 .bankview/x PEK2 GTH2 .Mouse/x DEI2 .bankview/x PEK2 #0080 ADD2 LTH2 #0101 EQU2
178
+	.Mouse/y DEI2 .bankview/y PEK2 GTH2 .Mouse/y DEI2 .bankview/y PEK2 #0080 ADD2 LTH2 #0101 EQU2
179
+	#0101 EQU2 ;on-touch-bankview JNZ2
177 180
 
178 181
 	( tileview )
179
-	~Mouse.x ~tileview.x GTH2 ~Mouse.x ~tileview.x #0080 ADD2 LTH2 #0101 EQU2
180
-	~Mouse.y ~tileview.y GTH2 ~Mouse.y ~tileview.y #0080 ADD2 LTH2 #0101 EQU2
181
-	#0101 EQU2 ,on-touch-tileview JNZ2
182
+	.Mouse/x DEI2 .tileview/x PEK2 GTH2 .Mouse/x DEI2 .tileview/x PEK2 #0080 ADD2 LTH2 #0101 EQU2
183
+	.Mouse/y DEI2 .tileview/y PEK2 GTH2 .Mouse/y DEI2 .tileview/y PEK2 #0080 ADD2 LTH2 #0101 EQU2
184
+	#0101 EQU2 ;on-touch-tileview JNZ2
182 185
 
183 186
 	( dataview )
184
-	~Mouse.x DUP2 ~dataview.x1 GTH2 ROT ROT ~dataview.x2 LTH2 #0101 EQU2
185
-	~Mouse.y DUP2 ~dataview.y1 GTH2 ROT ROT ~dataview.y2 LTH2 #0101 EQU2
186
-	#0101 EQU2 ,on-touch-dataview JNZ2
187
+	.Mouse/x DEI2 DUP2 .dataview/x1 PEK2 GTH2 ROT ROT .dataview/x2 PEK2 LTH2 #0101 EQU2
188
+	.Mouse/y DEI2 DUP2 .dataview/y1 PEK2 GTH2 ROT ROT .dataview/y2 PEK2 LTH2 #0101 EQU2
189
+	#0101 EQU2 ;on-touch-dataview JNZ2
187 190
 
188 191
 	( blendbiew )
189
-	~Mouse.x DUP2 ~blendview.x1 GTH2 ROT ROT ~blendview.x2 LTH2 #0101 EQU2
190
-	~Mouse.y DUP2 ~blendview.y1 GTH2 ROT ROT ~blendview.y2 LTH2 #0101 EQU2
191
-	#0101 EQU2 ,on-touch-blendview JNZ2
192
+	.Mouse/x DEI2 DUP2 .blendview/x1 PEK2 GTH2 ROT ROT .blendview/x2 PEK2 LTH2 #0101 EQU2
193
+	.Mouse/y DEI2 DUP2 .blendview/y1 PEK2 GTH2 ROT ROT .blendview/y2 PEK2 LTH2 #0101 EQU2
194
+	#0101 EQU2 ;on-touch-blendview JNZ2
192 195
 
193 196
 	( colorview )
194
-	~Mouse.x DUP2 ~colorview.x1 GTH2 ROT ROT ~colorview.x2 LTH2 #0101 EQU2
195
-	~Mouse.y DUP2 ~colorview.y1 GTH2 ROT ROT ~colorview.y2 LTH2 #0101 EQU2
196
-	#0101 EQU2 ,on-touch-colorview JNZ2
197
+	.Mouse/x DEI2 DUP2 .colorview/x1 PEK2 GTH2 ROT ROT .colorview/x2 PEK2 LTH2 #0101 EQU2
198
+	.Mouse/y DEI2 DUP2 .colorview/y1 PEK2 GTH2 ROT ROT .colorview/y2 PEK2 LTH2 #0101 EQU2
199
+	#0101 EQU2 ;on-touch-colorview JNZ2
197 200
 
198 201
 BRK
199 202
 
200 203
 @on-touch-bankview ( -> )
201 204
 	
202
-	~bankview.mode #01 NEQ ^$not-copy-mode JNZ
203
-		#00 =i
204
-		$copy-loop
205
-			( load ) ~tileview.addr ~i ADD PEK2 
205
+	.bankview/mode PEK #01 NEQ ,&not-copy-mode JNZ
206
+		#00 .i POK
207
+		&copy-loop
208
+			( load ) .tileview/addr PEK2 .i PEK ADD GET
206 209
 			( get touch addr )
207
-			~Mouse.x ~bankview.x SUB2 STEP8 
208
-			~Mouse.y ~bankview.y SUB2 STEP8 #0010 MUL2 ADD2
209
-			( 2-bit mode ) #00 ~settings.depth #01 ADD MUL2 
210
-			~settings.page ADD2 #00 ~i ADD2 POK2
211
-			( incr ) ~i #01 ADD =i
212
-			~i #08 LTH ^$copy-loop JNZ
213
-		,redraw JSR2 BRK
214
-	$not-copy-mode
215
-
216
-	~bankview.mode #02 NEQ ^$not-erase-mode JNZ
217
-		#00 =i
218
-		$erase-loop
219
-			#00 
210
+			.Mouse/x DEI2 .bankview/x PEK2 SUB2 STEP8
211
+			.Mouse/y DEI2 .bankview/y PEK2 SUB2 STEP8 #0010 MUL2 ADD2
212
+			( 2-bit mode ) #00 .settings/depth PEK #01 ADD MUL2
213
+			.settings/page PEK2 ADD2 #00 .i PEK ADD2 PUT
214
+			( incr ) .i PEK #01 ADD .i POK
215
+			.i PEK #08 LTH ,&copy-loop JNZ
216
+		;redraw JSR2 BRK
217
+	&not-copy-mode
218
+
219
+	.bankview/mode PEK #02 NEQ ,&not-erase-mode JNZ
220
+		#00 .i POK
221
+		&erase-loop
222
+			#00
220 223
 			( get touch addr )
221
-			~Mouse.x ~bankview.x SUB2 STEP8 
222
-			~Mouse.y ~bankview.y SUB2 STEP8 #0010 MUL2 ADD2
223
-			( 2-bit mode ) #00 ~settings.depth #01 ADD MUL2 
224
-			~settings.page ADD2 #00 ~i ADD2 POK2
225
-			( incr ) ~i #01 ADD =i
226
-			~i #08 LTH ^$erase-loop JNZ
227
-		,redraw JSR2 BRK
228
-	$not-erase-mode
224
+			.Mouse/x DEI2 .bankview/x PEK2 SUB2 STEP8
225
+			.Mouse/y DEI2 .bankview/y PEK2 SUB2 STEP8 #0010 MUL2 ADD2
226
+			( 2-bit mode ) #00 .settings/depth PEK #01 ADD MUL2
227
+			.settings/page PEK2 ADD2 #00 .i PEK ADD2 PUT
228
+			( incr ) .i PEK #01 ADD .i POK
229
+			.i PEK #08 LTH ,&erase-loop JNZ
230
+		;redraw JSR2 BRK
231
+	&not-erase-mode
229 232
 
230 233
 	( select )
231 234
 
232
-	~Mouse.x ~bankview.x SUB2 8/ SWP POP
233
-	~Mouse.y ~bankview.y SUB2 8/ SWP POP #40 SFT ADD
234
-	DUP =bankview.selection
235
-	,select-tile JSR2
235
+	.Mouse/x DEI2 .bankview/x PEK2 SUB2 8/ SWP POP
236
+	.Mouse/y DEI2 .bankview/y PEK2 SUB2 8/ SWP POP #40 SFT ADD
237
+	DUP .bankview/selection POK
238
+	;select-tile JSR2
236 239
 
237 240
 BRK
238 241
 
239 242
 @on-touch-tileview ( -> )
240 243
 	
241
-	~Mouse.x ~tileview.x SUB2 STEP8 #0040 DIV2 
242
-	~Mouse.y ~tileview.y SUB2 STEP8 #0040 DIV2 2* ADD2 
244
+	.Mouse/x DEI2 .tileview/x PEK2 SUB2 STEP8 #0040 DIV2
245
+	.Mouse/y DEI2 .tileview/y PEK2 SUB2 STEP8 #0040 DIV2 2* ADD2
243 246
 	8*
244
-	~tileview.addr ADD2 =addr ( addr offset )
245
-	~Mouse.x ~tileview.x SUB2 ~Mouse.x ~tileview.x SUB2 #0040 DIV2 #0040 MUL2 SUB2 =pos.x
246
-	~Mouse.y ~tileview.y SUB2 ~Mouse.y ~tileview.y SUB2 #0040 DIV2 #0040 MUL2 SUB2 =pos.y
247
-	~Mouse.state #10 NEQ ^$no-erase-mode JNZ
248
-		( load ) ~addr ~pos.y 8/ ADD2 PEK2
249
-		( mask ) #01 #07 ~pos.x 8/ SWP POP SUB SFL 
247
+	.tileview/addr PEK2 ADD2 .addr POK2 ( addr offset )
248
+	.Mouse/x DEI2 .tileview/x PEK2 SUB2 .Mouse/x DEI2 .tileview/x PEK2 SUB2 #0040 DIV2 #0040 MUL2 SUB2 .pos/x POK2
249
+	.Mouse/y DEI2 .tileview/y PEK2 SUB2 .Mouse/y DEI2 .tileview/y PEK2 SUB2 #0040 DIV2 #0040 MUL2 SUB2 .pos/y POK2
250
+	.Mouse/state DEI #10 NEQ ,&no-erase-mode JNZ
251
+		( load ) .addr PEK2 .pos/y PEK2 8/ ADD2 GET
252
+		( mask ) #01 #07 .pos/x PEK2 8/ SWP POP SUB SFL
250 253
 		#ff EOR AND
251
-		( save ) ~addr ~pos.y 8/ ADD2 POK2
252
-		,redraw JSR2 BRK
253
-	$no-erase-mode
254
-	( load ) ~addr ~pos.y 8/ ADD2 PEK2
255
-	( mask ) #01 #07 ~pos.x 8/ SWP POP SUB SFL 
254
+		( save ) .addr PEK2 .pos/y PEK2 8/ ADD2 PUT
255
+		;redraw JSR2 BRK
256
+	&no-erase-mode
257
+	( load ) .addr PEK2 .pos/y PEK2 8/ ADD2 GET
258
+	( mask ) #01 #07 .pos/x PEK2 8/ SWP POP SUB SFL
256 259
 	ORA
257
-	( save ) ~addr ~pos.y 8/ ADD2 POK2
258
-	,redraw JSR2 
260
+	( save ) .addr PEK2 .pos/y PEK2 8/ ADD2 PUT
261
+	;redraw JSR2
259 262
 
260 263
 BRK
261 264
 
262 265
 @on-touch-dataview ( -> )
263 266
 
264
-	~Mouse.y ~dataview.y1 SUB2 STEP8 SWP POP #60 EQU ^$skip JNZ BRK $skip
265
-	~Mouse.x ~dataview.x1 SUB2 #0008 DIV2 SWP POP
266
-	DUP #00 NEQ ^$no-move-up JNZ
267
-		,op_shiftup JSR2 
268
-		( release ) #00 =Mouse.state
269
-		,redraw JSR2 POP BRK $no-move-up
270
-	DUP #01 NEQ ^$no-move-down JNZ
271
-		,op_shiftdown JSR2 
272
-		( release ) #00 =Mouse.state
273
-		,redraw JSR2 POP BRK $no-move-down
267
+	.Mouse/y DEI2 .dataview/y1 PEK2 SUB2 STEP8 SWP POP #60 EQU ,&skip JNZ BRK &skip
268
+	.Mouse/x DEI2 .dataview/x1 PEK2 SUB2 #0008 DIV2 SWP POP
269
+	DUP #00 NEQ ,&no-move-up JNZ
270
+		;op_shiftup JSR2
271
+		( release ) #00 .Mouse/state DEO
272
+		;redraw JSR2 POP BRK &no-move-up
273
+	DUP #01 NEQ ,&no-move-down JNZ
274
+		;op_shiftdown JSR2
275
+		( release ) #00 .Mouse/state DEO
276
+		;redraw JSR2 POP BRK &no-move-down
274 277
 	POP
275 278
 
276 279
 BRK
277 280
 
278 281
 @on-touch-blendview ( -> )
279 282
 
280
-	~Mouse.x ~blendview.x1 SUB2 8/ SWP POP
281
-	~Mouse.y ~blendview.y1 SUB2 8/ SWP POP #04 MUL ADD
282
-	=settings.blending
283
-	( release ) #00 =Mouse.state
284
-	,redraw JSR2
283
+	.Mouse/x DEI2 .blendview/x1 PEK2 SUB2 8/ SWP POP
284
+	.Mouse/y DEI2 .blendview/y1 PEK2 SUB2 8/ SWP POP #04 MUL ADD
285
+	.settings/blending POK
286
+	( release ) #00 .Mouse/state DEO
287
+	;redraw JSR2
285 288
 
286
-BRK 
289
+BRK
287 290
 
288 291
 @on-touch-colorview ( -> )
289 292
 	
290
-	( channel ) ~Mouse.y ~colorview.y1 SUB2 8/ SWP POP STH
291
-	( rgb ) ~Mouse.x ~colorview.x1 SUB2 8/ SWP POP
292
-	DUP #00 NEQ ^$no-brush JNZ
293
-		DUPr STHr =settings.brush $no-brush
294
-	DUP #01 NEQ ^$no-red JNZ
295
-		DUPr STHr ,System.r ,set-color JSR2 $no-red
296
-	DUP #02 NEQ ^$no-green JNZ 
297
-		DUPr STHr ,System.g ,set-color JSR2 $no-green
298
-	DUP #03 NEQ ^$no-blue JNZ 
299
-		DUPr STHr ,System.b ,set-color JSR2 $no-blue
293
+	( channel ) .Mouse/y DEI2 .colorview/y1 PEK2 SUB2 8/ SWP POP STH
294
+	( rgb ) .Mouse/x DEI2 .colorview/x1 PEK2 SUB2 8/ SWP POP
295
+	DUP #00 NEQ ,&no-brush JNZ
296
+		DUPr STHr .settings/brush POK &no-brush
297
+	DUP #01 NEQ ,&no-red JNZ
298
+		DUPr STHr ;System/r ;set-color JSR2 &no-red
299
+	DUP #02 NEQ ,&no-green JNZ
300
+		DUPr STHr ;System/g ;set-color JSR2 &no-green
301
+	DUP #03 NEQ ,&no-blue JNZ
302
+		DUPr STHr ;System/b ;set-color JSR2 &no-blue
300 303
 	POP POPr
301
-	( release ) #00 =Mouse.state
302
-	,redraw JSR2
304
+	( release ) #00 .Mouse/state DEO
305
+	;redraw JSR2
303 306
 
304 307
 BRK
305 308
 
306 309
 @set-color ( color rgb -- )
307 310
 	
308 311
 	STH2
309
-	DUP #00 NEQ ^$no-red0 JNZ
310
-		DUP2r STH2r PEK2 DUP #04 SFT #01 ADD 
311
-		( add/sub ) ~Mouse.state #10 EQU #fe MUL ADD 
312
-		( resume ) #40 SFT SWP #0f AND ADD DUP2r STH2r POK2
313
-		$no-red0
314
-	DUP #01 NEQ ^$no-red1 JNZ
315
-		DUP2r STH2r PEK2 DUP #0f AND #01 ADD 
316
-		( add/sub ) ~Mouse.state #10 EQU #fe MUL ADD 
317
-		( resume ) #0f AND SWP #f0 AND ADD DUP2r STH2r POK2
318
-		$no-red1
319
-	DUP #02 NEQ ^$no-red2 JNZ
320
-		DUP2r STH2r #0001 ADD2 PEK2 DUP #04 SFT #01 ADD 
321
-		( add/sub ) ~Mouse.state #10 EQU #fe MUL ADD 
322
-		( resume ) #40 SFT SWP #0f AND ADD DUP2r STH2r #0001 ADD2 POK2
323
-		$no-red2
324
-	DUP #03 NEQ ^$no-red3 JNZ
325
-		DUP2r STH2r #0001 ADD2 PEK2 DUP #0f AND #01 ADD 
326
-		( add/sub ) ~Mouse.state #10 EQU #fe MUL ADD 
327
-		( resume ) #0f AND SWP #f0 AND ADD DUP2r STH2r #0001 ADD2 POK2
328
-		$no-red3
312
+	DUP #00 NEQ ,&no-red0 JNZ
313
+		DUP2r STH2r GET DUP #04 SFT #01 ADD
314
+		( add/sub ) .Mouse/state DEI #10 EQU #fe MUL ADD
315
+		( resume ) #40 SFT SWP #0f AND ADD DUP2r STH2r PUT
316
+		&no-red0
317
+	DUP #01 NEQ ,&no-red1 JNZ
318
+		DUP2r STH2r GET DUP #0f AND #01 ADD
319
+		( add/sub ) .Mouse/state DEI #10 EQU #fe MUL ADD
320
+		( resume ) #0f AND SWP #f0 AND ADD DUP2r STH2r PUT
321
+		&no-red1
322
+	DUP #02 NEQ ,&no-red2 JNZ
323
+		DUP2r STH2r #0001 ADD2 GET DUP #04 SFT #01 ADD
324
+		( add/sub ) .Mouse/state DEI #10 EQU #fe MUL ADD
325
+		( resume ) #40 SFT SWP #0f AND ADD DUP2r STH2r #0001 ADD2 PUT
326
+		&no-red2
327
+	DUP #03 NEQ ,&no-red3 JNZ
328
+		DUP2r STH2r #0001 ADD2 GET DUP #0f AND #01 ADD
329
+		( add/sub ) .Mouse/state DEI #10 EQU #fe MUL ADD
330
+		( resume ) #0f AND SWP #f0 AND ADD DUP2r STH2r #0001 ADD2 PUT
331
+		&no-red3
329 332
 	POP
330 333
 	POP2r
331 334
 
... ...
@@ -334,230 +337,230 @@ RTN
334 337
 @select-tile ( pos -- )
335 338
 
336 339
 	( x y ) DUP #0f AND SWP #04 SFT
337
-	( y ) #10 MOD #10 MUL #00 SWP 8* 
338
-	( x ) ROT #10 MOD #00 SWP 8* ADD2 
339
-	( 2-bit mode ) #00 ~settings.depth #01 ADD MUL2 
340
-	( offset ) ~settings.page ADD2 =tileview.addr
341
-	,redraw JSR2
340
+	( y ) #10 MOD #10 MUL #00 SWP 8*
341
+	( x ) ROT #10 MOD #00 SWP 8* ADD2
342
+	( 2-bit mode ) #00 .settings/depth PEK #01 ADD MUL2
343
+	( offset ) .settings/page PEK2 ADD2 .tileview/addr POK2
344
+	;redraw JSR2
342 345
 
343 346
 RTN
344 347
 
345 348
 @toggle-depth ( -- )
346 349
 	
347
-	~bankview.selection
348
-	~settings.depth #00 EQU =settings.depth
349
-	,select-tile JSR2
350
+	.bankview/selection PEK
351
+	.settings/depth PEK #00 EQU .settings/depth POK
352
+	;select-tile JSR2
350 353
 
351 354
 RTN
352 355
 
353 356
 @op_shiftup
354 357
 	
355
-	~tileview.addr PEK2
356
-	~tileview.addr #0001 ADD2 PEK2 ~tileview.addr POK2
357
-	~tileview.addr #0002 ADD2 PEK2 ~tileview.addr #0001 ADD2 POK2
358
-	~tileview.addr #0003 ADD2 PEK2 ~tileview.addr #0002 ADD2 POK2
359
-	~tileview.addr #0004 ADD2 PEK2 ~tileview.addr #0003 ADD2 POK2
360
-	~tileview.addr #0005 ADD2 PEK2 ~tileview.addr #0004 ADD2 POK2
361
-	~tileview.addr #0006 ADD2 PEK2 ~tileview.addr #0005 ADD2 POK2
362
-	~tileview.addr #0007 ADD2 PEK2 ~tileview.addr #0006 ADD2 POK2
363
-	~tileview.addr #0007 ADD2 POK2
358
+	.tileview/addr PEK2 GET
359
+	.tileview/addr PEK2 #0001 ADD2 GET .tileview/addr PEK2 PUT
360
+	.tileview/addr PEK2 #0002 ADD2 GET .tileview/addr PEK2 #0001 ADD2 PUT
361
+	.tileview/addr PEK2 #0003 ADD2 GET .tileview/addr PEK2 #0002 ADD2 PUT
362
+	.tileview/addr PEK2 #0004 ADD2 GET .tileview/addr PEK2 #0003 ADD2 PUT
363
+	.tileview/addr PEK2 #0005 ADD2 GET .tileview/addr PEK2 #0004 ADD2 PUT
364
+	.tileview/addr PEK2 #0006 ADD2 GET .tileview/addr PEK2 #0005 ADD2 PUT
365
+	.tileview/addr PEK2 #0007 ADD2 GET .tileview/addr PEK2 #0006 ADD2 PUT
366
+	.tileview/addr PEK2 #0007 ADD2 PUT
364 367
 
365 368
 RTN
366 369
 
367 370
 @op_shiftdown
368 371
 	
369
-	~tileview.addr #0007 ADD2 PEK2
370
-	~tileview.addr #0006 ADD2 PEK2 ~tileview.addr #0007 ADD2 POK2
371
-	~tileview.addr #0005 ADD2 PEK2 ~tileview.addr #0006 ADD2 POK2
372
-	~tileview.addr #0004 ADD2 PEK2 ~tileview.addr #0005 ADD2 POK2
373
-	~tileview.addr #0003 ADD2 PEK2 ~tileview.addr #0004 ADD2 POK2
374
-	~tileview.addr #0002 ADD2 PEK2 ~tileview.addr #0003 ADD2 POK2
375
-	~tileview.addr #0001 ADD2 PEK2 ~tileview.addr #0002 ADD2 POK2
376
-	~tileview.addr PEK2 ~tileview.addr #0001 ADD2 POK2
377
-	~tileview.addr POK2
372
+	.tileview/addr PEK2 #0007 ADD2 GET
373
+	.tileview/addr PEK2 #0006 ADD2 GET .tileview/addr PEK2 #0007 ADD2 PUT
374
+	.tileview/addr PEK2 #0005 ADD2 GET .tileview/addr PEK2 #0006 ADD2 PUT
375
+	.tileview/addr PEK2 #0004 ADD2 GET .tileview/addr PEK2 #0005 ADD2 PUT
376
+	.tileview/addr PEK2 #0003 ADD2 GET .tileview/addr PEK2 #0004 ADD2 PUT
377
+	.tileview/addr PEK2 #0002 ADD2 GET .tileview/addr PEK2 #0003 ADD2 PUT
378
+	.tileview/addr PEK2 #0001 ADD2 GET .tileview/addr PEK2 #0002 ADD2 PUT
379
+	.tileview/addr PEK2 GET .tileview/addr PEK2 #0001 ADD2 PUT
380
+	.tileview/addr PEK2 PUT
378 381
 
379 382
 RTN
380 383
 
381 384
 @redraw
382 385
 	
383
-	,draw-bankview JSR2
384
-	,draw-tileview JSR2
385
-	,draw-blendview JSR2
386
-	,draw-colorview JSR2
387
-	,draw-dataview JSR2
386
+	;draw-bankview JSR2
387
+	;draw-tileview JSR2
388
+	;draw-blendview JSR2
389
+	;draw-colorview JSR2
390
+	;draw-dataview JSR2
388 391
 
389 392
 RTN
390 393
 
391 394
 @draw-bankview
392 395
 	
393
-	~bankview.x #0002 SUB2 ~bankview.y #0002 SUB2 ~bankview.x #0081 ADD2 ~bankview.y #0081 ADD2 #03 ,line-rect JSR2
396
+	.bankview/x PEK2 #0002 SUB2 .bankview/y PEK2 #0002 SUB2 .bankview/x PEK2 #0081 ADD2 .bankview/y PEK2 #0081 ADD2 #03 ;line-rect JSR2
394 397
 
395 398
 	( position )
396 399
 
397
-	~bankview.x =Screen.x
398
-	~bankview.y #0010 SUB2 =Screen.y
399
-	~settings.page ,draw-short JSR2
400
+	.bankview/x PEK2 .Screen/x DEO2
401
+	.bankview/y PEK2 #0010 SUB2 .Screen/y DEO2
402
+	.settings/page PEK2 ;draw-short JSR2
400 403
 
401 404
 	( toolbar )
402 405
 
403
-	~bankview.y #0010 SUB2 =Screen.y
406
+	.bankview/y PEK2 #0010 SUB2 .Screen/y DEO2
404 407
 
405
-	~bankview.x #0028 ADD2 =Screen.x
406
-	,depth_icns #00 ~settings.depth 8* ADD2 =Screen.addr
407
-	#23 =Screen.color
408
+	.bankview/x PEK2 #0028 ADD2 .Screen/x DEO2
409
+	;depth_icns #00 .settings/depth PEK 8* ADD2 .Screen/addr DEO2
410
+	#23 .Screen/color DEO
408 411
 
409
-	~bankview.x #0068 ADD2 =Screen.x
410
-	,tool_selector =Screen.addr
411
-	#21 ~bankview.mode #00 EQU ADD =Screen.color
412
+	.bankview/x PEK2 #0068 ADD2 .Screen/x DEO2
413
+	;tool_selector .Screen/addr DEO2
414
+	#21 .bankview/mode PEK #00 EQU ADD .Screen/color DEO
412 415
 
413
-	~Screen.x 8+ =Screen.x
414
-	,tool_hand =Screen.addr
415
-	#21 ~bankview.mode #01 EQU ADD =Screen.color
416
+	.Screen/x DEI2 8+ .Screen/x DEO2
417
+	;tool_hand .Screen/addr DEO2
418
+	#21 .bankview/mode PEK #01 EQU ADD .Screen/color DEO
416 419
 
417
-	~Screen.x 8+ =Screen.x
418
-	,tool_eraser =Screen.addr
419
-	#21 ~bankview.mode #02 EQU ADD =Screen.color
420
+	.Screen/x DEI2 8+ .Screen/x DEO2
421
+	;tool_eraser .Screen/addr DEO2
422
+	#21 .bankview/mode PEK #02 EQU ADD .Screen/color DEO
420 423
 
421 424
 	( guides )
422 425
 
423
-	~bankview.x #0010 SUB2 =Screen.x
424
-	~bankview.y =Screen.y
425
-	,font_hex =Screen.addr
426
+	.bankview/x PEK2 #0010 SUB2 .Screen/x DEO2
427
+	.bankview/y PEK2 .Screen/y DEO2
428
+	;font_hex .Screen/addr DEO2
426 429
 	#00 #10
427
-	$guides
428
-		( draw ) OVR ~bankview.selection #04 SFT EQU #22 ADD =Screen.color 
429
-		~Screen.addr 8+ =Screen.addr
430
-		~Screen.y 8+ =Screen.y
430
+	&guides
431
+		( draw ) OVR .bankview/selection PEK #04 SFT EQU #22 ADD .Screen/color DEO
432
+		.Screen/addr DEI2 8+ .Screen/addr DEO2
433
+		.Screen/y DEI2 8+ .Screen/y DEO2
431 434
 		SWP #01 ADD SWP
432
-		DUP2 LTH ^$guides JNZ
435
+		DUP2 LTH ,&guides JNZ
433 436
 	POP2
434 437
 
435 438
 	( draw page )
436 439
 
437
-	( load ) ~settings.page =Screen.addr
438
-	~bankview.y DUP2 #0080 ADD2
439
-	$ver
440
-		( save ) OVR2 =Screen.y
441
-		~bankview.x DUP2 #0080 ADD2
442
-		$hor 
443
-			( save ) OVR2 =Screen.x
444
-			( get selected ) ~Screen.addr ~tileview.addr EQU2
445
-			( get blending ) ~settings.blending
446
-			( get depth ) ~settings.depth #20 MUL
447
-			( draw ) #20 ADD ADD ADD =Screen.color
440
+	( load ) .settings/page PEK2 .Screen/addr DEO2
441
+	.bankview/y PEK2 DUP2 #0080 ADD2
442
+	&ver
443
+		( save ) OVR2 .Screen/y DEO2
444
+		.bankview/x PEK2 DUP2 #0080 ADD2
445
+		&hor
446
+			( save ) OVR2 .Screen/x DEO2
447
+			( get selected ) .Screen/addr DEI2 .tileview/addr PEK2 EQU2
448
+			( get blending ) .settings/blending PEK
449
+			( get depth ) .settings/depth PEK #20 MUL
450
+			( draw ) #20 ADD ADD ADD .Screen/color DEO
448 451
 			( incr ) SWP2 8+ SWP2
449
-			( incr ) ~Screen.addr 8+ #00 ~settings.depth #0008 MUL2 ADD2 =Screen.addr
450
-			OVR2 OVR2 LTH2 ^$hor JNZ
452
+			( incr ) .Screen/addr DEI2 8+ #00 .settings/depth PEK #0008 MUL2 ADD2 .Screen/addr DEO2
453
+			OVR2 OVR2 LTH2 ,&hor JNZ
451 454
 		POP2 POP2
452 455
 		( incr ) SWP2 8+ SWP2
453
-		OVR2 OVR2 LTH2 ^$ver JNZ
456
+		OVR2 OVR2 LTH2 ,&ver JNZ
454 457
 	POP2 POP2
455 458
 
456 459
 RTN
457 460
 
458 461
 @draw-tileview
459 462
 
460
-	~tileview.x #0002 SUB2 ~tileview.y #0002 SUB2 ~tileview.x #0080 ADD2 ~tileview.y #0081 ADD2 #03 ,line-rect JSR2
463
+	.tileview/x PEK2 #0002 SUB2 .tileview/y PEK2 #0002 SUB2 .tileview/x PEK2 #0080 ADD2 .tileview/y PEK2 #0081 ADD2 #03 ;line-rect JSR2
461 464
 
462
-	~tileview.x #0028 ADD2 =Screen.x
463
-	~tileview.y #0010 SUB2 =Screen.y
464
-	~tileview.addr =Screen.addr
465
+	.tileview/x PEK2 #0028 ADD2 .Screen/x DEO2
466
+	.tileview/y PEK2 #0010 SUB2 .Screen/y DEO2
467
+	.tileview/addr PEK2 .Screen/addr DEO2
465 468
 
466
-	( get blending ) ~settings.blending
467
-	( get depth ) ~settings.depth #20 MUL
468
-	( draw ) #20 ADD ADD =Screen.color
469
+	( get blending ) .settings/blending PEK
470
+	( get depth ) .settings/depth PEK #20 MUL
471
+	( draw ) #20 ADD ADD .Screen/color DEO
469 472
 
470 473
 	( position )
471 474
 
472
-	~tileview.x =Screen.x
473
-	~tileview.y #0010 SUB2 =Screen.y
474
-	~tileview.addr ,draw-short JSR2
475
+	.tileview/x PEK2 .Screen/x DEO2
476
+	.tileview/y PEK2 #0010 SUB2 .Screen/y DEO2
477
+	.tileview/addr PEK2 ;draw-short JSR2
475 478
 
476 479
 	( body )
477 480
 
478
-	~tileview.x =Screen.x
479
-	~tileview.y =Screen.y
480
-	~tileview.addr =tileview.addr
481
-	,draw-tileview-icn JSR2
481
+	.tileview/x PEK2 .Screen/x DEO2
482
+	.tileview/y PEK2 .Screen/y DEO2
483
+	.tileview/addr PEK2 .tileview/addr POK2
484
+	;draw-tileview-icn JSR2
482 485
 
483
-	~tileview.x #0040 ADD2 =Screen.x
484
-	~tileview.y =Screen.y
485
-	~tileview.addr 8+ =tileview.addr
486
-	,draw-tileview-icn JSR2
486
+	.tileview/x PEK2 #0040 ADD2 .Screen/x DEO2
487
+	.tileview/y PEK2 .Screen/y DEO2
488
+	.tileview/addr PEK2 8+ .tileview/addr POK2
489
+	;draw-tileview-icn JSR2
487 490
 
488
-	~tileview.x =Screen.x
489
-	~tileview.y #0040 ADD2 =Screen.y
490
-	~tileview.addr 8+ =tileview.addr
491
-	,draw-tileview-icn JSR2
491
+	.tileview/x PEK2 .Screen/x DEO2
492
+	.tileview/y PEK2 #0040 ADD2 .Screen/y DEO2
493
+	.tileview/addr PEK2 8+ .tileview/addr POK2
494
+	;draw-tileview-icn JSR2
492 495
 
493
-	~tileview.x #0040 ADD2 =Screen.x
494
-	~tileview.y #0040 ADD2 =Screen.y
495
-	~tileview.addr 8+ =tileview.addr
496
-	,draw-tileview-icn JSR2
496
+	.tileview/x PEK2 #0040 ADD2 .Screen/x DEO2
497
+	.tileview/y PEK2 #0040 ADD2 .Screen/y DEO2
498
+	.tileview/addr PEK2 8+ .tileview/addr POK2
499
+	;draw-tileview-icn JSR2
497 500
 
498 501
 	( line hor )
499
-	~tileview.y #003f ADD2 =Screen.y
500
-	~tileview.x =Screen.x
501
-	$line-hor
502
-		( draw ) #03 =Screen.color
503
-		( incr ) ~Screen.x #0002 ADD2 =Screen.x
504
-	~Screen.x ~tileview.x #0082 ADD2 LTH2 ^$line-hor JNZ
502
+	.tileview/y PEK2 #003f ADD2 .Screen/y DEO2
503
+	.tileview/x PEK2 .Screen/x DEO2
504
+	&line-hor
505
+		( draw ) #03 .Screen/color DEO
506
+		( incr ) .Screen/x DEI2 #0002 ADD2 .Screen/x DEO2
507
+	.Screen/x DEI2 .tileview/x PEK2 #0082 ADD2 LTH2 ,&line-hor JNZ
505 508
 
506 509
 	( line ver )
507
-	~tileview.y =Screen.y
508
-	~tileview.x #003f ADD2 =Screen.x
509
-	$line-ver
510
-		( draw ) #03 =Screen.color
511
-		( incr ) ~Screen.y #0002 ADD2 =Screen.y
512
-	~Screen.y ~tileview.y #0081 ADD2 LTH2 ^$line-ver JNZ
510
+	.tileview/y PEK2 .Screen/y DEO2
511
+	.tileview/x PEK2 #003f ADD2 .Screen/x DEO2
512
+	&line-ver
513
+		( draw ) #03 .Screen/color DEO
514
+		( incr ) .Screen/y DEI2 #0002 ADD2 .Screen/y DEO2
515
+	.Screen/y DEI2 .tileview/y PEK2 #0081 ADD2 LTH2 ,&line-ver JNZ
513 516
 
514
-	( rewind ) ~tileview.addr #0018 SUB2 =tileview.addr
517
+	( rewind ) .tileview/addr PEK2 #0018 SUB2 .tileview/addr POK2
515 518
 
516 519
 RTN
517 520
 
518 521
 @draw-tileview-icn
519 522
 
520
-	#00 =pt.x #00 =pt.y 
521
-	$ver
522
-		#00 =pt.x
523
-		$hor
523
+	#00 .pt/x POK #00 .pt/y POK
524
+	&ver
525
+		#00 .pt/x POK
526
+		&hor
524 527
 			( get bit )
525
-			,blank_icn #00
526
-			~tileview.addr #00 ~pt.y ADD2 PEK2 #07 ~pt.x SUB SFT #01 AND ( get bit )
527
-			8* ADD2 =Screen.addr ( add *8 )
528
-			( draw ) #21 =Screen.color
529
-			( incr ) ~Screen.x 8+ =Screen.x
530
-			( incr ) ~pt.x #01 ADD =pt.x
531
-			~pt.x #08 LTH ,$hor JNZ2
532
-		( incr ) ~Screen.y 8+ =Screen.y
533
-		( incr ) ~pt.y #01 ADD =pt.y
534
-		~Screen.x #0040 SUB2 =Screen.x
535
-		~pt.y #08 LTH ,$ver JNZ2
528
+			;blank_icn #00
529
+			.tileview/addr PEK2 #00 .pt/y PEK ADD2 GET #07 .pt/x PEK SUB SFT #01 AND ( get bit )
530
+			8* ADD2 .Screen/addr DEO2 ( add *8 )
531
+			( draw ) #21 .Screen/color DEO
532
+			( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
533
+			( incr ) .pt/x PEK #01 ADD .pt/x POK
534
+			.pt/x PEK #08 LTH ;&hor JNZ2
535
+		( incr ) .Screen/y DEI2 8+ .Screen/y DEO2
536
+		( incr ) .pt/y PEK #01 ADD .pt/y POK
537
+		.Screen/x DEI2 #0040 SUB2 .Screen/x DEO2
538
+		.pt/y PEK #08 LTH ;&ver JNZ2
536 539
 
537 540
 RTN
538 541
 
539 542
 @draw-blendview ( -- )
540 543
 	
541
-	~blendview.x1 #0002 SUB2 ~blendview.y1 #0002 SUB2 ~blendview.x2 #0001 ADD2 ~blendview.y2 #0001 ADD2 #03 ,line-rect JSR2
544
+	.blendview/x1 PEK2 #0002 SUB2 .blendview/y1 PEK2 #0002 SUB2 .blendview/x2 PEK2 #0001 ADD2 .blendview/y2 PEK2 #0001 ADD2 #03 ;line-rect JSR2
542 545
 
543
-	~tileview.addr =Screen.addr
546
+	.tileview/addr PEK2 .Screen/addr DEO2
544 547
 	#00 #10
545
-	$loop
546
-		OVR #04 MOD #00 SWP #0008 MUL2 ~blendview.x1 ADD2 =Screen.x
547
-		OVR #04 DIV #00 SWP #0008 MUL2 ~blendview.y1 ADD2 =Screen.y
548
-		#20 =Screen.color
549
-		OVR #20 ADD ~settings.depth #20 MUL ADD =Screen.color
548
+	&loop
549
+		OVR #04 MOD #00 SWP #0008 MUL2 .blendview/x1 PEK2 ADD2 .Screen/x DEO2
550
+		OVR #04 DIV #00 SWP #0008 MUL2 .blendview/y1 PEK2 ADD2 .Screen/y DEO2
551
+		#20 .Screen/color DEO
552
+		OVR #20 ADD .settings/depth PEK #20 MUL ADD .Screen/color DEO
550 553
 		SWP #01 ADD SWP
551
-		DUP2 LTH ^$loop JNZ
554
+		DUP2 LTH ,&loop JNZ
552 555
 	POP2
553 556
 
554
-	~blendview.x1 #0002 SUB2 ~blendview.y2 #0001 ADD2 ~blendview.x1 #000e ADD2 ~blendview.y2 #0009 ADD2 #03 ,line-rect JSR2
555
-	~blendview.x1 #0001 SUB2 =Screen.x
556
-	~blendview.y2 #0001 ADD2 =Screen.y
557
+	.blendview/x1 PEK2 #0002 SUB2 .blendview/y2 PEK2 #0001 ADD2 .blendview/x1 PEK2 #000e ADD2 .blendview/y2 PEK2 #0009 ADD2 #03 ;line-rect JSR2
558
+	.blendview/x1 PEK2 #0001 SUB2 .Screen/x DEO2
559
+	.blendview/y2 PEK2 #0001 ADD2 .Screen/y DEO2
557 560
 
558
-	( get blending ) ~settings.blending
559
-	( get depth ) ~settings.depth #20 MUL
560
-	( draw ) #20 ADD ADD #2c ,draw-byte JSR2
561
+	( get blending ) .settings/blending PEK
562
+	( get depth ) .settings/depth PEK #20 MUL
563
+	( draw ) #20 ADD ADD #2c ;draw-byte JSR2
561 564
 
562 565
 RTN
563 566
 
... ...
@@ -565,130 +568,130 @@ RTN
565 568
 
566 569
 	( bytes )
567 570
 
568
-	~tileview.y #0018 ADD2 =Screen.y
569
-	#00 =i
570
-	$bytes
571
-		~tileview.x #0088 ADD2 =Screen.x
572
-		~tileview.addr #00 ~i ADD2 PEK2 #22 ,draw-byte JSR2
573
-		( incr ) ~i #01 ADD =i
574
-		( incr ) ~Screen.y 8+ =Screen.y
575
-	~i #08 LTH ,$bytes JNZ2
571
+	.tileview/y PEK2 #0018 ADD2 .Screen/y DEO2
572
+	#00 .i POK
573
+	&bytes
574
+		.tileview/x PEK2 #0088 ADD2 .Screen/x DEO2
575
+		.tileview/addr PEK2 #00 .i PEK ADD2 GET #22 ;draw-byte JSR2
576
+		( incr ) .i PEK #01 ADD .i POK
577
+		( incr ) .Screen/y DEI2 8+ .Screen/y DEO2
578
+	.i PEK #08 LTH ;&bytes JNZ2
576 579
 
577 580
 	( operations )
578 581
 
579
-	~Screen.y 8+ =Screen.y
580
-	,movedown_icn =Screen.addr
581
-	#21 =Screen.color
582
-	~Screen.x 8- =Screen.x
583
-	,moveup_icn =Screen.addr
584
-	#21 =Screen.color
582
+	.Screen/y DEI2 8+ .Screen/y DEO2
583
+	;movedown_icn .Screen/addr DEO2
584
+	#21 .Screen/color DEO
585
+	.Screen/x DEI2 8- .Screen/x DEO2
586
+	;moveup_icn .Screen/addr DEO2
587
+	#21 .Screen/color DEO
585 588
 
586 589
 	( draw tiles 2x2 )
587
-	~tileview.y =Screen.y
588
-	#00 =pt.x #00 =pt.y ~tileview.addr =Screen.addr
589
-
590
-	$tiles-ver
591
-		#00 =pt.x
592
-		~tileview.x #0088 ADD2 =Screen.x
593
-		$tiles-hor
594
-			( draw ) #23 =Screen.color
595
-			( incr ) ~Screen.x 8+ =Screen.x
596
-			( incr ) ~Screen.addr 8+ =Screen.addr
597
-			( incr ) ~pt.x #01 ADD =pt.x
598
-			~pt.x #02 LTH ,$tiles-hor JNZ2
599
-		( incr ) ~pt.y #01 ADD =pt.y
600
-		( incr ) ~Screen.y 8+ =Screen.y
601
-		~pt.y #02 LTH ,$tiles-ver JNZ2
590
+	.tileview/y PEK2 .Screen/y DEO2
591
+	#00 .pt/x POK #00 .pt/y POK .tileview/addr PEK2 .Screen/addr DEO2
592
+
593
+	&tiles-ver
594
+		#00 .pt/x POK
595
+		.tileview/x PEK2 #0088 ADD2 .Screen/x DEO2
596
+		&tiles-hor
597
+			( draw ) #23 .Screen/color DEO
598
+			( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
599
+			( incr ) .Screen/addr DEI2 8+ .Screen/addr DEO2
600
+			( incr ) .pt/x PEK #01 ADD .pt/x POK
601
+			.pt/x PEK #02 LTH ;&tiles-hor JNZ2
602
+		( incr ) .pt/y PEK #01 ADD .pt/y POK
603
+		( incr ) .Screen/y DEI2 8+ .Screen/y DEO2
604
+		.pt/y PEK #02 LTH ;&tiles-ver JNZ2
602 605
 
603 606
 RTN
604 607
 
605 608
 @draw-colorview ( -- )
606 609
 	
607
-	~colorview.y1 #18 ADD =Screen.y
608
-	~colorview.x1 #08 ADD =Screen.x
609
-	~System.r ,draw-color-code JSR2
610
-	~colorview.y1 #18 ADD =Screen.y
611
-	~colorview.x1 #10 ADD =Screen.x
612
-	~System.g ,draw-color-code JSR2
613
-	~colorview.y1 #18 ADD =Screen.y
614
-	~colorview.x1 #18 ADD =Screen.x
615
-	~System.b ,draw-color-code JSR2	
616
-
617
-	~colorview.x1 =Screen.x
618
-	,circle_icns =Screen.addr
610
+	.colorview/y1 PEK2 #18 ADD .Screen/y DEO2
611
+	.colorview/x1 PEK2 #08 ADD .Screen/x DEO2
612
+	.System/r DEI2 ;draw-color-code JSR2
613
+	.colorview/y1 PEK2 #18 ADD .Screen/y DEO2
614
+	.colorview/x1 PEK2 #10 ADD .Screen/x DEO2
615
+	.System/g DEI2 ;draw-color-code JSR2
616
+	.colorview/y1 PEK2 #18 ADD .Screen/y DEO2
617
+	.colorview/x1 PEK2 #18 ADD .Screen/x DEO2
618
+	.System/b DEI2 ;draw-color-code JSR2	
619
+
620
+	.colorview/x1 PEK2 .Screen/x DEO2
621
+	;circle_icns .Screen/addr DEO2
619 622
 
620 623
 	#00 #04
621
-	$loop
622
-		OVR ~settings.brush EQU #00 SWP #0008 MUL2 ,circle_icns ADD2 =Screen.addr
623
-		OVR ~colorview.y1 ROT #00 SWP #0008 MUL2 ADD2 =Screen.y
624
-		OVR #20 ADD =Screen.color
624
+	&loop
625
+		OVR .settings/brush PEK EQU #00 SWP #0008 MUL2 ;circle_icns ADD2 .Screen/addr DEO2
626
+		OVR .colorview/y1 PEK2 ROT #00 SWP #0008 MUL2 ADD2 .Screen/y DEO2
627
+		OVR #20 ADD .Screen/color DEO
625 628
 		SWP #01 ADD SWP
626
-		DUP2 LTH ^$loop JNZ
629
+		DUP2 LTH ,&loop JNZ
627 630
 	POP2
628 631
 
629 632
 RTN
630 633
 
631 634
 @draw-color-code ( color* -- )
632 635
 	
633
-	DUP ,font_hex ROT #0f AND #08 MUL #00 SWP ADD2 =Screen.addr
634
-	( draw ) #22 =Screen.color
635
-	~colorview.y1 #10 ADD =Screen.y
636
-	,font_hex ROT #04 SFT #08 MUL #00 SWP ADD2 =Screen.addr
637
-	( draw ) #22 =Screen.color
638
-	~colorview.y1 #08 ADD =Screen.y
639
-	DUP ,font_hex ROT #0f AND #08 MUL #00 SWP ADD2 =Screen.addr
640
-	( draw ) #22 =Screen.color
641
-	~colorview.y1 =Screen.y
642
-	,font_hex ROT #04 SFT #08 MUL #00 SWP ADD2 =Screen.addr
643
-	( draw ) #22 =Screen.color
636
+	DUP ;font_hex ROT #0f AND #08 MUL #00 SWP ADD2 .Screen/addr DEO2
637
+	( draw ) #22 .Screen/color DEO
638
+	.colorview/y1 PEK2 #10 ADD .Screen/y DEO2
639
+	;font_hex ROT #04 SFT #08 MUL #00 SWP ADD2 .Screen/addr DEO2
640
+	( draw ) #22 .Screen/color DEO
641
+	.colorview/y1 PEK2 #08 ADD .Screen/y DEO2
642
+	DUP ;font_hex ROT #0f AND #08 MUL #00 SWP ADD2 .Screen/addr DEO2
643
+	( draw ) #22 .Screen/color DEO
644
+	.colorview/y1 PEK2 .Screen/y DEO2
645
+	;font_hex ROT #04 SFT #08 MUL #00 SWP ADD2 .Screen/addr DEO2
646
+	( draw ) #22 .Screen/color DEO
644 647
 
645 648
 RTN
646 649
 
647 650
 @draw-cursor
648 651
 
649 652
 	( clear last cursor )
650
-	~mouse.x =Screen.x
651
-	~mouse.y =Screen.y
652
-	,blank_icn =Screen.addr
653
-	#30 =Screen.color
653
+	.mouse/x PEK2 .Screen/x DEO2
654
+	.mouse/y PEK2 .Screen/y DEO2
655
+	;blank_icn .Screen/addr DEO2
656
+	#30 .Screen/color DEO
654 657
 
655 658
 	( record mouse positions )
656
-	~Mouse.x =mouse.x 
657
-	~Mouse.y =mouse.y
659
+	.Mouse/x DEI2 .mouse/x POK2
660
+	.Mouse/y DEI2 .mouse/y POK2
658 661
 
659 662
 	( draw new cursor )
660
-	~mouse.x =Screen.x
661
-	~mouse.y =Screen.y
662
-	,tool_selector #00 ~bankview.mode #08 MUL ADD2 =Screen.addr
663
-	#32 ~Mouse.state #00 NEQ ADD =Screen.color
663
+	.mouse/x PEK2 .Screen/x DEO2
664
+	.mouse/y PEK2 .Screen/y DEO2
665
+	;tool_selector #00 .bankview/mode PEK #08 MUL ADD2 .Screen/addr DEO2
666
+	#32 .Mouse/state DEI #00 NEQ ADD .Screen/color DEO
664 667
 
665 668
 RTN
666 669
 
667 670
 @draw-byte ( byte color -- )
668 671
 	
669
-	=color STH
670
-	,font_hex #00 DUPr STHr #f0 AND #04 SFT #08 MUL ADD2 =Screen.addr
671
-	( draw ) ~color =Screen.color
672
-	~Screen.x 8+ =Screen.x
673
-	,font_hex #00 STHr #0f AND #08 MUL ADD2 =Screen.addr
674
-	( draw ) ~color =Screen.color
672
+	.color POK STH
673
+	;font_hex #00 DUPr STHr #f0 AND #04 SFT #08 MUL ADD2 .Screen/addr DEO2
674
+	( draw ) .color PEK .Screen/color DEO
675
+	.Screen/x DEI2 8+ .Screen/x DEO2
676
+	;font_hex #00 STHr #0f AND #08 MUL ADD2 .Screen/addr DEO2
677
+	( draw ) .color PEK .Screen/color DEO
675 678
 
676 679
 RTN
677 680
 
678 681
 @draw-short ( short -- )
679 682
 
680
-	=addr
681
-	,font_hex #00 ,addr PEK2 #f0 AND #04 SFT #08 MUL ADD2 =Screen.addr
682
-	( draw ) #22 =Screen.color
683
-	~Screen.x 8+ =Screen.x
684
-	,font_hex #00 ,addr PEK2 #0f AND #08 MUL ADD2 =Screen.addr
685
-	( draw ) #22 =Screen.color
686
-	~Screen.x 8+ =Screen.x
687
-	,font_hex #00 ,addr ++ PEK2 #f0 AND #04 SFT #08 MUL ADD2 =Screen.addr
688
-	( draw ) #22 =Screen.color
689
-	~Screen.x 8+ =Screen.x
690
-	,font_hex #00 ,addr ++ PEK2 #0f AND #08 MUL ADD2 =Screen.addr
691
-	( draw ) #22 =Screen.color
683
+	.addr POK2
684
+	;font_hex #00 ;addr GET #f0 AND #04 SFT #08 MUL ADD2 .Screen/addr DEO2
685
+	( draw ) #22 .Screen/color DEO
686
+	.Screen/x DEI2 8+ .Screen/x DEO2
687
+	;font_hex #00 ;addr GET #0f AND #08 MUL ADD2 .Screen/addr DEO2
688
+	( draw ) #22 .Screen/color DEO
689
+	.Screen/x DEI2 8+ .Screen/x DEO2
690
+	;font_hex #00 ;addr ++ GET #f0 AND #04 SFT #08 MUL ADD2 .Screen/addr DEO2
691
+	( draw ) #22 .Screen/color DEO
692
+	.Screen/x DEI2 8+ .Screen/x DEO2
693
+	;font_hex #00 ;addr ++ GET #0f AND #08 MUL ADD2 .Screen/addr DEO2
694
+	( draw ) #22 .Screen/color DEO
692 695
 
693 696
 RTN
694 697
 
... ...
@@ -696,27 +699,27 @@ RTN
696 699
 
697 700
 @line-rect ( x1 y1 x2 y2 color -- )
698 701
 
699
-	( load ) =color DUP2 STH2 =rect.y2 =rect.x2 DUP2 STH2 =rect.y1 =rect.x1
702
+	( load ) .color POK DUP2 STH2 .rect/y2 POK2 .rect/x2 POK2 DUP2 STH2 .rect/y1 POK2 .rect/x1 POK2
700 703
 	STH2r STH2r
701
-	$ver
702
-		( save ) OVR2 =Screen.y
703
-		( draw ) ~rect.x1 =Screen.x ~color DUP =Screen.color 
704
-		( draw ) ~rect.x2 =Screen.x =Screen.color
704
+	&ver
705
+		( save ) OVR2 .Screen/y DEO2
706
+		( draw ) .rect/x1 PEK2 .Screen/x DEO2 .color PEK DUP .Screen/color DEO
707
+		( draw ) .rect/x2 PEK2 .Screen/x DEO2 .Screen/color DEO
705 708
 		( incr ) SWP2 ++ SWP2
706
-		OVR2 OVR2 LTS2 ^$ver JNZ
709
+		OVR2 OVR2 LTS2 ,&ver JNZ
707 710
 	POP2 POP2
708
-	~rect.x1 ~rect.x2
709
-	$hor
710
-		( save ) OVR2 =Screen.x
711
-		( draw ) ~rect.y1 =Screen.y ~color DUP =Screen.color 
712
-		( draw ) ~rect.y2 =Screen.y =Screen.color
711
+	.rect/x1 PEK2 .rect/x2 PEK2
712
+	&hor
713
+		( save ) OVR2 .Screen/x DEO2
714
+		( draw ) .rect/y1 PEK2 .Screen/y DEO2 .color PEK DUP .Screen/color DEO
715
+		( draw ) .rect/y2 PEK2 .Screen/y DEO2 .Screen/color DEO
713 716
 		( incr ) SWP2 ++ SWP2
714
-		OVR2 OVR2 ++ LTS2 ^$hor JNZ
717
+		OVR2 OVR2 ++ LTS2 ,&hor JNZ
715 718
 	POP2 POP2
716 719
 
717 720
 RTN
718 721
 
719
-@circle_icns 
722
+@circle_icns
720 723
 	[ 0038 7cfe fefe 7c38 ] ( full )
721 724
 	[ 0038 4482 8282 4438 ] ( line )
722 725
 @eye_icns
... ...
@@ -735,21 +738,21 @@ RTN
735 738
 	00fe 8282 fe82 82fe
736 739
 	00fe 9292 fe92 92fe
737 740
 ]
738
-@filepath1     [ projects/fonts/specter8.bit 00 ]
739
-@filepath2     [ projects/pictures/cibo.bit 00 ]
740
-@filepath3     [ projects/pictures/zerotwo10x10.chr 00 ]
741
-@filepath4     [ projects/fonts/katahira8.bit 00 ]
742
-@filepath5     [ projects/pictures/ako10x10.chr 00 ]
743
-@filepath6     [ projects/pictures/cyr4x4.chr 00 ]
744
-
745
-@font_hex ( 0-F ) 
741
+@filepath1     [ "projects/fonts/specter8.bit 00 ]
742
+@filepath2     [ "projects/pictures/cibo.bit 00 ]
743
+@filepath3     [ "projects/pictures/zerotwo10x10.chr 00 ]
744
+@filepath4     [ "projects/fonts/katahira8.bit 00 ]
745
+@filepath5     [ "projects/pictures/ako10x10.chr 00 ]
746
+@filepath6     [ "projects/pictures/cyr4x4.chr 00 ]
747
+
748
+@font_hex ( 0-F )
746 749
 [
747 750
 	007c 8282 8282 827c 0030 1010 1010 1010
748 751
 	007c 8202 7c80 80fe 007c 8202 1c02 827c
749 752
 	000c 1424 4484 fe04 00fe 8080 7c02 827c
750 753
 	007c 8280 fc82 827c 007c 8202 1e02 0202
751 754
 	007c 8282 7c82 827c 007c 8282 7e02 827c
752
-	007c 8202 7e82 827e 00fc 8282 fc82 82fc 
753
-	007c 8280 8080 827c 00fc 8282 8282 82fc 
755
+	007c 8202 7e82 827e 00fc 8282 fc82 82fc
756
+	007c 8280 8080 827c 00fc 8282 8282 82fc
754 757
 	007c 8280 f080 827c 007c 8280 f080 8080
755 758
 ]
... ...
@@ -1,4 +1,4 @@
1
-( 
1
+(
2 2
 	app/noodle : illustration program
3 3
 	
4 4
 	right-click - erase
... ...
@@ -23,525 +23,527 @@
23 23
 %2/ { #0001 SFT2 }
24 24
 %8/ { #0003 SFT2 } %8* { #0030 SFT2 }
25 25
 %8+ { #0008 ADD2 }
26
-%FILESIZE { ~canvas.w ~canvas.h MUL2 #0008 MUL2 }
26
+%FILESIZE { .canvas/w PEK2 .canvas/h PEK2 MUL2 #0008 MUL2 }
27 27
 
28
-( variables )
28
+( devices )
29 29
 
30
-;cursor { x 2 y 2 x0 2 y0 2 dx 2 dy 2 }
31
-;brush { tool 1 size 1 patt 1 drag 1 last 1 oper 2 }
32
-;zoom { active 1 x 2 y 2 }
33
-;toolpane { x1 2 y1 2 x2 2 y2 2 }
34
-;pattpane { x1 2 y1 2 x2 2 y2 2 }
35
-;sizepane { x1 2 y1 2 x2 2 y2 2 }
36
-;viewpane { x1 2 y1 2 x2 2 y2 2 }
37
-;canvas { x1 2 y1 2 x2 2 y2 2 w 2 h 2 }
38
-;rect { x1 2 y1 2 x2 2 y2 2 }
39
-;line { x1 2 y1 2 x2 2 y2 2 sx 2 sy 2 dx 2 dy 2 e1 2 e2 2 }
40
-;origin { x1 2 y1 2 x2 2 y2 2 }
41
-;color { byte 1 }
42
-;pt0 { x 2 y 2 }
43
-;pt1 { x 2 y 2 }
44
-;pt2 { x 2 y 2 } ( paint-rect )
45
-;px { x 1 y 1 }
46
-;document { state 1 edit 1 presentation 1 }
47
-;path { length 1 name 20 }
48
-;timer { byte 1 }
49
-;theme { r0 2 g0 2 b0 2 r1 2 g1 2 b1 2 }
30
+|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
31
+|10 @Console [ &vector $2 &pad $6 &char $1 &byte $1 &short $2 &string $2 ]
32
+|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
33
+|40 @Controller [ &vector $2 &button $1 &key $1 ]
34
+|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
35
+|70 @File [ &vector $2 &success $2 &offset $2 &pad $2 &name $2 &length $2 &load $2 &save $2 ]
50 36
 
51
-( devices )
37
+( variables )
52 38
 
53
-|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
54
-|0110 ;Console { vector 2 pad 6 char 1 byte 1 short 2 string 2 }
55
-|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 addr 2 color 1 }
56
-|0140 ;Controller { vector 2 button 1 key 1 }
57
-|0160 ;Mouse  { vector 2 x 2 y 2 state 1 chord 1 }
58
-|0170 ;File { vector 2 success 2 offset 2 pad 2 name 2 length 2 load 2 save 2 }
39
+|0000
40
+
41
+@cursor [ &x $2 &y $2 &x0 $2 &y0 $2 &dx $2 &dy $2 ]
42
+@brush [ &tool $1 &size $1 &patt $1 &drag $1 &last $1 &oper $2 ]
43
+@zoom [ &active $1 &x $2 &y $2 ]
44
+@toolpane [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
45
+@pattpane [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
46
+@sizepane [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
47
+@viewpane [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
48
+@canvas [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 &w $2 &h $2 ]
49
+@rect [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
50
+@line [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 &sx $2 &sy $2 &dx $2 &dy $2 &e1 $2 &e2 $2 ]
51
+@origin [ &x1 $2 &y1 $2 &x2 $2 &y2 $2 ]
52
+@color [ &byte $1 ]
53
+@pt0 [ &x $2 &y $2 ]
54
+@pt1 [ &x $2 &y $2 ]
55
+@pt2 [ &x $2 &y $2 ] ( paint-rect )
56
+@px [ &x $1 &y $1 ]
57
+@document [ &state $1 &edit $1 &presentation $1 ]
58
+@path [ &length $1 &name $20 ]
59
+@timer [ &byte $1 ]
60
+@theme [ &r0 $2 &g0 $2 &b0 $2 &r1 $2 &g1 $2 &b1 $2 ]
59 61
 
60 62
 ( program )
61 63
 
62
-|0200
64
+|0100
63 65
 	
64
-	( theme ) 
65
-	#e0fa =theme.r0 #30fa =theme.g0 #30fa =theme.b0 ( normal mode )
66
-	#00fe =theme.r1 #00f3 =theme.g1 #00f3 =theme.b1 ( presentation mode )
67
-	( vectors ) ,on-screen =Screen.vector
68
-	( vectors ) ,on-button =Controller.vector
69
-	( vectors ) ,on-mouse =Mouse.vector
66
+	( theme )
67
+	#e0fa .theme/r0 POK2 #30fa .theme/g0 POK2 #30fa .theme/b0 POK2 ( normal mode )
68
+	#00fe .theme/r1 POK2 #00f3 .theme/g1 POK2 #00f3 .theme/b1 POK2 ( presentation mode )
69
+	( vectors ) ;on-screen .Screen/vector DEO2
70
+	( vectors ) ;on-button .Controller/vector DEO2
71
+	( vectors ) ;on-mouse .Mouse/vector DEO2
70 72
 
71
-	~theme.r0 =System.r ~theme.g0 =System.g ~theme.b0 =System.b
73
+	.theme/r0 PEK2 .System/r DEO2 .theme/g0 PEK2 .System/g DEO2 .theme/b0 PEK2 .System/b DEO2
72 74
 
73 75
 	( default canvas )
74
-	#002a =canvas.w #0018 =canvas.h
76
+	#002a .canvas/w POK2 #0018 .canvas/h POK2
75 77
 
76 78
 	( default brush )
77
-	#04 =brush.size #00 =brush.patt #00 =brush.tool
79
+	#04 .brush/size POK #00 .brush/patt POK #00 .brush/tool POK
78 80
 
79 81
 	( load file )
80
-	,untitled_txt ,path.name ,strcpy JSR2
82
+	;untitled_txt ;path/name ;strcpy JSR2
81 83
 
82 84
 	( setup panes )
83
-	#0010 =toolpane.x1 #0010 =toolpane.y1 ~toolpane.x1 #0028 ADD2 =toolpane.x2 ~toolpane.y1 #0008 ADD2 =toolpane.y2
84
-	#0040 =sizepane.x1 #0010 =sizepane.y1 ~sizepane.x1 #0040 ADD2 =sizepane.x2 ~sizepane.y1 #0008 ADD2 =sizepane.y2
85
-	~Screen.width #0078 SUB2 =viewpane.x1 #0010 =viewpane.y1 ~viewpane.x1 #0020 ADD2 =viewpane.x2 ~viewpane.y1 #0008 ADD2 =viewpane.y2
86
-	~Screen.width #0050 SUB2 =pattpane.x1 #0010 =pattpane.y1 ~pattpane.x1 #0040 ADD2 =pattpane.x2 ~pattpane.y1 #0008 ADD2 =pattpane.y2
85
+	#0010 .toolpane/x1 POK2 #0010 .toolpane/y1 POK2 .toolpane/x1 PEK2 #0028 ADD2 .toolpane/x2 POK2 .toolpane/y1 PEK2 #0008 ADD2 .toolpane/y2 POK2
86
+	#0040 .sizepane/x1 POK2 #0010 .sizepane/y1 POK2 .sizepane/x1 PEK2 #0040 ADD2 .sizepane/x2 POK2 .sizepane/y1 PEK2 #0008 ADD2 .sizepane/y2 POK2
87
+	.Screen/width DEI2 #0078 SUB2 .viewpane/x1 POK2 #0010 .viewpane/y1 POK2 .viewpane/x1 PEK2 #0020 ADD2 .viewpane/x2 POK2 .viewpane/y1 PEK2 #0008 ADD2 .viewpane/y2 POK2
88
+	.Screen/width DEI2 #0050 SUB2 .pattpane/x1 POK2 #0010 .pattpane/y1 POK2 .pattpane/x1 PEK2 #0040 ADD2 .pattpane/x2 POK2 .pattpane/y1 PEK2 #0008 ADD2 .pattpane/y2 POK2
87 89
 
88 90
 	( ready. )
89
-	,center JSR2
90
-	,clear JSR2
91
+	;center JSR2
92
+	;clear JSR2
91 93
 
92 94
 	( load default file )
93
-	,path.name ,load-file JSR2
95
+	;path/name ;load-file JSR2
94 96
 
95 97
 BRK
96 98
 
97 99
 @on-screen ( -> )
98 100
 	
99
-	~document.edit #01 NEQ ^$no-edit JNZ
100
-		#0008 =Screen.x 
101
-		~Screen.height #0010 SUB2 =Screen.y
102
-		,path.name #01 ~timer #04 DIV #03 AND #03 MUL ADD ,draw-label JSR2
103
-		$clear
104
-			#20 =Screen.color
105
-			~Screen.x 8+ DUP2 =Screen.x
106
-			~Screen.width LTH2 ^$clear JNZ
107
-		( blink ) ~timer #01 ADD =timer
108
-	$no-edit
101
+	.document/edit PEK #01 NEQ ,&no-edit JNZ
102
+		#0008 .Screen/x DEO2
103
+		.Screen/height DEI2 #0010 SUB2 .Screen/y DEO2
104
+		;path/name #01 .timer PEK #04 DIV #03 AND #03 MUL ADD ;draw-label JSR2
105
+		&clear
106
+			#20 .Screen/color DEO
107
+			.Screen/x DEI2 8+ DUP2 .Screen/x DEO2
108
+			.Screen/width DEI2 LTH2 ,&clear JNZ
109
+		( blink ) .timer PEK #01 ADD .timer POK
110
+	&no-edit
109 111
 
110 112
 BRK
111 113
 
112 114
 @on-mouse ( -> )
113 115
 	
114
-	,draw-cursor JSR2
116
+	;draw-cursor JSR2
115 117
 
116 118
 	( release drag )
117
-	~Mouse.state #00 EQU ~brush.drag #01 EQU #0101 NEQ2 ^$no-release JNZ
118
-		~origin.x1 #0002 SUB2 ~origin.y1 #0002 SUB2 ~origin.x2 #0002 ADD2 ~origin.y2 #0002 ADD2 #00 ,fill-rect JSR2
119
-		~canvas.x1 -- ~canvas.y1 -- ~canvas.x2 ~canvas.y2 #10 ,line-rect JSR2
120
-		,draw-background JSR2
121
-		,fit-canvas JSR2
122
-		,draw-foreground JSR2
123
-		#00 =brush.drag
124
-	$no-release
119
+	.Mouse/state DEI #00 EQU .brush/drag PEK #01 EQU #0101 NEQ2 ,&no-release JNZ
120
+		.origin/x1 PEK2 #0002 SUB2 .origin/y1 PEK2 #0002 SUB2 .origin/x2 PEK2 #0002 ADD2 .origin/y2 PEK2 #0002 ADD2 #00 ;fill-rect JSR2
121
+		.canvas/x1 PEK2 -- .canvas/y1 PEK2 -- .canvas/x2 PEK2 .canvas/y2 PEK2 #10 ;line-rect JSR2
122
+		;draw-background JSR2
123
+		;fit-canvas JSR2
124
+		;draw-foreground JSR2
125
+		#00 .brush/drag POK
126
+	&no-release
125 127
 
126 128
 	( operations on release line/rect )
127
-	~Mouse.state ~brush.last EQU ,$no-touch-change JNZ2
128
-	~Mouse.x CLN2r ~canvas.x1 GTS2 STH2r ~canvas.x2 LTS2 #0101 NEQ2 ,$no-touch-change JNZ2
129
-	~Mouse.y CLN2r ~canvas.y1 GTS2 STH2r ~canvas.y2 LTS2 #0101 NEQ2 ,$no-touch-change JNZ2
130
-		~Mouse.state #00 EQU ^$no-touch-ondown JNZ
129
+	.Mouse/state DEI .brush/last PEK EQU ;&no-touch-change JNZ2
130
+	.Mouse/x DEI2 CLN2r .canvas/x1 PEK2 GTS2 STH2r .canvas/x2 PEK2 LTS2 #0101 NEQ2 ;&no-touch-change JNZ2
131
+	.Mouse/y DEI2 CLN2r .canvas/y1 PEK2 GTS2 STH2r .canvas/y2 PEK2 LTS2 #0101 NEQ2 ;&no-touch-change JNZ2
132
+		.Mouse/state DEI #00 EQU ,&no-touch-ondown JNZ
131 133
 			( on down )
132
-			~Mouse.x =cursor.dx
133
-			~Mouse.y =cursor.dy
134
-		$no-touch-ondown
135
-		~Mouse.state #00 NEQ ^$no-touch-onup JNZ
134
+			.Mouse/x DEI2 .cursor/dx POK2
135
+			.Mouse/y DEI2 .cursor/dy POK2
136
+		&no-touch-ondown
137
+		.Mouse/state DEI #00 NEQ ,&no-touch-onup JNZ
136 138
 			( on up )
137
-			~brush.tool #02 NEQ ^$no-touch-line JNZ
138
-				~cursor.dx ~canvas.x1 SUB2 ~cursor.dy ~canvas.y1 SUB2 ~Mouse.x ~canvas.x1 SUB2 ~Mouse.y ~canvas.y1 SUB2 ,paint-line JSR2
139
-				,$touch-end JMP2
140
-			$no-touch-line
141
-			~brush.tool #03 NEQ ^$no-touch-rect JNZ
142
-				~cursor.dx ~canvas.x1 SUB2 ~cursor.dy ~canvas.y1 SUB2 ~Mouse.x ~canvas.x1 SUB2 ~Mouse.y ~canvas.y1 SUB2 ,paint-rect JSR2
143
-				,$touch-end JMP2
144
-			$no-touch-rect
145
-		$no-touch-onup
146
-	$no-touch-change
147
-
148
-	~Mouse.state #00 EQU ,$no-touch JNZ2
139
+			.brush/tool PEK #02 NEQ ,&no-touch-line JNZ
140
+				.cursor/dx PEK2 .canvas/x1 PEK2 SUB2 .cursor/dy PEK2 .canvas/y1 PEK2 SUB2 .Mouse/x DEI2 .canvas/x1 PEK2 SUB2 .Mouse/y DEI2 .canvas/y1 PEK2 SUB2 ;paint-line JSR2
141
+				;&touch-end JMP2
142
+			&no-touch-line
143
+			.brush/tool PEK #03 NEQ ,&no-touch-rect JNZ
144
+				.cursor/dx PEK2 .canvas/x1 PEK2 SUB2 .cursor/dy PEK2 .canvas/y1 PEK2 SUB2 .Mouse/x DEI2 .canvas/x1 PEK2 SUB2 .Mouse/y DEI2 .canvas/y1 PEK2 SUB2 ;paint-rect JSR2
145
+				;&touch-end JMP2
146
+			&no-touch-rect
147
+		&no-touch-onup
148
+	&no-touch-change
149
+
150
+	.Mouse/state DEI #00 EQU ;&no-touch JNZ2
149 151
 
150 152
 		( drag )
151
-		~Controller.button #02 NEQ ,$no-drag JNZ2
152
-			~brush.drag #00 NEQ ^$no-drag-start JNZ
153
-				~canvas.x1 =origin.x1
154
-				~canvas.y1 =origin.y1
155
-				~canvas.x2 =origin.x2
156
-				~canvas.y2 =origin.y2
157
-			$no-drag-start
158
-			~canvas.x1 -- ~canvas.y1 -- ~canvas.x2 ~canvas.y2 #10 ,line-rect JSR2
159
-			~canvas.x1 ~Mouse.x ~cursor.x0 SUB2 ADD2 =canvas.x1
160
-			~canvas.y1 ~Mouse.y ~cursor.y0 SUB2 ADD2 =canvas.y1
161
-			~canvas.w 8* ~canvas.x1 ADD2 =canvas.x2 
162
-			~canvas.h 8* ~canvas.y1 ADD2 =canvas.y2 
163
-			~canvas.x1 -- ~canvas.y1 -- ~canvas.x2 ~canvas.y2 #13 ,line-rect JSR2
164
-			#01 =brush.drag
165
-			,$touch-end JMP2
166
-		$no-drag
153
+		.Controller/button DEI #02 NEQ ;&no-drag JNZ2
154
+			.brush/drag PEK #00 NEQ ,&no-drag-start JNZ
155
+				.canvas/x1 PEK2 .origin/x1 POK2
156
+				.canvas/y1 PEK2 .origin/y1 POK2
157
+				.canvas/x2 PEK2 .origin/x2 POK2
158
+				.canvas/y2 PEK2 .origin/y2 POK2
159
+			&no-drag-start
160
+			.canvas/x1 PEK2 -- .canvas/y1 PEK2 -- .canvas/x2 PEK2 .canvas/y2 PEK2 #10 ;line-rect JSR2
161
+			.canvas/x1 PEK2 .Mouse/x DEI2 .cursor/x0 PEK2 SUB2 ADD2 .canvas/x1 POK2
162
+			.canvas/y1 PEK2 .Mouse/y DEI2 .cursor/y0 PEK2 SUB2 ADD2 .canvas/y1 POK2
163
+			.canvas/w PEK2 8* .canvas/x1 PEK2 ADD2 .canvas/x2 POK2
164
+			.canvas/h PEK2 8* .canvas/y1 PEK2 ADD2 .canvas/y2 POK2
165
+			.canvas/x1 PEK2 -- .canvas/y1 PEK2 -- .canvas/x2 PEK2 .canvas/y2 PEK2 #13 ;line-rect JSR2
166
+			#01 .brush/drag POK
167
+			;&touch-end JMP2
168
+		&no-drag
167 169
 
168 170
 		( in sizepane )
169
-		~Mouse.x CLN2r ~sizepane.x1 GTH2 STH2r ~sizepane.x2 LTH2 #0101 NEQ2 ^$no-touch-sizepane JNZ
170
-		~Mouse.y CLN2r ~sizepane.y1 GTH2 STH2r ~sizepane.y2 LTH2 #0101 NEQ2 ^$no-touch-sizepane JNZ
171
-			( release ) #00 =Mouse.state
172
-			#01 =brush.tool
173
-			~Mouse.x ~sizepane.x1 SUB2 8/ SWP POP =brush.size
174
-			( draw ) ,draw-sizepane JSR2
175
-			( draw ) ,draw-toolpane JSR2
176
-			,$touch-end JMP2
177
-		$no-touch-sizepane
171
+		.Mouse/x DEI2 CLN2r .sizepane/x1 PEK2 GTH2 STH2r .sizepane/x2 PEK2 LTH2 #0101 NEQ2 ,&no-touch-sizepane JNZ
172
+		.Mouse/y DEI2 CLN2r .sizepane/y1 PEK2 GTH2 STH2r .sizepane/y2 PEK2 LTH2 #0101 NEQ2 ,&no-touch-sizepane JNZ
173
+			( release ) #00 .Mouse/state DEO
174
+			#01 .brush/tool POK
175
+			.Mouse/x DEI2 .sizepane/x1 PEK2 SUB2 8/ SWP POP .brush/size POK
176
+			( draw ) ;draw-sizepane JSR2
177
+			( draw ) ;draw-toolpane JSR2
178
+			;&touch-end JMP2
179
+		&no-touch-sizepane
178 180
 
179 181
 		( in pattpane )
180
-		~Mouse.x CLN2r ~pattpane.x1 GTH2 STH2r ~pattpane.x2 LTH2 #0101 NEQ2 ^$no-touch-pattpane JNZ
181
-		~Mouse.y CLN2r ~pattpane.y1 GTH2 STH2r ~pattpane.y2 LTH2 #0101 NEQ2 ^$no-touch-pattpane JNZ
182
-			( release ) #00 =Mouse.state
183
-			~Mouse.x ~pattpane.x1 SUB2 8/ SWP POP =brush.patt
184
-			( draw ) ,draw-pattpane JSR2
185
-			,$touch-end JMP2
186
-		$no-touch-pattpane
182
+		.Mouse/x DEI2 CLN2r .pattpane/x1 PEK2 GTH2 STH2r .pattpane/x2 PEK2 LTH2 #0101 NEQ2 ,&no-touch-pattpane JNZ
183
+		.Mouse/y DEI2 CLN2r .pattpane/y1 PEK2 GTH2 STH2r .pattpane/y2 PEK2 LTH2 #0101 NEQ2 ,&no-touch-pattpane JNZ
184
+			( release ) #00 .Mouse/state DEO
185
+			.Mouse/x DEI2 .pattpane/x1 PEK2 SUB2 8/ SWP POP .brush/patt POK
186
+			( draw ) ;draw-pattpane JSR2
187
+			;&touch-end JMP2
188
+		&no-touch-pattpane
187 189
 
188 190
 		( in toolpane )
189
-		~Mouse.x CLN2r ~toolpane.x1 GTH2 STH2r ~toolpane.x2 LTH2 #0101 NEQ2 ^$no-touch-toolpane JNZ
190
-		~Mouse.y CLN2r ~toolpane.y1 GTH2 STH2r ~toolpane.y2 LTH2 #0101 NEQ2 ^$no-touch-toolpane JNZ
191
-			( release ) #00 =Mouse.state
192
-			~Mouse.x ~toolpane.x1 SUB2 8/ SWP POP =brush.tool
193
-			( draw ) ,draw-toolpane JSR2
194
-			,$touch-end JMP2
195
-		$no-touch-toolpane
191
+		.Mouse/x DEI2 CLN2r .toolpane/x1 PEK2 GTH2 STH2r .toolpane/x2 PEK2 LTH2 #0101 NEQ2 ,&no-touch-toolpane JNZ
192
+		.Mouse/y DEI2 CLN2r .toolpane/y1 PEK2 GTH2 STH2r .toolpane/y2 PEK2 LTH2 #0101 NEQ2 ,&no-touch-toolpane JNZ
193
+			( release ) #00 .Mouse/state DEO
194
+			.Mouse/x DEI2 .toolpane/x1 PEK2 SUB2 8/ SWP POP .brush/tool POK
195
+			( draw ) ;draw-toolpane JSR2
196
+			;&touch-end JMP2
197
+		&no-touch-toolpane
196 198
 
197 199
 		( in viewpane )
198
-		~Mouse.x CLN2r ~viewpane.x1 GTH2 STH2r ~viewpane.x2 LTH2 #0101 NEQ2 ,$no-touch-viewpane JNZ2
199
-		~Mouse.y CLN2r ~viewpane.y1 GTH2 STH2r ~viewpane.y2 LTH2 #0101 NEQ2 ,$no-touch-viewpane JNZ2
200
-			( release ) #00 =Mouse.state
201
-			( clear ) ~canvas.x1 #0002 SUB2 ~canvas.y1 #0002 SUB2 ~canvas.x2 #0002 ADD2 ~canvas.y2 #0002 ADD2 #00 ,fill-rect JSR2
202
-			,draw-background JSR2
203
-			~Mouse.x ~viewpane.x1 SUB2 8/ SWP POP
204
-			DUP #00 NEQ ^$no-incwidth JNZ
205
-				~canvas.w ++ =canvas.w
206
-			$no-incwidth
207
-			DUP #01 NEQ ^$no-decwidth JNZ
208
-				~canvas.w -- =canvas.w
209
-			$no-decwidth
210
-			DUP #02 NEQ ^$no-incheight JNZ
211
-				~canvas.h ++ =canvas.h
212
-			$no-incheight
213
-			DUP #03 NEQ ^$no-decheight JNZ
214
-				~canvas.h -- =canvas.h
215
-			$no-decheight
200
+		.Mouse/x DEI2 CLN2r .viewpane/x1 PEK2 GTH2 STH2r .viewpane/x2 PEK2 LTH2 #0101 NEQ2 ;&no-touch-viewpane JNZ2
201
+		.Mouse/y DEI2 CLN2r .viewpane/y1 PEK2 GTH2 STH2r .viewpane/y2 PEK2 LTH2 #0101 NEQ2 ;&no-touch-viewpane JNZ2
202
+			( release ) #00 .Mouse/state DEO
203
+			( clear ) .canvas/x1 PEK2 #0002 SUB2 .canvas/y1 PEK2 #0002 SUB2 .canvas/x2 PEK2 #0002 ADD2 .canvas/y2 PEK2 #0002 ADD2 #00 ;fill-rect JSR2
204
+			;draw-background JSR2
205
+			.Mouse/x DEI2 .viewpane/x1 PEK2 SUB2 8/ SWP POP
206
+			DUP #00 NEQ ,&no-incwidth JNZ
207
+				.canvas/w PEK2 ++ .canvas/w POK2
208
+			&no-incwidth
209
+			DUP #01 NEQ ,&no-decwidth JNZ
210
+				.canvas/w PEK2 -- .canvas/w POK2
211
+			&no-decwidth
212
+			DUP #02 NEQ ,&no-incheight JNZ
213
+				.canvas/h PEK2 ++ .canvas/h POK2
214
+			&no-incheight
215
+			DUP #03 NEQ ,&no-decheight JNZ
216
+				.canvas/h PEK2 -- .canvas/h POK2
217
+			&no-decheight
216 218
 			POP
217
-			,fit-canvas JSR2
218
-			,redraw JSR2
219
-			,$touch-end JMP2
220
-		$no-touch-viewpane
219
+			;fit-canvas JSR2
220
+			;redraw JSR2
221
+			;&touch-end JMP2
222
+		&no-touch-viewpane
221 223
 
222 224
 		( in canvas )
223
-		~Mouse.x CLN2r ~canvas.x1 GTS2 STH2r ~canvas.x2 LTS2 #0101 NEQ2 ,$no-touch-canvas JNZ2
224
-		~Mouse.y CLN2r ~canvas.y1 GTS2 STH2r ~canvas.y2 LTS2 #0101 NEQ2 ,$no-touch-canvas JNZ2
225
+		.Mouse/x DEI2 CLN2r .canvas/x1 PEK2 GTS2 STH2r .canvas/x2 PEK2 LTS2 #0101 NEQ2 ;&no-touch-canvas JNZ2
226
+		.Mouse/y DEI2 CLN2r .canvas/y1 PEK2 GTS2 STH2r .canvas/y2 PEK2 LTS2 #0101 NEQ2 ;&no-touch-canvas JNZ2
225 227
 
226 228
 			( set cursor operation )
227
-			,add-pixel ~Mouse.state #01 EQU ,$no-oper JNZ2 POP2 ,remove-pixel $no-oper =brush.oper
229
+			;add-pixel .Mouse/state DEI #01 EQU ;&no-oper JNZ2 POP2 ;remove-pixel &no-oper .brush/oper POK2
228 230
 
229
-			~brush.tool #00 NEQ ^$no-touch-pen JNZ
230
-				~cursor.x0 ~canvas.x1 SUB2 ~cursor.y0 ~canvas.y1 SUB2 ~Mouse.x ~canvas.x1 SUB2 ~Mouse.y ~canvas.y1 SUB2 ,paint-line JSR2
231
-				,$touch-end JMP2
232
-			$no-touch-pen
231
+			.brush/tool PEK #00 NEQ ,&no-touch-pen JNZ
232
+				.cursor/x0 PEK2 .canvas/x1 PEK2 SUB2 .cursor/y0 PEK2 .canvas/y1 PEK2 SUB2 .Mouse/x DEI2 .canvas/x1 PEK2 SUB2 .Mouse/y DEI2 .canvas/y1 PEK2 SUB2 ;paint-line JSR2
233
+				;&touch-end JMP2
234
+			&no-touch-pen
233 235
 
234
-			~brush.tool #01 NEQ ^$no-touch-brush JNZ
235
-				~Mouse.x ~canvas.x1 SUB2 ~Mouse.y ~canvas.y1 SUB2 ,paint-brush JSR2
236
-				,$touch-end JMP2
237
-			$no-touch-brush
236
+			.brush/tool PEK #01 NEQ ,&no-touch-brush JNZ
237
+				.Mouse/x DEI2 .canvas/x1 PEK2 SUB2 .Mouse/y DEI2 .canvas/y1 PEK2 SUB2 ;paint-brush JSR2
238
+				;&touch-end JMP2
239
+			&no-touch-brush
238 240
 
239
-			~brush.tool #04 NEQ ^$no-touch-zoom JNZ
240
-				~zoom.active #00 EQU =zoom.active
241
-				( release ) #00 =Mouse.state
242
-				~Mouse.x ~canvas.x1 SUB2 ~canvas.w 2/ SUB2 =zoom.x
243
-				~Mouse.y ~canvas.y1 SUB2 ~canvas.h 2/ SUB2 =zoom.y
244
-				,redraw JSR2
245
-				,$touch-end JMP2
246
-			$no-touch-zoom
241
+			.brush/tool PEK #04 NEQ ,&no-touch-zoom JNZ
242
+				.zoom/active PEK #00 EQU .zoom/active POK
243
+				( release ) #00 .Mouse/state DEO
244
+				.Mouse/x DEI2 .canvas/x1 PEK2 SUB2 .canvas/w PEK2 2/ SUB2 .zoom/x POK2
245
+				.Mouse/y DEI2 .canvas/y1 PEK2 SUB2 .canvas/h PEK2 2/ SUB2 .zoom/y POK2
246
+				;redraw JSR2
247
+				;&touch-end JMP2
248
+			&no-touch-zoom
247 249
 
248
-		$no-touch-canvas
250
+		&no-touch-canvas
249 251
 
250 252
 		( background interface )
251
-		~Mouse.y STEP8 ~Screen.height #0010 SUB2 NEQ2 ^$no-touch-background JNZ
252
-			~Mouse.x ~Screen.width #0028 SUB2 SUB2 8/ SWP POP
253
-			DUP #00 NEQ ^$no-eye-button JNZ
254
-				,present JSR2
255
-				( release ) #00 =Mouse.state
256
-			$no-eye-button
257
-			DUP #01 NEQ ^$no-rename-button JNZ
258
-				,rename JSR2
259
-				#01 =document.edit
260
-				( release ) #00 =Mouse.state
261
-			$no-rename-button
262
-			DUP #02 NEQ ^$no-load-button JNZ
263
-				,path.name ,load-file JSR2
264
-				,draw-canvas JSR2
265
-				( release ) #00 =Mouse.state
266
-			$no-load-button
267
-			DUP #03 NEQ ^$no-save-button JNZ
268
-				,path.name ,save-file JSR2
269
-				( release ) #00 =Mouse.state
270
-			$no-save-button
253
+		.Mouse/y DEI2 STEP8 .Screen/height DEI2 #0010 SUB2 NEQ2 ,&no-touch-background JNZ
254
+			.Mouse/x DEI2 .Screen/width DEI2 #0028 SUB2 SUB2 8/ SWP POP
255
+			DUP #00 NEQ ,&no-eye-button JNZ
256
+				;present JSR2
257
+				( release ) #00 .Mouse/state DEO
258
+			&no-eye-button
259
+			DUP #01 NEQ ,&no-rename-button JNZ
260
+				;rename JSR2
261
+				#01 .document/edit POK
262
+				( release ) #00 .Mouse/state DEO
263
+			&no-rename-button
264
+			DUP #02 NEQ ,&no-load-button JNZ
265
+				;path/name ;load-file JSR2
266
+				;draw-canvas JSR2
267
+				( release ) #00 .Mouse/state DEO
268
+			&no-load-button
269
+			DUP #03 NEQ ,&no-save-button JNZ
270
+				;path/name ;save-file JSR2
271
+				( release ) #00 .Mouse/state DEO
272
+			&no-save-button
271 273
 			POP
272
-		$no-touch-background
274
+		&no-touch-background
273 275
 
274 276
 		( jump label )
275
-		$touch-end
277
+		&touch-end
276 278
 
277
-	$no-touch
279
+	&no-touch
278 280
 
279
-	~Mouse.x =cursor.x0
280
-	~Mouse.y =cursor.y0
281
-	~Mouse.state =brush.last
281
+	.Mouse/x DEI2 .cursor/x0 POK2
282
+	.Mouse/y DEI2 .cursor/y0 POK2
283
+	.Mouse/state DEI .brush/last POK
282 284
 
283 285
 BRK
284 286
 
285 287
 @on-button ( -> )
286 288
 
287 289
 	( if in renaming mode )
288
-	~document.edit #01 NEQ ,$no-edit JNZ2
289
-	~Controller.key #00 EQU ,$no-edit JNZ2
290
+	.document/edit PEK #01 NEQ ;&no-edit JNZ2
291
+	.Controller/key DEI #00 EQU ;&no-edit JNZ2
290 292
 		( enter )
291
-		~Controller.key #0d NEQ ^$no-edit-enter JNZ
292
-			#00 =document.edit
293
-			,redraw JSR2
293
+		.Controller/key DEI #0d NEQ ,&no-edit-enter JNZ
294
+			#00 .document/edit POK
295
+			;redraw JSR2
294 296
 			BRK
295
-			$no-edit-enter
297
+			&no-edit-enter
296 298
 		( backspace )
297
-		~Controller.key #08 NEQ ^$no-edit-backspace JNZ
298
-			~path.length #00 EQU ^$edit-end JNZ
299
-			~path.length #01 SUB =path.length
300
-			#00 ,path.name #00 ~path.length ADD2 POK2
299
+		.Controller/key DEI #08 NEQ ,&no-edit-backspace JNZ
300
+			.path/length PEK #00 EQU ,&edit-end JNZ
301
+			.path/length PEK #01 SUB .path/length POK
302
+			#00 ;path/name #00 .path/length PEK ADD2 PUT
301 303
 			BRK
302
-			$no-edit-backspace
304
+			&no-edit-backspace
303 305
 		( default )
304
-		~path.length #1f EQU ^$edit-end JNZ
305
-			~Controller.key ,path.name #00 ~path.length ADD2 POK2
306
-			~path.length #01 ADD =path.length
307
-		$edit-end
308
-		#00 ,path.name #00 ~path.length ADD2 POK2
306
+		.path/length PEK #1f EQU ,&edit-end JNZ
307
+			.Controller/key DEI ;path/name #00 .path/length PEK ADD2 PUT
308
+			.path/length PEK #01 ADD .path/length POK
309
+		&edit-end
310
+		#00 ;path/name #00 .path/length PEK ADD2 PUT
309 311
 		BRK
310
-	$no-edit
312
+	&no-edit
311 313
 	
312 314
 	( control zoom )
313
-	~zoom.active #00 EQU ^$skip-zoom JNZ
314
-		~Controller.button #f0 AND
315
-			DUP #04 SFT #01 AND #01 NEQ ^$no-up JNZ
316
-				( move ) ~zoom.y -- =zoom.y $no-up
317
-			DUP #05 SFT #01 AND #01 NEQ ^$no-down JNZ
318
-				( move ) ~zoom.y ++ =zoom.y $no-down
319
-			DUP #06 SFT #01 AND #01 NEQ ^$no-left JNZ
320
-				( move ) ~zoom.x -- =zoom.x $no-left
321
-			DUP #07 SFT #01 AND #01 NEQ ^$no-right JNZ
322
-				( move ) ~zoom.x ++ =zoom.x $no-right
323
-		#00 EQU #04 JNZ ,draw-canvas JSR2
324
-	$skip-zoom
325
-
326
-	~Controller.key 
327
-	DUP #20 NEQ ^$no-space JNZ
328
-		( toggle zoom ) ~zoom.active #00 EQU =zoom.active ,redraw JSR2 $no-space 
329
-	DUP #08 NEQ ^$no-backspace JNZ
330
-		( erase ) ,clear JSR2 $no-backspace
331
-	DUP #71 NEQ ^$no-qkey JNZ
332
-		( tool0 ) #00 =brush.tool ,draw-toolpane JSR2 $no-qkey
333
-	DUP #77 NEQ ^$no-wkey JNZ
334
-		( tool0 ) #01 =brush.tool ,draw-toolpane JSR2 $no-wkey
335
-	DUP #65 NEQ ^$no-ekey JNZ
336
-		( tool0 ) #02 =brush.tool ,draw-toolpane JSR2 $no-ekey
337
-	DUP #72 NEQ ^$no-rkey JNZ
338
-		( tool0 ) #03 =brush.tool ,draw-toolpane JSR2 $no-rkey
339
-	DUP #74 NEQ ^$no-tkey JNZ
340
-		( tool0 ) #04 =brush.tool ,draw-toolpane JSR2 $no-tkey
341
-	DUP 
342
-		DUP #30 GTH SWP #39 LTH #0101 NEQ2 ^$no-numkey JNZ
343
-		( size ) ~Controller.key #31 SUB =brush.size ,draw-sizepane JSR2 $no-numkey
315
+	.zoom/active PEK #00 EQU ,&skip-zoom JNZ
316
+		.Controller/button DEI #f0 AND
317
+			DUP #04 SFT #01 AND #01 NEQ ,&no-up JNZ
318
+				( move ) .zoom/y PEK2 -- .zoom/y POK2 &no-up
319
+			DUP #05 SFT #01 AND #01 NEQ ,&no-down JNZ
320
+				( move ) .zoom/y PEK2 ++ .zoom/y POK2 &no-down
321
+			DUP #06 SFT #01 AND #01 NEQ ,&no-left JNZ
322
+				( move ) .zoom/x PEK2 -- .zoom/x POK2 &no-left
323
+			DUP #07 SFT #01 AND #01 NEQ ,&no-right JNZ
324
+				( move ) .zoom/x PEK2 ++ .zoom/x POK2 &no-right
325
+		#00 EQU #04 JNZ ;draw-canvas JSR2
326
+	&skip-zoom
327
+
328
+	.Controller/key DEI
329
+	DUP #20 NEQ ,&no-space JNZ
330
+		( toggle zoom ) .zoom/active PEK #00 EQU .zoom/active POK ;redraw JSR2 &no-space
331
+	DUP #08 NEQ ,&no-backspace JNZ
332
+		( erase ) ;clear JSR2 &no-backspace
333
+	DUP #71 NEQ ,&no-qkey JNZ
334
+		( tool0 ) #00 .brush/tool POK ;draw-toolpane JSR2 &no-qkey
335
+	DUP #77 NEQ ,&no-wkey JNZ
336
+		( tool0 ) #01 .brush/tool POK ;draw-toolpane JSR2 &no-wkey
337
+	DUP #65 NEQ ,&no-ekey JNZ
338
+		( tool0 ) #02 .brush/tool POK ;draw-toolpane JSR2 &no-ekey
339
+	DUP #72 NEQ ,&no-rkey JNZ
340
+		( tool0 ) #03 .brush/tool POK ;draw-toolpane JSR2 &no-rkey
341
+	DUP #74 NEQ ,&no-tkey JNZ
342
+		( tool0 ) #04 .brush/tool POK ;draw-toolpane JSR2 &no-tkey
343
+	DUP
344
+		DUP #30 GTH SWP #39 LTH #0101 NEQ2 ,&no-numkey JNZ
345
+		( size ) .Controller/key DEI #31 SUB .brush/size POK ;draw-sizepane JSR2 &no-numkey
344 346
 	POP
345 347
 
346 348
 BRK
347 349
 
348 350
 @center ( -- )
349 351
 	
350
-	( clear old ) 
351
-	~canvas.x1 #0002 SUB2 ~canvas.y1 #0002 SUB2 ~canvas.x2 #0002 ADD2 ~canvas.y2 #0002 ADD2 #00 ,fill-rect JSR2
352
+	( clear old )
353
+	.canvas/x1 PEK2 #0002 SUB2 .canvas/y1 PEK2 #0002 SUB2 .canvas/x2 PEK2 #0002 ADD2 .canvas/y2 PEK2 #0002 ADD2 #00 ;fill-rect JSR2
352 354
 
353
-	,draw-background JSR2
355
+	;draw-background JSR2
354 356
 
355
-	~Screen.width #0002 DIV2 ~canvas.w 8* 2/ SUB2 =canvas.x1 
356
-	~Screen.height #0002 DIV2 ~canvas.h 8* 2/ SUB2 =canvas.y1
357
+	.Screen/width DEI2 #0002 DIV2 .canvas/w PEK2 8* 2/ SUB2 .canvas/x1 POK2
358
+	.Screen/height DEI2 #0002 DIV2 .canvas/h PEK2 8* 2/ SUB2 .canvas/y1 POK2
357 359
 
358
-	,fit-canvas JSR2
359
-	,draw-foreground JSR2
360
+	;fit-canvas JSR2
361
+	;draw-foreground JSR2
360 362
 
361 363
 RTN
362 364
 
363 365
 @rename
364 366
 	
365
-	,untitled_txt ,path.name ,strcpy JSR2
366
-	#00 =path.length
367
+	;untitled_txt ;path/name ;strcpy JSR2
368
+	#00 .path/length POK
367 369
 
368 370
 RTN
369 371
 
370 372
 @clear ( -- )
371 373
 	
372
-	,data FILESIZE ,data ADD2
373
-	$loop
374
-		( write ) OVR2 #00 ROT ROT POK2
374
+	;data FILESIZE ;data ADD2
375
+	&loop
376
+		( write ) OVR2 #00 ROT ROT PUT
375 377
 		( incr ) SWP2 #0001 ADD2 SWP2
376
-		OVR2 OVR2 LTH2 ^$loop JNZ
378
+		OVR2 OVR2 LTH2 ,&loop JNZ
377 379
 	POP2 POP2
378
-	,redraw JSR2
380
+	;redraw JSR2
379 381
 
380 382
 RTN
381 383
 
382 384
 @present
383 385
 
384
-	~document.presentation #00 EQU =document.presentation
386
+	.document/presentation PEK #00 EQU .document/presentation POK
385 387
 
386
-	~document.presentation 
387
-	DUP #00 NEQ ^$skip0 JNZ
388
-		~theme.r0 =System.r ~theme.g0 =System.g ~theme.b0 =System.b 
389
-	$skip0
390
-	DUP #01 NEQ ^$skip1 JNZ
391
-		~theme.r1 =System.r ~theme.g1 =System.g ~theme.b1 =System.b 
392
-	$skip1
388
+	.document/presentation PEK
389
+	DUP #00 NEQ ,&skip0 JNZ
390
+		.theme/r0 PEK2 .System/r DEO2 .theme/g0 PEK2 .System/g DEO2 .theme/b0 PEK2 .System/b DEO2
391
+	&skip0
392
+	DUP #01 NEQ ,&skip1 JNZ
393
+		.theme/r1 PEK2 .System/r DEO2 .theme/g1 PEK2 .System/g DEO2 .theme/b1 PEK2 .System/b DEO2
394
+	&skip1
393 395
 	POP
394 396
 
395
-	~toolpane.x1 #0002 SUB2 ~toolpane.y1 #0002 SUB2 ~toolpane.x2 ++ ~toolpane.y2 ++ #00 ,fill-rect JSR2
396
-	~pattpane.x1 #0002 SUB2 ~pattpane.y1 #0002 SUB2 ~pattpane.x2 ++ ~pattpane.y2 ++ #00 ,fill-rect JSR2
397
-	~sizepane.x1 #0002 SUB2 ~sizepane.y1 #0002 SUB2 ~sizepane.x2 ++ ~sizepane.y2 ++ #00 ,fill-rect JSR2
398
-	~viewpane.x1 #0002 SUB2 ~viewpane.y1 #0002 SUB2 ~viewpane.x2 ++ ~viewpane.y2 ++ #00 ,fill-rect JSR2
397
+	.toolpane/x1 PEK2 #0002 SUB2 .toolpane/y1 PEK2 #0002 SUB2 .toolpane/x2 PEK2 ++ .toolpane/y2 PEK2 ++ #00 ;fill-rect JSR2
398
+	.pattpane/x1 PEK2 #0002 SUB2 .pattpane/y1 PEK2 #0002 SUB2 .pattpane/x2 PEK2 ++ .pattpane/y2 PEK2 ++ #00 ;fill-rect JSR2
399
+	.sizepane/x1 PEK2 #0002 SUB2 .sizepane/y1 PEK2 #0002 SUB2 .sizepane/x2 PEK2 ++ .sizepane/y2 PEK2 ++ #00 ;fill-rect JSR2
400
+	.viewpane/x1 PEK2 #0002 SUB2 .viewpane/y1 PEK2 #0002 SUB2 .viewpane/x2 PEK2 ++ .viewpane/y2 PEK2 ++ #00 ;fill-rect JSR2
399 401
 
400 402
 	( clear panes )
401
-	,redraw JSR2
403
+	;redraw JSR2
402 404
 
403 405
 RTN
404 406
 
405 407
 @fit-canvas
406 408
 	
407
-	~canvas.w 8* ~canvas.x1 ADD2 =canvas.x2 
408
-	~canvas.h 8* ~canvas.y1 ADD2 =canvas.y2 
409
-	~canvas.x1 -- ~canvas.y1 -- ~canvas.x2 ~canvas.y2 #01 ,line-rect JSR2
410
-	,draw-canvas JSR2
409
+	.canvas/w PEK2 8* .canvas/x1 PEK2 ADD2 .canvas/x2 POK2
410
+	.canvas/h PEK2 8* .canvas/y1 PEK2 ADD2 .canvas/y2 POK2
411
+	.canvas/x1 PEK2 -- .canvas/y1 PEK2 -- .canvas/x2 PEK2 .canvas/y2 PEK2 #01 ;line-rect JSR2
412
+	;draw-canvas JSR2
411 413
 
412 414
 RTN
413 415
 
414 416
 @paint-line ( x1 y1 x2 y2 -- )
415 417
 	
416
-	( load ) =line.y1 =line.x1 =line.y2 =line.x2
418
+	( load ) .line/y1 POK2 .line/x1 POK2 .line/y2 POK2 .line/x2 POK2
417 419
 
418 420
 	( trim if zoomed )
419
-	~zoom.active #01 NEQ ^$no-zoom JNZ
420
-		~line.x1 8/ ~zoom.x ADD2 =line.x1
421
-		~line.y1 8/ ~zoom.y ADD2 =line.y1
422
-		~line.x2 8/ ~zoom.x ADD2 =line.x2
423
-		~line.y2 8/ ~zoom.y ADD2 =line.y2
424
-	$no-zoom
425
-
426
-	~line.x1 ~line.x2 SUB2 ABS2 =line.dx
427
-	~line.y1 ~line.y2 SUB2 ABS2 #0000 SWP2 SUB2 =line.dy
428
-	#ffff #00 ~line.x2 ~line.x1 LTS2 #0002 MUL2 ADD2 =line.sx 
429
-	#ffff #00 ~line.y2 ~line.y1 LTS2 #0002 MUL2 ADD2 =line.sy 
430
-	~line.dx ~line.dy ADD2 =line.e1
431
-	$loop
432
-		( paint ) ~line.x2 ~line.y2 ~brush.oper JSR2
433
-		~line.x2 ~line.x1 EQU2 ~line.y2 ~line.y1 EQU2 #0101 EQU2 ^$end JNZ
434
-		~line.e1 #0002 MUL2 =line.e2
435
-		~line.e2 ~line.dy LTS2 ^$skipy JNZ
436
-			~line.e1 ~line.dy ADD2 =line.e1
437
-			~line.x2 ~line.sx ADD2 =line.x2
438
-		$skipy
439
-		~line.e2 ~line.dx GTS2 ^$skipx JNZ
440
-			~line.e1 ~line.dx ADD2 =line.e1
441
-			~line.y2 ~line.sy ADD2 =line.y2
442
-		$skipx
443
-		,$loop JMP2
444
-	$end
445
-
446
-	,draw-canvas JSR2
447
-	,draw-foreground JSR2
421
+	.zoom/active PEK #01 NEQ ,&no-zoom JNZ
422
+		.line/x1 PEK2 8/ .zoom/x PEK2 ADD2 .line/x1 POK2
423
+		.line/y1 PEK2 8/ .zoom/y PEK2 ADD2 .line/y1 POK2
424
+		.line/x2 PEK2 8/ .zoom/x PEK2 ADD2 .line/x2 POK2
425
+		.line/y2 PEK2 8/ .zoom/y PEK2 ADD2 .line/y2 POK2
426
+	&no-zoom
427
+
428
+	.line/x1 PEK2 .line/x2 PEK2 SUB2 ABS2 .line/dx POK2
429
+	.line/y1 PEK2 .line/y2 PEK2 SUB2 ABS2 #0000 SWP2 SUB2 .line/dy POK2
430
+	#ffff #00 .line/x2 PEK2 .line/x1 PEK2 LTS2 #0002 MUL2 ADD2 .line/sx POK2
431
+	#ffff #00 .line/y2 PEK2 .line/y1 PEK2 LTS2 #0002 MUL2 ADD2 .line/sy POK2
432
+	.line/dx PEK2 .line/dy PEK2 ADD2 .line/e1 POK2
433
+	&loop
434
+		( paint ) .line/x2 PEK2 .line/y2 PEK2 .brush/oper PEK2 JSR2
435
+		.line/x2 PEK2 .line/x1 PEK2 EQU2 .line/y2 PEK2 .line/y1 PEK2 EQU2 #0101 EQU2 ,&end JNZ
436
+		.line/e1 PEK2 #0002 MUL2 .line/e2 POK2
437
+		.line/e2 PEK2 .line/dy PEK2 LTS2 ,&skipy JNZ
438
+			.line/e1 PEK2 .line/dy PEK2 ADD2 .line/e1 POK2
439
+			.line/x2 PEK2 .line/sx PEK2 ADD2 .line/x2 POK2
440
+		&skipy
441
+		.line/e2 PEK2 .line/dx PEK2 GTS2 ,&skipx JNZ
442
+			.line/e1 PEK2 .line/dx PEK2 ADD2 .line/e1 POK2
443
+			.line/y2 PEK2 .line/sy PEK2 ADD2 .line/y2 POK2
444
+		&skipx
445
+		;&loop JMP2
446
+	&end
447
+
448
+	;draw-canvas JSR2
449
+	;draw-foreground JSR2
448 450
 
449 451
 RTN
450 452
 
451 453
 @paint-rect ( x1 y1 x2 y2 -- )
452 454
 
453
-	( load ) =rect.y2 =rect.x2 =rect.y1 =rect.x1
455
+	( load ) .rect/y2 POK2 .rect/x2 POK2 .rect/y1 POK2 .rect/x1 POK2
454 456
 
455 457
 	( trim if zoomed )
456
-	~zoom.active #01 NEQ ^$no-zoom JNZ
457
-		~rect.x1 8/ ~zoom.x ADD2 =rect.x1
458
-		~rect.y1 8/ ~zoom.y ADD2 =rect.y1
459
-		~rect.x2 8/ ~zoom.x ADD2 #0001 ADD2 =rect.x2
460
-		~rect.y2 8/ ~zoom.y ADD2 #0001 ADD2 =rect.y2
461
-	$no-zoom
462
-
463
-	~rect.x1 =pt2.x
464
-	~rect.y1 =pt2.y
465
-
466
-	$ver
467
-		~rect.x1 =pt2.x
468
-		$hor
469
-			~pt2.x SWP POP =px.x ~pt2.y SWP POP =px.y
470
-			,patternize JSR2 #00 EQU ^$no-pixel JNZ
471
-				( draw ) ~pt2.x ~pt2.y ~brush.oper JSR2 $no-pixel
472
-			( incr ) ~pt2.x ++ =pt2.x
473
-			~pt2.x ~rect.x2 LTS2 ^$hor JNZ
474
-		~pt2.y ++ =pt2.y
475
-		~pt2.y ~rect.y2 LTS2 ^$ver JNZ
476
-
477
-	,draw-canvas JSR2
478
-	,draw-foreground JSR2
458
+	.zoom/active PEK #01 NEQ ,&no-zoom JNZ
459
+		.rect/x1 PEK2 8/ .zoom/x PEK2 ADD2 .rect/x1 POK2
460
+		.rect/y1 PEK2 8/ .zoom/y PEK2 ADD2 .rect/y1 POK2
461
+		.rect/x2 PEK2 8/ .zoom/x PEK2 ADD2 #0001 ADD2 .rect/x2 POK2
462
+		.rect/y2 PEK2 8/ .zoom/y PEK2 ADD2 #0001 ADD2 .rect/y2 POK2
463
+	&no-zoom
464
+
465
+	.rect/x1 PEK2 .pt2/x POK2
466
+	.rect/y1 PEK2 .pt2/y POK2
467
+
468
+	&ver
469
+		.rect/x1 PEK2 .pt2/x POK2
470
+		&hor
471
+			.pt2/x PEK2 SWP POP .px/x POK .pt2/y PEK2 SWP POP .px/y POK
472
+			;patternize JSR2 #00 EQU ,&no-pixel JNZ
473
+				( draw ) .pt2/x PEK2 .pt2/y PEK2 .brush/oper PEK2 JSR2 &no-pixel
474
+			( incr ) .pt2/x PEK2 ++ .pt2/x POK2
475
+			.pt2/x PEK2 .rect/x2 PEK2 LTS2 ,&hor JNZ
476
+		.pt2/y PEK2 ++ .pt2/y POK2
477
+		.pt2/y PEK2 .rect/y2 PEK2 LTS2 ,&ver JNZ
478
+
479
+	;draw-canvas JSR2
480
+	;draw-foreground JSR2
479 481
 	
480 482
 RTN
481 483
 
482 484
 @paint-brush ( x y -- )
483 485
 
484
-	#0003 SUB2 =pt0.y #0003 SUB2 =pt0.x ( cursor offset )
486
+	#0003 SUB2 .pt0/y POK2 #0003 SUB2 .pt0/x POK2 ( cursor offset )
485 487
 
486 488
 	( trim if zoomed )
487
-	~zoom.active #01 NEQ ^$no-zoom JNZ
488
-		~pt0.x 8/ ~zoom.x ADD2 #0003 SUB2 =pt0.x
489
-		~pt0.y 8/ ~zoom.y ADD2 #0003 SUB2 =pt0.y
490
-	$no-zoom
491
-
492
-	#00 =px.x #00 =px.y 
493
-	$ver
494
-		#00 =px.x
495
-		$hor
496
-			( addr ) ,size_icns #00 ~brush.size 8* ADD2
497
-			( byte ) #00 ~px.y ADD2 PEK2 #07 ~px.x SUB SFT #01 AND 
498
-			#00 EQU ^$no-pixel JNZ
499
-			,patternize JSR2 #00 EQU ^$no-pixel JNZ
500
-				~pt0.x #00 ~px.x ADD2 ~pt0.y #00 ~px.y ADD2 ~brush.oper JSR2 $no-pixel
501
-			( incr ) ~px.x #01 ADD =px.x
502
-			~px.x #08 LTH ^$hor JNZ
503
-		( incr ) ~px.y #01 ADD =px.y
504
-		~px.y #08 LTH ^$ver JNZ
505
-
506
-	,draw-canvas JSR2
507
-	,draw-foreground JSR2
489
+	.zoom/active PEK #01 NEQ ,&no-zoom JNZ
490
+		.pt0/x PEK2 8/ .zoom/x PEK2 ADD2 #0003 SUB2 .pt0/x POK2
491
+		.pt0/y PEK2 8/ .zoom/y PEK2 ADD2 #0003 SUB2 .pt0/y POK2
492
+	&no-zoom
493
+
494
+	#00 .px/x POK #00 .px/y POK
495
+	&ver
496
+		#00 .px/x POK
497
+		&hor
498
+			( addr ) ;size_icns #00 .brush/size PEK 8* ADD2
499
+			( byte ) #00 .px/y PEK ADD2 GET #07 .px/x PEK SUB SFT #01 AND
500
+			#00 EQU ,&no-pixel JNZ
501
+			;patternize JSR2 #00 EQU ,&no-pixel JNZ
502
+				.pt0/x PEK2 #00 .px/x PEK ADD2 .pt0/y PEK2 #00 .px/y PEK ADD2 .brush/oper PEK2 JSR2 &no-pixel
503
+			( incr ) .px/x PEK #01 ADD .px/x POK
504
+			.px/x PEK #08 LTH ,&hor JNZ
505
+		( incr ) .px/y PEK #01 ADD .px/y POK
506
+		.px/y PEK #08 LTH ,&ver JNZ
507
+
508
+	;draw-canvas JSR2
509
+	;draw-foreground JSR2
508 510
 
509 511
 RTN
510 512
 
511 513
 @patternize ( -- )
512 514
 
513
-	~brush.patt #00 NEQ ^$noplain JNZ
514
-		#01 RTN $noplain
515
+	.brush/patt PEK #00 NEQ ,&noplain JNZ
516
+		#01 RTN &noplain
515 517
 
516
-	~brush.patt #01 NEQ ^$notone1 JNZ
517
-		~pt0.x #00 ~px.x ADD2 ~pt0.y #00 ~px.y ADD2 ADD2 #0001 AND2 #0000 EQU2 
518
-		~pt0.x #00 ~px.x ADD2 ~pt0.y #00 ~px.y ADD2 SUB2 #0001 AND2 #0000 EQU2 
518
+	.brush/patt PEK #01 NEQ ,&notone1 JNZ
519
+		.pt0/x PEK2 #00 .px/x PEK ADD2 .pt0/y PEK2 #00 .px/y PEK ADD2 ADD2 #0001 AND2 #0000 EQU2
520
+		.pt0/x PEK2 #00 .px/x PEK ADD2 .pt0/y PEK2 #00 .px/y PEK ADD2 SUB2 #0001 AND2 #0000 EQU2
519 521
 		#0101 EQU2
520
-		RTN $notone1
522
+		RTN &notone1
521 523
 
522
-	~brush.patt #02 NEQ ^$notone2 JNZ
523
-		~pt0.x #00 ~px.x ADD2 ~pt0.y #00 ~px.y ADD2 ADD2 #0003 AND2 #0000 EQU2 
524
-		~pt0.x #00 ~px.x ADD2 ~pt0.y #00 ~px.y ADD2 SUB2 #0003 AND2 #0000 EQU2 
524
+	.brush/patt PEK #02 NEQ ,&notone2 JNZ
525
+		.pt0/x PEK2 #00 .px/x PEK ADD2 .pt0/y PEK2 #00 .px/y PEK ADD2 ADD2 #0003 AND2 #0000 EQU2
526
+		.pt0/x PEK2 #00 .px/x PEK ADD2 .pt0/y PEK2 #00 .px/y PEK ADD2 SUB2 #0003 AND2 #0000 EQU2
525 527
 		#0101 EQU2
526
-		RTN $notone2
528
+		RTN &notone2
527 529
 
528
-	~brush.patt #03 NEQ ^$notone3 JNZ
529
-		~pt0.x #00 ~px.x ADD2 ~pt0.y #00 ~px.y ADD2 ADD2 #0005 AND2 #0000 EQU2 
530
-		~pt0.x #00 ~px.x ADD2 ~pt0.y #00 ~px.y ADD2 SUB2 #0005 AND2 #0000 EQU2 
530
+	.brush/patt PEK #03 NEQ ,&notone3 JNZ
531
+		.pt0/x PEK2 #00 .px/x PEK ADD2 .pt0/y PEK2 #00 .px/y PEK ADD2 ADD2 #0005 AND2 #0000 EQU2
532
+		.pt0/x PEK2 #00 .px/x PEK ADD2 .pt0/y PEK2 #00 .px/y PEK ADD2 SUB2 #0005 AND2 #0000 EQU2
531 533
 		#0101 EQU2
532
-		RTN $notone3
534
+		RTN &notone3
533 535
 
534
-	~brush.patt #04 NEQ ^$notone4 JNZ
535
-		~pt0.x #00 ~px.x ADD2 ~pt0.y #00 ~px.y ADD2 ADD2 #0003 AND2 #0000 EQU2 RTN $notone4
536
+	.brush/patt PEK #04 NEQ ,&notone4 JNZ
537
+		.pt0/x PEK2 #00 .px/x PEK ADD2 .pt0/y PEK2 #00 .px/y PEK ADD2 ADD2 #0003 AND2 #0000 EQU2 RTN &notone4
536 538
 
537
-	~brush.patt #05 NEQ ^$notone5 JNZ
538
-		~pt0.x #00 ~px.x ADD2 ~pt0.y #00 ~px.y ADD2 SUB2 #0003 AND2 #0000 EQU2 RTN $notone5
539
+	.brush/patt PEK #05 NEQ ,&notone5 JNZ
540
+		.pt0/x PEK2 #00 .px/x PEK ADD2 .pt0/y PEK2 #00 .px/y PEK ADD2 SUB2 #0003 AND2 #0000 EQU2 RTN &notone5
539 541
 
540
-	~brush.patt #06 NEQ ^$notone6 JNZ
541
-		~pt0.x #00 ~px.x ADD2 #0001 AND2 SWP POP RTN $notone6
542
+	.brush/patt PEK #06 NEQ ,&notone6 JNZ
543
+		.pt0/x PEK2 #00 .px/x PEK ADD2 #0001 AND2 SWP POP RTN &notone6
542 544
 
543
-	~brush.patt #07 NEQ ^$notone7 JNZ
544
-		~pt0.y #00 ~px.y ADD2 #0001 AND2 SWP POP RTN $notone7
545
+	.brush/patt PEK #07 NEQ ,&notone7 JNZ
546
+		.pt0/y PEK2 #00 .px/y PEK ADD2 #0001 AND2 SWP POP RTN &notone7
545 547
 
546 548
 	#00
547 549
 
... ...
@@ -549,31 +551,31 @@ RTN
549 551
 
550 552
 @get-pixel ( x y -- b )
551 553
 
552
-	SWP POP #07 AND =px.y
553
-	SWP POP #07 AND =px.x
554
-	( get tile ) ~pt1.x 8/ ~pt1.y 8/ ~canvas.w MUL2 ADD2 8*
555
-	( add addr ) ,data ADD2
556
-	#00 ~px.y ADD2 PEK2 #07 ~px.x SUB SFT #01 AND
554
+	SWP POP #07 AND .px/y POK
555
+	SWP POP #07 AND .px/x POK
556
+	( get tile ) .pt1/x PEK2 8/ .pt1/y PEK2 8/ .canvas/w PEK2 MUL2 ADD2 8*
557
+	( add addr ) ;data ADD2
558
+	#00 .px/y PEK ADD2 GET #07 .px/x PEK SUB SFT #01 AND
557 559
 
558 560
 RTN
559 561
 
560 562
 @add-pixel ( x y -- )
561 563
 
562
-	=pt1.y =pt1.x
563
-	( get tile addr ) ,data ~pt1.x 8/ ~pt1.y 8/ ~canvas.w MUL2 ADD2 8* ~pt1.y MOD8 ADD2 ADD2 
564
-	( load ) DUP2 PEK2
565
-	( mask ) #01 #07 ~pt1.x MOD8 SWP POP SUB SFL ORA
566
-	( save ) ROT ROT POK2
564
+	.pt1/y POK2 .pt1/x POK2
565
+	( get tile addr ) ;data .pt1/x PEK2 8/ .pt1/y PEK2 8/ .canvas/w PEK2 MUL2 ADD2 8* .pt1/y PEK2 MOD8 ADD2 ADD2
566
+	( load ) DUP2 GET
567
+	( mask ) #01 #07 .pt1/x PEK2 MOD8 SWP POP SUB SFL ORA
568
+	( save ) ROT ROT PUT
567 569
 
568 570
 RTN
569 571
 
570 572
 @remove-pixel ( x y -- )
571 573
 
572
-	=pt1.y =pt1.x
573
-	( get tile addr ) ,data ~pt1.x 8/ ~pt1.y 8/ ~canvas.w MUL2 ADD2 8* ~pt1.y MOD8 ADD2 ADD2 
574
-	( load ) DUP2 PEK2
575
-	( mask ) #01 #07 ~pt1.x MOD8 SWP POP SUB SFL #ff EOR AND
576
-	( save ) ROT ROT POK2
574
+	.pt1/y POK2 .pt1/x POK2
575
+	( get tile addr ) ;data .pt1/x PEK2 8/ .pt1/y PEK2 8/ .canvas/w PEK2 MUL2 ADD2 8* .pt1/y PEK2 MOD8 ADD2 ADD2
576
+	( load ) DUP2 GET
577
+	( mask ) #01 #07 .pt1/x PEK2 MOD8 SWP POP SUB SFL #ff EOR AND
578
+	( save ) ROT ROT PUT
577 579
 
578 580
 RTN
579 581
 
... ...
@@ -581,15 +583,15 @@ RTN
581 583
 
582 584
 @load-file ( path -- )
583 585
 
584
-	=File.name FILESIZE =File.length ,data =File.load
585
-	~File.name ,path.name ,strcpy JSR2
586
-	,draw-canvas JSR2
586
+	.File/name DEO2 FILESIZE .File/length DEO2 ;data .File/load DEO2
587
+	.File/name DEI2 ;path/name ;strcpy JSR2
588
+	;draw-canvas JSR2
587 589
 
588 590
 RTN
589 591
 
590 592
 @save-file ( path -- )
591 593
 
592
-	=File.name FILESIZE =File.length ,data =File.save
594
+	.File/name DEO2 FILESIZE .File/length DEO2 ;data .File/save DEO2
593 595
 
594 596
 RTN
595 597
 
... ...
@@ -597,207 +599,207 @@ RTN
597 599
 
598 600
 @redraw ( -- )
599 601
 	
600
-	,draw-background JSR2
601
-	,draw-canvas JSR2
602
-	,draw-foreground JSR2
602
+	;draw-background JSR2
603
+	;draw-canvas JSR2
604
+	;draw-foreground JSR2
603 605
 		
604 606
 RTN
605 607
 
606 608
 @draw-canvas ( -- )
607 609
 	
608
-	~zoom.active #01 EQU ,draw-canvas-zoom JNZ2
609
-
610
-	~canvas.y1 =Screen.y
611
-	,data =Screen.addr
612
-	$ver
613
-		~canvas.x1 =Screen.x 
614
-		$hor
615
-			( draw ) #29 =Screen.color
616
-			( incr ) ~Screen.x 8+ =Screen.x
617
-			( incr ) ~Screen.addr 8+ =Screen.addr
618
-		~Screen.x ~canvas.x2 NEQ2 ^$hor JNZ
619
-		( incr ) ~Screen.y 8+ =Screen.y
620
-	~Screen.y ~canvas.y2 NEQ2 ^$ver JNZ
610
+	.zoom/active PEK #01 EQU ;draw-canvas-zoom JNZ2
611
+
612
+	.canvas/y1 PEK2 .Screen/y DEO2
613
+	;data .Screen/addr DEO2
614
+	&ver
615
+		.canvas/x1 PEK2 .Screen/x DEO2
616
+		&hor
617
+			( draw ) #29 .Screen/color DEO
618
+			( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
619
+			( incr ) .Screen/addr DEI2 8+ .Screen/addr DEO2
620
+		.Screen/x DEI2 .canvas/x2 PEK2 NEQ2 ,&hor JNZ
621
+		( incr ) .Screen/y DEI2 8+ .Screen/y DEO2
622
+	.Screen/y DEI2 .canvas/y2 PEK2 NEQ2 ,&ver JNZ
621 623
 
622 624
 RTN
623 625
 
624 626
 @draw-canvas-zoom ( -- )
625 627
 	
626
-	~zoom.y =pt1.y
627
-	~canvas.y1 =Screen.y
628
-	,data =Screen.addr
629
-	$ver
630
-		~canvas.x1 =Screen.x 
631
-		~zoom.x =pt1.x
632
-		$hor
633
-			( incr ) ,bigpixel_icn #0008 #00 ~pt1.x ~pt1.y ,get-pixel JSR2 MUL2 ADD2 =Screen.addr
634
-			( draw ) #29 =Screen.color
635
-			( incr ) ~Screen.x 8+ =Screen.x
636
-			( incr ) ~pt1.x ++ =pt1.x
637
-		~Screen.x ~canvas.x2 NEQ2 ^$hor JNZ
638
-		( incr ) ~Screen.y 8+ =Screen.y
639
-		( incr ) ~pt1.y ++ =pt1.y
640
-	~Screen.y ~canvas.y2 NEQ2 ^$ver JNZ
628
+	.zoom/y PEK2 .pt1/y POK2
629
+	.canvas/y1 PEK2 .Screen/y DEO2
630
+	;data .Screen/addr DEO2
631
+	&ver
632
+		.canvas/x1 PEK2 .Screen/x DEO2
633
+		.zoom/x PEK2 .pt1/x POK2
634
+		&hor
635
+			( incr ) ;bigpixel_icn #0008 #00 .pt1/x PEK2 .pt1/y PEK2 ;get-pixel JSR2 MUL2 ADD2 .Screen/addr DEO2
636
+			( draw ) #29 .Screen/color DEO
637
+			( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
638
+			( incr ) .pt1/x PEK2 ++ .pt1/x POK2
639
+		.Screen/x DEI2 .canvas/x2 PEK2 NEQ2 ,&hor JNZ
640
+		( incr ) .Screen/y DEI2 8+ .Screen/y DEO2
641
+		( incr ) .pt1/y PEK2 ++ .pt1/y POK2
642
+	.Screen/y DEI2 .canvas/y2 PEK2 NEQ2 ,&ver JNZ
641 643
 
642 644
 RTN
643 645
 
644 646
 @draw-cursor ( -- )
645 647
 
646
-	,blank_icn =Screen.addr
648
+	;blank_icn .Screen/addr DEO2
647 649
 	( clear brush size )
648
-	~cursor.x #0003 SUB2 =Screen.x ~cursor.y #0003 SUB2 =Screen.y #30 =Screen.color
650
+	.cursor/x PEK2 #0003 SUB2 .Screen/x DEO2 .cursor/y PEK2 #0003 SUB2 .Screen/y DEO2 #30 .Screen/color DEO
649 651
 	( clear last cursor )
650
-	~cursor.x =Screen.x ~cursor.y =Screen.y #30 =Screen.color
652
+	.cursor/x PEK2 .Screen/x DEO2 .cursor/y PEK2 .Screen/y DEO2 #30 .Screen/color DEO
651 653
 	( record cursor positions )
652
-	~Mouse.x =cursor.x ~Mouse.y =cursor.y
654
+	.Mouse/x DEI2 .cursor/x POK2 .Mouse/y DEI2 .cursor/y POK2
653 655
 	( draw size cursor )
654
-	~brush.tool #01 NEQ ,$outside-canvas JNZ2
656
+	.brush/tool PEK #01 NEQ ;&outside-canvas JNZ2
655 657
 	( do not draw size when holding alt )
656
-	~Controller.button #02 EQU ,$outside-canvas JNZ2
657
-	~Mouse.x CLN2r ~canvas.x1 GTH2 STH2r ~canvas.x2 LTH2 #0101 NEQ2 ,$outside-canvas JNZ2
658
-	~Mouse.y CLN2r ~canvas.y1 GTH2 STH2r ~canvas.y2 LTH2 #0101 NEQ2 ,$outside-canvas JNZ2	
658
+	.Controller/button DEI #02 EQU ;&outside-canvas JNZ2
659
+	.Mouse/x DEI2 CLN2r .canvas/x1 PEK2 GTH2 STH2r .canvas/x2 PEK2 LTH2 #0101 NEQ2 ;&outside-canvas JNZ2
660
+	.Mouse/y DEI2 CLN2r .canvas/y1 PEK2 GTH2 STH2r .canvas/y2 PEK2 LTH2 #0101 NEQ2 ;&outside-canvas JNZ2	
659 661
 	( do not draw size in toolpane )
660
-	~Mouse.x CLN2r ~toolpane.x1 GTH2 STH2r ~toolpane.x2 LTH2 #0101 EQU2 ~Mouse.y CLN2r ~toolpane.y1 GTH2 STH2r ~toolpane.y2 LTH2 #0101 EQU2 #0101 EQU2 ,$outside-canvas JNZ2
661
-	~Mouse.x CLN2r ~sizepane.x1 GTH2 STH2r ~sizepane.x2 LTH2 #0101 EQU2 ~Mouse.y CLN2r ~sizepane.y1 GTH2 STH2r ~sizepane.y2 LTH2 #0101 EQU2 #0101 EQU2 ,$outside-canvas JNZ2
662
-	~Mouse.x CLN2r ~pattpane.x1 GTH2 STH2r ~pattpane.x2 LTH2 #0101 EQU2 ~Mouse.y CLN2r ~pattpane.y1 GTH2 STH2r ~pattpane.y2 LTH2 #0101 EQU2 #0101 EQU2 ,$outside-canvas JNZ2
663
-		~cursor.x #0003 SUB2 =Screen.x ~cursor.y #0003 SUB2 =Screen.y
664
-		,brush_icns #00 ~brush.size 8* ADD2 =Screen.addr
665
-		#31 ~Mouse.state #02 MUL ADD =Screen.color
666
-		~Mouse.state #00 EQU ^$outside-canvas JNZ RTN
667
-	$outside-canvas
662
+	.Mouse/x DEI2 CLN2r .toolpane/x1 PEK2 GTH2 STH2r .toolpane/x2 PEK2 LTH2 #0101 EQU2 .Mouse/y DEI2 CLN2r .toolpane/y1 PEK2 GTH2 STH2r .toolpane/y2 PEK2 LTH2 #0101 EQU2 #0101 EQU2 ;&outside-canvas JNZ2
663
+	.Mouse/x DEI2 CLN2r .sizepane/x1 PEK2 GTH2 STH2r .sizepane/x2 PEK2 LTH2 #0101 EQU2 .Mouse/y DEI2 CLN2r .sizepane/y1 PEK2 GTH2 STH2r .sizepane/y2 PEK2 LTH2 #0101 EQU2 #0101 EQU2 ;&outside-canvas JNZ2
664
+	.Mouse/x DEI2 CLN2r .pattpane/x1 PEK2 GTH2 STH2r .pattpane/x2 PEK2 LTH2 #0101 EQU2 .Mouse/y DEI2 CLN2r .pattpane/y1 PEK2 GTH2 STH2r .pattpane/y2 PEK2 LTH2 #0101 EQU2 #0101 EQU2 ;&outside-canvas JNZ2
665
+		.cursor/x PEK2 #0003 SUB2 .Screen/x DEO2 .cursor/y PEK2 #0003 SUB2 .Screen/y DEO2
666
+		;brush_icns #00 .brush/size PEK 8* ADD2 .Screen/addr DEO2
667
+		#31 .Mouse/state DEI #02 MUL ADD .Screen/color DEO
668
+		.Mouse/state DEI #00 EQU ,&outside-canvas JNZ RTN
669
+	&outside-canvas
668 670
 	( draw new cursor )
669
-	~cursor.x =Screen.x ~cursor.y =Screen.y
670
-	,pointers_icn #00 ~Controller.button #02 EQU 8* ADD2 =Screen.addr
671
-	#3f ~Mouse.state #01 EQU #0a MUL SUB =Screen.color
671
+	.cursor/x PEK2 .Screen/x DEO2 .cursor/y PEK2 .Screen/y DEO2
672
+	;pointers_icn #00 .Controller/button DEI #02 EQU 8* ADD2 .Screen/addr DEO2
673
+	#3f .Mouse/state DEI #01 EQU #0a MUL SUB .Screen/color DEO
672 674
 
673 675
 RTN
674 676
 
675 677
 @draw-toolpane ( -- )
676 678
 
677
-	~document.presentation #00 EQU ^$skip JNZ RTN $skip
679
+	.document/presentation PEK #00 EQU ,&skip JNZ RTN &skip
678 680
 
679
-	( frame )	
680
-	~toolpane.x1 -- ~toolpane.y1 -- ~toolpane.x2 ~toolpane.y2 #00 ,line-rect JSR2
681
-	~toolpane.x1 #0002 SUB2 ~toolpane.y1 #0002 SUB2 ~toolpane.x2 ~toolpane.y2 #01 ,line-rect JSR2
681
+	( frame ) 	
682
+	.toolpane/x1 PEK2 -- .toolpane/y1 PEK2 -- .toolpane/x2 PEK2 .toolpane/y2 PEK2 #00 ;line-rect JSR2
683
+	.toolpane/x1 PEK2 #0002 SUB2 .toolpane/y1 PEK2 #0002 SUB2 .toolpane/x2 PEK2 .toolpane/y2 PEK2 #01 ;line-rect JSR2
682 684
 
683
-	~toolpane.x1 =Screen.x ~toolpane.y1 =Screen.y ,tool_icns =Screen.addr
685
+	.toolpane/x1 PEK2 .Screen/x DEO2 .toolpane/y1 PEK2 .Screen/y DEO2 ;tool_icns .Screen/addr DEO2
684 686
 
685
-	$loop
686
-		( draw ) #21 ~Screen.x ~toolpane.x1 SUB2 8/ SWP POP ~brush.tool EQU #02 MUL ADD =Screen.color
687
-		( incr ) ~Screen.x 8+ =Screen.x
688
-		( incr ) ~Screen.addr 8+ =Screen.addr
689
-		~Screen.x ~toolpane.x2 LTH2 ^$loop JNZ
687
+	&loop
688
+		( draw ) #21 .Screen/x DEI2 .toolpane/x1 PEK2 SUB2 8/ SWP POP .brush/tool PEK EQU #02 MUL ADD .Screen/color DEO
689
+		( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
690
+		( incr ) .Screen/addr DEI2 8+ .Screen/addr DEO2
691
+		.Screen/x DEI2 .toolpane/x2 PEK2 LTH2 ,&loop JNZ
690 692
 
691
-	~zoom.active #01 NEQ ^$no-zoom JNZ
692
-		~Screen.x #0008 SUB2 =Screen.x
693
-		,tool_icns #0028 ADD2 =Screen.addr
694
-		#21 #04 ~brush.tool EQU #02 MUL ADD =Screen.color
695
-		$no-zoom
693
+	.zoom/active PEK #01 NEQ ,&no-zoom JNZ
694
+		.Screen/x DEI2 #0008 SUB2 .Screen/x DEO2
695
+		;tool_icns #0028 ADD2 .Screen/addr DEO2
696
+		#21 #04 .brush/tool PEK EQU #02 MUL ADD .Screen/color DEO
697
+		&no-zoom
696 698
 
697 699
 RTN
698 700
 
699 701
 @draw-pattpane ( -- )
700 702
 
701
-	~document.presentation #00 EQU ^$skip JNZ RTN $skip
703
+	.document/presentation PEK #00 EQU ,&skip JNZ RTN &skip
702 704
 
703
-	( frame )	
704
-	~pattpane.x1 -- ~pattpane.y1 -- ~pattpane.x2 ~pattpane.y2 #00 ,line-rect JSR2
705
-	~pattpane.x1 #0002 SUB2 ~pattpane.y1 #0002 SUB2 ~pattpane.x2 ~pattpane.y2 #01 ,line-rect JSR2
705
+	( frame ) 	
706
+	.pattpane/x1 PEK2 -- .pattpane/y1 PEK2 -- .pattpane/x2 PEK2 .pattpane/y2 PEK2 #00 ;line-rect JSR2
707
+	.pattpane/x1 PEK2 #0002 SUB2 .pattpane/y1 PEK2 #0002 SUB2 .pattpane/x2 PEK2 .pattpane/y2 PEK2 #01 ;line-rect JSR2
706 708
 
707
-	~pattpane.x1 =Screen.x ~pattpane.y1 =Screen.y ,patt_icns =Screen.addr
709
+	.pattpane/x1 PEK2 .Screen/x DEO2 .pattpane/y1 PEK2 .Screen/y DEO2 ;patt_icns .Screen/addr DEO2
708 710
 
709
-	$loop
710
-		( draw ) #21 ~Screen.x ~pattpane.x1 SUB2 8/ SWP POP ~brush.patt EQU #02 MUL ADD =Screen.color
711
-		( incr ) ~Screen.x 8+ =Screen.x
712
-		( incr ) ~Screen.addr 8+ =Screen.addr
713
-		~Screen.x ~pattpane.x2 LTH2 ^$loop JNZ
711
+	&loop
712
+		( draw ) #21 .Screen/x DEI2 .pattpane/x1 PEK2 SUB2 8/ SWP POP .brush/patt PEK EQU #02 MUL ADD .Screen/color DEO
713
+		( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
714
+		( incr ) .Screen/addr DEI2 8+ .Screen/addr DEO2
715
+		.Screen/x DEI2 .pattpane/x2 PEK2 LTH2 ,&loop JNZ
714 716
 
715 717
 RTN
716 718
 
717 719
 @draw-sizepane ( -- )
718 720
 
719
-	~document.presentation #00 EQU ^$skip JNZ RTN $skip
721
+	.document/presentation PEK #00 EQU ,&skip JNZ RTN &skip
720 722
 
721 723
 	( frame )
722
-	~sizepane.x1 -- ~sizepane.y1 -- ~sizepane.x2 ~sizepane.y2 #00 ,line-rect JSR2
723
-	~sizepane.x1 #0002 SUB2 ~sizepane.y1 #0002 SUB2 ~sizepane.x2 ~sizepane.y2 #01 ,line-rect JSR2
724
+	.sizepane/x1 PEK2 -- .sizepane/y1 PEK2 -- .sizepane/x2 PEK2 .sizepane/y2 PEK2 #00 ;line-rect JSR2
725
+	.sizepane/x1 PEK2 #0002 SUB2 .sizepane/y1 PEK2 #0002 SUB2 .sizepane/x2 PEK2 .sizepane/y2 PEK2 #01 ;line-rect JSR2
724 726
 
725
-	~sizepane.x1 =Screen.x ~sizepane.y1 =Screen.y ,size_icns =Screen.addr
727
+	.sizepane/x1 PEK2 .Screen/x DEO2 .sizepane/y1 PEK2 .Screen/y DEO2 ;size_icns .Screen/addr DEO2
726 728
 
727
-	$loop
728
-		( draw ) #21 ~Screen.x ~sizepane.x1 SUB2 8/ SWP POP ~brush.size EQU #02 MUL ADD =Screen.color
729
-		( incr ) ~Screen.x 8+ =Screen.x
730
-		( incr ) ~Screen.addr 8+ =Screen.addr
731
-		~Screen.x ~sizepane.x2 LTH2 ^$loop JNZ
729
+	&loop
730
+		( draw ) #21 .Screen/x DEI2 .sizepane/x1 PEK2 SUB2 8/ SWP POP .brush/size PEK EQU #02 MUL ADD .Screen/color DEO
731
+		( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
732
+		( incr ) .Screen/addr DEI2 8+ .Screen/addr DEO2
733
+		.Screen/x DEI2 .sizepane/x2 PEK2 LTH2 ,&loop JNZ
732 734
 
733 735
 RTN
734 736
 
735 737
 @draw-viewpane ( -- )
736 738
 	
737
-	~document.presentation #00 EQU ^$skip JNZ RTN $skip
739
+	.document/presentation PEK #00 EQU ,&skip JNZ RTN &skip
738 740
 
739 741
 	( frame )
740
-	~viewpane.x1 -- ~viewpane.y1 -- ~viewpane.x2 ~viewpane.y2 #00 ,line-rect JSR2
741
-	~viewpane.x1 #0002 SUB2 ~viewpane.y1 #0002 SUB2 ~viewpane.x2 ~viewpane.y2 #01 ,line-rect JSR2
742
+	.viewpane/x1 PEK2 -- .viewpane/y1 PEK2 -- .viewpane/x2 PEK2 .viewpane/y2 PEK2 #00 ;line-rect JSR2
743
+	.viewpane/x1 PEK2 #0002 SUB2 .viewpane/y1 PEK2 #0002 SUB2 .viewpane/x2 PEK2 .viewpane/y2 PEK2 #01 ;line-rect JSR2
742 744
 
743
-	~viewpane.x1 =Screen.x ~viewpane.y1 =Screen.y ,view_icns =Screen.addr
745
+	.viewpane/x1 PEK2 .Screen/x DEO2 .viewpane/y1 PEK2 .Screen/y DEO2 ;view_icns .Screen/addr DEO2
744 746
 
745
-	$loop
746
-		( draw ) #21 =Screen.color
747
-		( incr ) ~Screen.x 8+ =Screen.x
748
-		( incr ) ~Screen.addr 8+ =Screen.addr
749
-		~Screen.x ~viewpane.x2 LTH2 ^$loop JNZ
747
+	&loop
748
+		( draw ) #21 .Screen/color DEO
749
+		( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
750
+		( incr ) .Screen/addr DEI2 8+ .Screen/addr DEO2
751
+		.Screen/x DEI2 .viewpane/x2 PEK2 LTH2 ,&loop JNZ
750 752
 
751 753
 RTN
752 754
 
753 755
 @draw-foreground
754 756
 	
755
-	,draw-toolpane JSR2
756
-	,draw-pattpane JSR2
757
-	,draw-sizepane JSR2
758
-	,draw-viewpane JSR2
757
+	;draw-toolpane JSR2
758
+	;draw-pattpane JSR2
759
+	;draw-sizepane JSR2
760
+	;draw-viewpane JSR2
759 761
 
760 762
 RTN
761 763
 
762 764
 @draw-background
763 765
 	
764 766
 	( draw hor line )
765
-	#0000 ~Screen.width ~Screen.height #0002 DIV2 ~document.presentation #00 EQU ,line-horizontal-dotted JSR2
767
+	#0000 .Screen/width DEI2 .Screen/height DEI2 #0002 DIV2 .document/presentation PEK #00 EQU ;line-horizontal-dotted JSR2
766 768
 	( draw ver line )
767
-	~Screen.width #0002 DIV2 #0000 ~Screen.height ~document.presentation #00 EQU ,line-vertical-dotted JSR2
769
+	.Screen/width DEI2 #0002 DIV2 #0000 .Screen/height DEI2 .document/presentation PEK #00 EQU ;line-vertical-dotted JSR2
768 770
 
769
-	~document.presentation #01 EQU ,$skip-size JNZ2
771
+	.document/presentation PEK #01 EQU ;&skip-size JNZ2
770 772
 		( draw size )
771
-		#0010 =Screen.y
773
+		#0010 .Screen/y DEO2
772 774
 		( draw width )
773
-		~Screen.width #00a0 SUB2 =Screen.x ,font_hex ~canvas.w #f0 AND #04 SFT #08 MUL ADD2 =Screen.addr
774
-		( draw ) #21 =Screen.color
775
-		~Screen.x 8+ =Screen.x ,font_hex ~canvas.w #0f AND #08 MUL ADD2 =Screen.addr
776
-		( draw ) #21 =Screen.color
775
+		.Screen/width DEI2 #00a0 SUB2 .Screen/x DEO2 ;font_hex .canvas/w PEK2 #f0 AND #04 SFT #08 MUL ADD2 .Screen/addr DEO2
776
+		( draw ) #21 .Screen/color DEO
777
+		.Screen/x DEI2 8+ .Screen/x DEO2 ;font_hex .canvas/w PEK2 #0f AND #08 MUL ADD2 .Screen/addr DEO2
778
+		( draw ) #21 .Screen/color DEO
777 779
 		( draw height )
778
-		~Screen.x 8+ =Screen.x ,font_hex ~canvas.h #f0 AND #04 SFT #08 MUL ADD2 =Screen.addr
779
-		( draw ) #21 =Screen.color
780
-		~Screen.x 8+ =Screen.x ,font_hex ~canvas.h #0f AND #08 MUL ADD2 =Screen.addr
781
-		( draw ) #21 =Screen.color
782
-	$skip-size
780
+		.Screen/x DEI2 8+ .Screen/x DEO2 ;font_hex .canvas/h PEK2 #f0 AND #04 SFT #08 MUL ADD2 .Screen/addr DEO2
781
+		( draw ) #21 .Screen/color DEO
782
+		.Screen/x DEI2 8+ .Screen/x DEO2 ;font_hex .canvas/h PEK2 #0f AND #08 MUL ADD2 .Screen/addr DEO2
783
+		( draw ) #21 .Screen/color DEO
784
+	&skip-size
783 785
 
784 786
 	( draw save/load/guides icons )
785
-	~Screen.height #0010 SUB2 =Screen.y
786
-	~Screen.width #0028 SUB2 =Screen.x
787
-	,eye_icn #00 ~document.presentation #08 MUL ADD2 =Screen.addr
788
-	#23 =Screen.color
789
-	~Screen.x 8+ =Screen.x
790
-	,filestate_icn =Screen.addr
791
-	#23 =Screen.color
792
-	~Screen.x 8+ =Screen.x
793
-	,load_icn =Screen.addr
794
-	#23 =Screen.color
795
-	~Screen.x 8+ =Screen.x
796
-	,save_icn =Screen.addr
797
-	#23 =Screen.color
787
+	.Screen/height DEI2 #0010 SUB2 .Screen/y DEO2
788
+	.Screen/width DEI2 #0028 SUB2 .Screen/x DEO2
789
+	;eye_icn #00 .document/presentation PEK #08 MUL ADD2 .Screen/addr DEO2
790
+	#23 .Screen/color DEO
791
+	.Screen/x DEI2 8+ .Screen/x DEO2
792
+	;filestate_icn .Screen/addr DEO2
793
+	#23 .Screen/color DEO
794
+	.Screen/x DEI2 8+ .Screen/x DEO2
795
+	;load_icn .Screen/addr DEO2
796
+	#23 .Screen/color DEO
797
+	.Screen/x DEI2 8+ .Screen/x DEO2
798
+	;save_icn .Screen/addr DEO2
799
+	#23 .Screen/color DEO
798 800
 	
799
-	#0008 =Screen.x
800
-	,path.name #01 ,draw-label JSR2
801
+	#0008 .Screen/x DEO2
802
+	;path/name #01 ;draw-label JSR2
801 803
 
802 804
 RTN
803 805
 
... ...
@@ -805,92 +807,92 @@ RTN
805 807
 
806 808
 @line-rect ( x1 y1 x2 y2 color -- )
807 809
 
808
-	( load ) =color DUP2 STH2 =rect.y2 =rect.x2 DUP2 STH2 =rect.y1 =rect.x1
810
+	( load ) .color POK DUP2 STH2 .rect/y2 POK2 .rect/x2 POK2 DUP2 STH2 .rect/y1 POK2 .rect/x1 POK2
809 811
 	STH2r STH2r
810
-	$ver
811
-		( save ) OVR2 =Screen.y
812
-		( draw ) ~rect.x1 =Screen.x ~color DUP =Screen.color 
813
-		( draw ) ~rect.x2 =Screen.x =Screen.color
812
+	&ver
813
+		( save ) OVR2 .Screen/y DEO2
814
+		( draw ) .rect/x1 PEK2 .Screen/x DEO2 .color PEK DUP .Screen/color DEO
815
+		( draw ) .rect/x2 PEK2 .Screen/x DEO2 .Screen/color DEO
814 816
 		( incr ) SWP2 ++ SWP2
815
-		OVR2 OVR2 LTS2 ^$ver JNZ
817
+		OVR2 OVR2 LTS2 ,&ver JNZ
816 818
 	POP2 POP2
817
-	~rect.x1 ~rect.x2
818
-	$hor
819
-		( save ) OVR2 =Screen.x
820
-		( draw ) ~rect.y1 =Screen.y ~color DUP =Screen.color 
821
-		( draw ) ~rect.y2 =Screen.y =Screen.color
819
+	.rect/x1 PEK2 .rect/x2 PEK2
820
+	&hor
821
+		( save ) OVR2 .Screen/x DEO2
822
+		( draw ) .rect/y1 PEK2 .Screen/y DEO2 .color PEK DUP .Screen/color DEO
823
+		( draw ) .rect/y2 PEK2 .Screen/y DEO2 .Screen/color DEO
822 824
 		( incr ) SWP2 ++ SWP2
823
-		OVR2 OVR2 ++ LTS2 ^$hor JNZ
825
+		OVR2 OVR2 ++ LTS2 ,&hor JNZ
824 826
 	POP2 POP2
825 827
 
826 828
 RTN
827 829
 
828 830
 @fill-rect ( x1 y1 x2 y2 color -- )
829 831
 	
830
-	=color
832
+	.color POK
831 833
 	( x1 x2 y1 y2 ) ROT2 SWP2
832
-	$ver
833
-		( save ) OVR2 =Screen.y
834
-		STH2 STH2 OVR2 OVR2 
835
-		$hor
836
-			( save ) OVR2 =Screen.x
837
-			( draw ) ~color =Screen.color
834
+	&ver
835
+		( save ) OVR2 .Screen/y DEO2
836
+		STH2 STH2 OVR2 OVR2
837
+		&hor
838
+			( save ) OVR2 .Screen/x DEO2
839
+			( draw ) .color PEK .Screen/color DEO
838 840
 			( incr ) SWP2 ++ SWP2
839
-			OVR2 OVR2 LTS2 ^$hor JNZ
841
+			OVR2 OVR2 LTS2 ,&hor JNZ
840 842
 		POP2 POP2 STH2r STH2r
841 843
 		( incr ) SWP2 ++ SWP2
842
-		OVR2 OVR2 LTS2 ^$ver JNZ
844
+		OVR2 OVR2 LTS2 ,&ver JNZ
843 845
 	POP2 POP2 POP2 POP2
844 846
 
845 847
 RTN
846 848
 
847 849
 @draw-label ( addr color -- )
848 850
 	
849
-	=color 
850
-	$loop
851
-		DUP2 PEK2 #00 SWP #0008 MUL2 ,font ADD2 =Screen.addr
852
-		( draw ) ~color #20 ADD =Screen.color
851
+	.color POK
852
+	&loop
853
+		DUP2 GET #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
854
+		( draw ) .color PEK #20 ADD .Screen/color DEO
853 855
 		( incr ) #0001 ADD2
854
-		( incr ) ~Screen.x 8+ =Screen.x
855
-		( loop ) DUP2 PEK2 #00 NEQ ^$loop JNZ
856
+		( incr ) .Screen/x DEI2 8+ .Screen/x DEO2
857
+		( loop ) DUP2 GET #00 NEQ ,&loop JNZ
856 858
 	POP2
857 859
 
858 860
 RTN
859 861
 
860 862
 @line-horizontal-dotted ( x0 x1 y color -- )
861 863
 	
862
-	=color =Screen.y OVR2 =Screen.x
863
-	$draw-hor
864
-		( draw ) ~color =Screen.color
865
-		( incr ) SWP2 #0002 ADD2 DUP2 =Screen.x SWP2
866
-		OVR2 OVR2 LTH2 ^$draw-hor JNZ
864
+	.color POK .Screen/y DEO2 OVR2 .Screen/x DEO2
865
+	&draw-hor
866
+		( draw ) .color PEK .Screen/color DEO
867
+		( incr ) SWP2 #0002 ADD2 DUP2 .Screen/x DEO2 SWP2
868
+		OVR2 OVR2 LTH2 ,&draw-hor JNZ
867 869
 	POP2 POP2
868 870
 
869 871
 RTN
870 872
 
871 873
 @line-vertical-dotted ( x y0 y1 color -- )
872 874
 	
873
-	=color STH2 SWP2 =Screen.x STH2r OVR2 =Screen.y
874
-	$draw-ver
875
-		( draw ) ~color =Screen.color
876
-		( incr ) SWP2 #0002 ADD2 DUP2 =Screen.y SWP2
877
-		OVR2 OVR2 LTH2 ^$draw-ver JNZ
875
+	.color POK STH2 SWP2 .Screen/x DEO2 STH2r OVR2 .Screen/y DEO2
876
+	&draw-ver
877
+		( draw ) .color PEK .Screen/color DEO
878
+		( incr ) SWP2 #0002 ADD2 DUP2 .Screen/y DEO2 SWP2
879
+		OVR2 OVR2 LTH2 ,&draw-ver JNZ
878 880
 	POP2 POP2
879 881
 
880 882
 RTN
881 883
 
882 884
 @strcpy ( src* dst* -- )
883 885
 
884
-	$loop
885
-		( copy src->dst ) OVR2 OVR2 SWP2 PEK2 ROT ROT POK2
886
+	&loop
887
+		( copy src->dst ) OVR2 OVR2 SWP2 GET ROT ROT PUT
886 888
 		( incr dst ) ++
887 889
 		( incr src ) SWP2 ++ SWP2
888
-		OVR2 PEK2 #00 NEQ ^$loop JNZ
889
-	#00 ROT ROT POK2 POP2
890
+		OVR2 GET #00 NEQ ,&loop JNZ
891
+	#00 ROT ROT PUT POP2
890 892
 	
891 893
 RTN
892 894
 
893
-@size_icns    
895
+@size_icns
894 896
 	[ 0000 0010 0000 0000 ]
895 897
 	[ 0000 1038 1000 0000 ]
896 898
 	[ 0000 3838 3800 0000 ]
... ...
@@ -900,7 +902,7 @@ RTN
900 902
 	[ 387c fefe fe7c 3800 ]
901 903
 	[ 7cfe fefe fefe 7c00 ]
902 904
 
903
-@patt_icns 
905
+@patt_icns
904 906
 	[ fefe fefe fefe fe00 ]
905 907
 	[ fed6 aad6 aad6 fe00 ]
906 908
 	[ fe92 82d6 8292 fe00 ]
... ...
@@ -910,7 +912,7 @@ RTN
910 912
 	[ feaa aaaa aaaa fe00 ]	
911 913
 	[ fe82 fe82 fe82 fe00 ]
912 914
 
913
-@tool_icns 
915
+@tool_icns
914 916
 	[ c0e0 5028 140a 0400 ]
915 917
 	[ e0d0 a844 2212 0c00 ]
916 918
 	[ c0b8 4848 7804 0200 ]
... ...
@@ -918,13 +920,13 @@ RTN
918 920
 	[ 3048 8484 4834 0200 ] ( zoom )
919 921
 	[ 3245 8284 4834 0200 ] ( zoom out )
920 922
 
921
-@view_icns 
923
+@view_icns
922 924
 	[ ee92 8a84 8a92 ee00 ]
923 925
 	[ f68a 92a2 928a f600 ]
924 926
 	[ fe82 8244 aa92 ee00 ]
925 927
 	[ fe82 92aa 4482 fe00 ]
926 928
 
927
-@brush_icns 
929
+@brush_icns
928 930
 	[ 0000 0010 0000 0000 ]
929 931
 	[ 0000 1028 1000 0000 ]
930 932
 	[ 0000 3828 3800 0000 ]
... ...
@@ -935,7 +937,7 @@ RTN
935 937
 	[ 7c82 8282 8282 7c00 ]
936 938
 	[ 7cfe fefe fefe 7c00 ]
937 939
 
938
-@bigpixel_icn 
940
+@bigpixel_icn
939 941
 	[ 5580 0080 0080 0080 ]
940 942
 	[ 55ff 7fff 7fff 7fff ]
941 943
 
... ...
@@ -952,21 +954,21 @@ RTN
952 954
 @save_icn       [ fe82 8282 848a f400 ]
953 955
 
954 956
 @blank_icn      [ 0000 0000 0000 0000 ]
955
-@untitled_txt   [ untitled.bit 00 ]
957
+@untitled_txt   [ "untitled.bit 00 ]
956 958
 
957
-@font_hex ( 0-F TODO: should pull from @font instead.. ) 
959
+@font_hex ( 0-F TODO: should pull from @font instead.. )
958 960
 [
959 961
 	003c 464a 5262 3c00 0018 0808 0808 1c00
960 962
 	003c 4202 3c40 7e00 003c 421c 0242 3c00
961 963
 	000c 1424 447e 0400 007e 407c 0242 3c00
962 964
 	003c 407c 4242 3c00 007e 0204 0810 1000
963 965
 	003c 423c 4242 3c00 003c 4242 3e02 3c00
964
-	003c 4242 7e42 4200 007c 427c 4242 7c00 
965
-	003c 4240 4042 3c00 007c 4242 4242 7c00 
966
+	003c 4242 7e42 4200 007c 427c 4242 7c00
967
+	003c 4240 4042 3c00 007c 4242 4242 7c00
966 968
 	007e 4078 4040 7e00 007e 4078 4040 4000
967 969
 ]
968 970
 
969
-@font ( spectrum-zx font ) 
971
+@font ( spectrum-zx font )
970 972
 [
971 973
 	0000 0000 0000 0000 0000 2400 7e3c 0000 0000 2400 3c42 0000 0000 6c7c 7c38 1000
972 974
 	0010 387c 7c38 1000 0038 387c 6c10 3800 0010 387c 7c10 3800 0000 0018 1800 0000
... ...
@@ -1,4 +1,4 @@
1
-( Orca 
1
+( Orca
2 2
 	
3 3
 	TODO
4 4
 		- Synthax highlight
... ...
@@ -21,145 +21,145 @@
21 21
 %DATA-LOCKS { #3000 }
22 22
 %DATA-TYPES { #4000 }
23 23
 
24
-%GET-CHAR { #24 MOD #00 SWP ,b36clc ADD2 PEK2 } ( b36 -- char )
25
-%GET-VALUE { #20 SUB #00 SWP ,values ADD2 PEK2 } ( char -- b36 )
24
+%GET-CHAR { #24 MOD #00 SWP ;b36clc ADD2 GET } ( b36 -- char )
25
+%GET-VALUE { #20 SUB #00 SWP ;values ADD2 GET } ( char -- b36 )
26 26
 
27
-%GET-INDEX { #00 SWP #00 ~grid.width MUL2 ROT #00 SWP ADD2 } ( x y -- index )
28
-%GET-CELL { GET-INDEX DATA-CELLS ADD2 PEK2 } ( x y -- char )
29
-%SET-CELL { ROT ROT GET-INDEX DATA-CELLS ADD2 POK2 } ( x y char -- )
30
-%GET-TYPE { GET-INDEX DATA-TYPES ADD2 PEK2 } ( x y -- type )
31
-%SET-TYPE { ROT ROT GET-INDEX DATA-TYPES ADD2 POK2 } ( x y type -- )
32
-%GET-LOCK { GET-INDEX DATA-TYPES ADD2 PEK2 } ( x y -- type )
33
-%SET-LOCK { ROT ROT GET-INDEX DATA-TYPES ADD2 POK2 } ( x y type -- )
27
+%GET-INDEX { #00 SWP #00 .grid/width PEK MUL2 ROT #00 SWP ADD2 } ( x y -- index )
28
+%GET-CELL { GET-INDEX DATA-CELLS ADD2 GET } ( x y -- char )
29
+%SET-CELL { ROT ROT GET-INDEX DATA-CELLS ADD2 PUT } ( x y char -- )
30
+%GET-TYPE { GET-INDEX DATA-TYPES ADD2 GET } ( x y -- type )
31
+%SET-TYPE { ROT ROT GET-INDEX DATA-TYPES ADD2 PUT } ( x y type -- )
32
+%GET-LOCK { GET-INDEX DATA-TYPES ADD2 GET } ( x y -- type )
33
+%SET-LOCK { ROT ROT GET-INDEX DATA-TYPES ADD2 PUT } ( x y type -- )
34 34
 %GET-PORT { } ( x y lock -- char )
35 35
 %SET-PORT { } ( x y char -- )
36 36
 
37 37
 %GET-CELL-VALUE { GET-CELL GET-VALUE } ( x y -- b36 )
38 38
 
39
-( variables )
39
+( devices )
40 40
 
41
-;timer { byte 1 frame 1 speed 1 }
42
-;grid { width 1 height 1 }
43
-;selection { x1 1 y1 1 x2 1 y2 1 }
44
-;cursor { x 2 y 2 }
41
+|00 @System [ &vector $2 &pad $6 &r $2 &g $2 &b $2 ]
42
+|10 @Console [ &vector $2 &pad $6 &char $1 &byte $1 &short $2 &string $2 ]
43
+|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
44
+|40 @Controller [ &vector $2 &button $1 &key $1 ]
45
+|60 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &chord $1 ]
45 46
 
46
-( devices )
47
+( variables )
47 48
 
48
-|0100 ;System { vector 2 pad 6 r 2 g 2 b 2 }
49
-|0110 ;Console { vector 2 pad 6 char 1 byte 1 short 2 string 2 }
50
-|0120 ;Screen { vector 2 width 2 height 2 pad 2 x 2 y 2 addr 2 color 1 }
51
-|0140 ;Controller { vector 2 button 1 key 1 }
52
-|0160 ;Mouse  { vector 2 x 2 y 2 state 1 chord 1 }
49
+@timer [ &byte $1 &frame $1 &speed $1 ]
50
+@grid [ &width $1 &height $1 ]
51
+@selection [ &x1 $1 &y1 $1 &x2 $1 &y2 $1 ]
52
+@cursor [ &x $2 &y $2 ]
53 53
 
54
-|0200
54
+|0100
55 55
 
56
-	( theme ) #08f3 =System.r #08fc =System.g #08f9 =System.b
57
-	( vectors ) ,on-button =Controller.vector
58
-	( vectors ) ,on-mouse =Mouse.vector
59
-	( vectors ) ,on-frame =Screen.vector
56
+	( theme ) #08f3 .System/r DEO2 #08fc .System/g DEO2 #08f9 .System/b DEO2
57
+	( vectors ) ;on-button .Controller/vector DEO2
58
+	( vectors ) ;on-mouse .Mouse/vector DEO2
59
+	( vectors ) ;on-frame .Screen/vector DEO2
60 60
 
61 61
 	( find size )
62
-	~Screen.width 8/ SWP POP =grid.width
63
-	~Screen.height 8/ SWP POP #02 SUB =grid.height
62
+	.Screen/width DEI2 8/ SWP POP .grid/width POK
63
+	.Screen/height DEI2 8/ SWP POP #02 SUB .grid/height POK
64 64
 
65 65
 	( fill grid with dots )
66 66
 
67
-	,start JSR2
68
-	,redraw JSR2
67
+	;start JSR2
68
+	;redraw JSR2
69 69
 
70 70
 BRK
71 71
 
72 72
 @on-frame
73 73
 
74
-	~timer ++ DUP =timer
74
+	.timer PEK ++ DUP .timer POK
75 75
 
76
-	( skip ) #08 EQU ^$tick JNZ BRK $tick
76
+	( skip ) #08 EQU ,&tick JNZ BRK &tick
77 77
 
78
-	~timer.frame ++ =timer.frame
78
+	.timer/frame PEK ++ .timer/frame POK
79 79
 
80
-	,run JSR2
80
+	;run JSR2
81 81
 
82
-	#00 =timer
82
+	#00 .timer POK
83 83
 
84 84
 BRK
85 85
 
86 86
 @on-button
87 87
 	
88
-	~Controller.key #00 EQU ^$no-key JNZ
89
-		~selection.x1 ~selection.y1 ~Controller.key SET-CELL
90
-		,redraw JSR2
91
-	$no-key
88
+	.Controller/key DEI #00 EQU ,&no-key JNZ
89
+		.selection/x1 PEK .selection/y1 PEK .Controller/key DEI SET-CELL
90
+		;redraw JSR2
91
+	&no-key
92 92
 
93 93
 	( arrows )
94
-	~Controller.button #f0 AND
95
-		DUP #04 SFT #01 AND #01 NEQ ^$no-up JNZ 
96
-			~selection.y1 #00 EQU ^$no-up JNZ
97
-			~selection.y1 -- =selection.y1 
98
-			~selection.y2 -- =selection.y2 $no-up
99
-		DUP #05 SFT #01 AND #01 NEQ ^$no-down JNZ 
100
-			~selection.y1 ~grid.height -- EQU ^$no-down JNZ
101
-			~selection.y1 ++ =selection.y1 
102
-			~selection.y2 ++ =selection.y2 $no-down
103
-		DUP #06 SFT #01 AND #01 NEQ ^$no-left JNZ 
104
-			~selection.x1 #00 EQU ^$no-left JNZ
105
-			~selection.x1 -- =selection.x1 
106
-			~selection.x2 -- =selection.x2 $no-left
107
-		DUP #07 SFT #01 AND #01 NEQ ^$no-right JNZ 
108
-			~selection.x1 ~grid.width -- EQU ^$no-right JNZ
109
-			~selection.x1 ++ =selection.x1 
110
-			~selection.x2 ++ =selection.x2 $no-right
94
+	.Controller/button DEI #f0 AND
95
+		DUP #04 SFT #01 AND #01 NEQ ,&no-up JNZ
96
+			.selection/y1 PEK #00 EQU ,&no-up JNZ
97
+			.selection/y1 PEK -- .selection/y1 POK
98
+			.selection/y2 PEK -- .selection/y2 POK &no-up
99
+		DUP #05 SFT #01 AND #01 NEQ ,&no-down JNZ
100
+			.selection/y1 PEK .grid/height PEK -- EQU ,&no-down JNZ
101
+			.selection/y1 PEK ++ .selection/y1 POK
102
+			.selection/y2 PEK ++ .selection/y2 POK &no-down
103
+		DUP #06 SFT #01 AND #01 NEQ ,&no-left JNZ
104
+			.selection/x1 PEK #00 EQU ,&no-left JNZ
105
+			.selection/x1 PEK -- .selection/x1 POK
106
+			.selection/x2 PEK -- .selection/x2 POK &no-left
107
+		DUP #07 SFT #01 AND #01 NEQ ,&no-right JNZ
108
+			.selection/x1 PEK .grid/width PEK -- EQU ,&no-right JNZ
109
+			.selection/x1 PEK ++ .selection/x1 POK
110
+			.selection/x2 PEK ++ .selection/x2 POK &no-right
111 111
 	POP
112 112
 
113
-	~Controller.key #08 NEQ ^$no-backspace JNZ
114
-		~selection.x1 ~selection.y1 #2e SET-CELL ( put . char )
115
-	$no-backspace
113
+	.Controller/key DEI #08 NEQ ,&no-backspace JNZ
114
+		.selection/x1 PEK .selection/y1 PEK #2e SET-CELL ( put . char )
115
+	&no-backspace
116 116
 
117
-	,redraw JSR2
117
+	;redraw JSR2
118 118
 
119 119
 BRK
120 120
 
121 121
 @on-mouse
122 122
 	
123
-	~Mouse.state #00 EQU ^$no-touch JNZ
124
-		~Mouse.x 8/ SWP POP =selection.x1
125
-		~Mouse.y 8/ SWP POP =selection.y1
126
-		,redraw JSR2
127
-	$no-touch
123
+	.Mouse/state DEI #00 EQU ,&no-touch JNZ
124
+		.Mouse/x DEI2 8/ SWP POP .selection/x1 POK
125
+		.Mouse/y DEI2 8/ SWP POP .selection/y1 POK
126
+		;redraw JSR2
127
+	&no-touch
128 128
 
129 129
 	( clear last cursor )
130
-	~cursor.x =Screen.x
131
-	~cursor.y =Screen.y
132
-	,blank_icn =Screen.addr
133
-	#30 =Screen.color
130
+	.cursor/x PEK2 .Screen/x DEO2
131
+	.cursor/y PEK2 .Screen/y DEO2
132
+	;blank_icn .Screen/addr DEO2
133
+	#30 .Screen/color DEO
134 134
 
135 135
 	( record cursor positions )
136
-	~Mouse.x =cursor.x 
137
-	~Mouse.y =cursor.y
136
+	.Mouse/x DEI2 .cursor/x POK2
137
+	.Mouse/y DEI2 .cursor/y POK2
138 138
 
139 139
 	( draw new cursor )
140
-	~cursor.x =Screen.x
141
-	~cursor.y =Screen.y
142
-	,cursor_icn =Screen.addr
143
-	#32 ~Mouse.state #01 EQU ADD =Screen.color
140
+	.cursor/x PEK2 .Screen/x DEO2
141
+	.cursor/y PEK2 .Screen/y DEO2
142
+	;cursor_icn .Screen/addr DEO2
143
+	#32 .Mouse/state DEI #01 EQU ADD .Screen/color DEO
144 144
 	
145 145
 BRK
146 146
 
147 147
 @start ( -- )
148 148
 	
149
-	#00 ~grid.height
150
-	$ver
151
-		#00 ~grid.width
152
-		$hor
153
-			( get x,y ) SWP2 OVR STH SWP2 OVR STHr 
149
+	#00 .grid/height PEK
150
+	&ver
151
+		#00 .grid/width PEK
152
+		&hor
153
+			( get x,y ) SWP2 OVR STH SWP2 OVR STHr
154 154
 			#2e SET-CELL
155
-			( incr )    SWP ++ SWP
156
-			DUP2 LTH ^$hor JNZ
155
+			( incr ) SWP ++ SWP
156
+			DUP2 LTH ,&hor JNZ
157 157
 		POP2
158 158
 		( incr ) SWP ++ SWP
159
-		DUP2 LTH ^$ver JNZ
159
+		DUP2 LTH ,&ver JNZ
160 160
 	POP2
161 161
 
162
-	#9a =timer.speed
162
+	#9a .timer/speed POK
163 163
 
164 164
 RTN
165 165
 
... ...
@@ -172,7 +172,7 @@ RTN
172 172
 
173 173
 @is-selected ( x y -- flag )
174 174
 	
175
-	~selection.x1 ~selection.y1 EQU2
175
+	.selection/x1 PEK .selection/y1 PEK EQU2
176 176
 
177 177
 RTN
178 178
 
... ...
@@ -190,17 +190,17 @@ RTN
190 190
 
191 191
 @get-cell-sprite ( x y -- addr )
192 192
 	
193
-	DUP2 GET-CELL 
193
+	DUP2 GET-CELL
194 194
 	( if character is dot )
195
-	DUP #2e NEQ ^$no-bar JNZ
195
+	DUP #2e NEQ ,&no-bar JNZ
196 196
 		( check if x,y is grid )
197 197
 		POP
198
-		DUP2 #08 MOD #00 EQU SWP #08 MOD #00 EQU #0101 NEQ2 ^$no-marker8 JNZ POP2 ,marker8_icn RTN $no-marker8
199
-		DUP2 #02 MOD #00 EQU SWP #02 MOD #00 EQU #0101 NEQ2 ^$no-marker4 JNZ POP2 ,marker4_icn RTN $no-marker4
200
-		POP2 ,font RTN
201
-	$no-bar
198
+		DUP2 #08 MOD #00 EQU SWP #08 MOD #00 EQU #0101 NEQ2 ,&no-marker8 JNZ POP2 ;marker8_icn RTN &no-marker8
199
+		DUP2 #02 MOD #00 EQU SWP #02 MOD #00 EQU #0101 NEQ2 ,&no-marker4 JNZ POP2 ;marker4_icn RTN &no-marker4
200
+		POP2 ;font RTN
201
+	&no-bar
202 202
 	STH POP2 STHr
203
-	#20 SUB #00 SWP #0008 MUL2 ,font ADD2
203
+	#20 SUB #00 SWP #0008 MUL2 ;font ADD2
204 204
 
205 205
 RTN
206 206
 
... ...
@@ -211,9 +211,9 @@ RTN
211 211
 	POP
212 212
 	( get left ) DUP2 SWP -- SWP GET-CELL-VALUE STH
213 213
 	( get right ) DUP2 SWP ++ SWP GET-CELL-VALUE STH
214
-	( incr y ) ++ 
214
+	( incr y ) ++
215 215
 	( get result ) ADDr STHr
216
-	GET-CHAR 
216
+	GET-CHAR
217 217
 	SET-CELL
218 218
 
219 219
 RTN
... ...
@@ -223,9 +223,9 @@ RTN
223 223
 	POP
224 224
 	( get left ) DUP2 SWP -- SWP GET-CELL-VALUE STH
225 225
 	( get right ) DUP2 SWP ++ SWP GET-CELL-VALUE STH
226
-	( incr y ) ++ 
227
-	( get result ) SUBr STHr 
228
-	GET-CHAR 
226
+	( incr y ) ++
227
+	( get result ) SUBr STHr
228
+	GET-CHAR
229 229
 	SET-CELL
230 230
 
231 231
 	( NOTE: Issue is not with modulo, but with converting ff to 36 )
... ...
@@ -236,7 +236,7 @@ RTN
236 236
 	
237 237
 	POP
238 238
 	++
239
-	#30 ~timer.frame #08 MOD ADD SET-CELL
239
+	#30 .timer/frame PEK #08 MOD ADD SET-CELL
240 240
 
241 241
 RTN
242 242
 
... ...
@@ -304,13 +304,13 @@ RTN
304 304
 	
305 305
 	STH
306 306
 	( limit )
307
-	DUP #00 NEQ ^$not-edge JNZ
308
-		#2a SET-CELL POP STHr RTN 
309
-	$not-edge
307
+	DUP #00 NEQ ,&not-edge JNZ
308
+		#2a SET-CELL POP STHr RTN
309
+	&not-edge
310 310
 	( collide )
311
-	DUP2 -- GET-CELL #2e EQU ^$not-collide JNZ
311
+	DUP2 -- GET-CELL #2e EQU ,&not-collide JNZ
312 312
 		#2a SET-CELL POP STHr RTN
313
-	$not-collide
313
+	&not-collide
314 314
 	( move )
315 315
 	DUP2 STHr
316 316
 	SWP -- SWP SET-CELL	
... ...
@@ -344,7 +344,7 @@ RTN
344 344
 
345 345
 @op-s ( x y char -- )
346 346
 	
347
-	STH 
347
+	STH
348 348
 	( clear ) DUP2 #2e SET-CELL
349 349
 	( move ) ++ DUP2 #01 SET-LOCK
350 350
 	STHr SET-CELL
... ...
@@ -373,15 +373,15 @@ RTN
373 373
 
374 374
 	STH
375 375
 	( limit )
376
-	OVR #00 NEQ ^$not-edge JNZ
377
-		#2a SET-CELL POP STHr RTN 
378
-	$not-edge
376
+	OVR #00 NEQ ,&not-edge JNZ
377
+		#2a SET-CELL POP STHr RTN
378
+	&not-edge
379 379
 	( collide )
380
-	DUP2 SWP -- SWP GET-CELL #2e EQU ^$not-collide JNZ
380
+	DUP2 SWP -- SWP GET-CELL #2e EQU ,&not-collide JNZ
381 381
 		#2a SET-CELL POP STHr RTN
382
-	$not-collide
382
+	&not-collide
383 383
 	( move )
384
-	DUP2 
384
+	DUP2
385 385
 	SWP -- SWP STHr SET-CELL	
386 386
 	#2e SET-CELL
387 387
 	
... ...
@@ -415,149 +415,149 @@ RTN
415 415
 @run-char ( x y char -- )
416 416
 	
417 417
 	( skip dot )
418
-	DUP #2e NEQ ^$not-dot JNZ
418
+	DUP #2e NEQ ,&not-dot JNZ
419 419
 		POP POP2 RTN
420
-	$not-dot
420
+	&not-dot
421 421
 
422 422
 	( skip locked )
423
-	ROT ROT DUP2 GET-LOCK #00 EQU ^$not-locked JNZ
424
-		POP POP2 RTN 
425
-	$not-locked
423
+	ROT ROT DUP2 GET-LOCK #00 EQU ,&not-locked JNZ
424
+		POP POP2 RTN
425
+	&not-locked
426 426
 	ROT
427 427
 
428
-	( A ) DUP #41 EQU ,op-a JNZ2 ( B ) DUP #42 EQU ,op-b JNZ2
429
-	( C ) DUP #43 EQU ,op-c JNZ2 ( D ) DUP #44 EQU ,op-d JNZ2
430
-	( E ) DUP #45 EQU ,op-e JNZ2 ( F ) DUP #46 EQU ,op-f JNZ2
431
-	( G ) DUP #47 EQU ,op-g JNZ2 ( H ) DUP #48 EQU ,op-h JNZ2
432
-	( I ) DUP #49 EQU ,op-i JNZ2 ( J ) DUP #4a EQU ,op-j JNZ2
433
-	( K ) DUP #4b EQU ,op-k JNZ2 ( L ) DUP #4c EQU ,op-l JNZ2
434
-	( M ) DUP #4d EQU ,op-m JNZ2 ( N ) DUP #4e EQU ,op-n JNZ2 
435
-	( O ) DUP #4f EQU ,op-o JNZ2 ( P ) DUP #50 EQU ,op-p JNZ2
436
-	( Q ) DUP #51 EQU ,op-q JNZ2 ( R ) DUP #52 EQU ,op-r JNZ2
437
-	( S ) DUP #53 EQU ,op-s JNZ2 ( T ) DUP #54 EQU ,op-t JNZ2
438
-	( U ) DUP #55 EQU ,op-u JNZ2 ( V ) DUP #56 EQU ,op-v JNZ2
439
-	( W ) DUP #57 EQU ,op-w JNZ2 ( X ) DUP #58 EQU ,op-x JNZ2
440
-	( Y ) DUP #59 EQU ,op-y JNZ2 ( Z ) DUP #5a EQU ,op-z JNZ2
441
-	( * ) DUP #2a EQU ,op-bang JNZ2
428
+	( A ) DUP #41 EQU ;op-a JNZ2 ( B ) DUP #42 EQU ;op-b JNZ2
429
+	( C ) DUP #43 EQU ;op-c JNZ2 ( D ) DUP #44 EQU ;op-d JNZ2
430
+	( E ) DUP #45 EQU ;op-e JNZ2 ( F ) DUP #46 EQU ;op-f JNZ2
431
+	( G ) DUP #47 EQU ;op-g JNZ2 ( H ) DUP #48 EQU ;op-h JNZ2
432
+	( I ) DUP #49 EQU ;op-i JNZ2 ( J ) DUP #4a EQU ;op-j JNZ2
433
+	( K ) DUP #4b EQU ;op-k JNZ2 ( L ) DUP #4c EQU ;op-l JNZ2
434
+	( M ) DUP #4d EQU ;op-m JNZ2 ( N ) DUP #4e EQU ;op-n JNZ2
435
+	( O ) DUP #4f EQU ;op-o JNZ2 ( P ) DUP #50 EQU ;op-p JNZ2
436
+	( Q ) DUP #51 EQU ;op-q JNZ2 ( R ) DUP #52 EQU ;op-r JNZ2
437
+	( S ) DUP #53 EQU ;op-s JNZ2 ( T ) DUP #54 EQU ;op-t JNZ2
438
+	( U ) DUP #55 EQU ;op-u JNZ2 ( V ) DUP #56 EQU ;op-v JNZ2
439
+	( W ) DUP #57 EQU ;op-w JNZ2 ( X ) DUP #58 EQU ;op-x JNZ2
440
+	( Y ) DUP #59 EQU ;op-y JNZ2 ( Z ) DUP #5a EQU ;op-z JNZ2
441
+	( * ) DUP #2a EQU ;op-bang JNZ2
442 442
 	POP POP2
443 443
 
444 444
 RTN
445 445
 
446 446
 @init ( -- )
447 447
 	
448
-	#00 ~grid.height
449
-	$ver
450
-		#00 ~grid.width
451
-		$hor
452
-			( get x,y ) SWP2 OVR STH SWP2 OVR STHr 
448
+	#00 .grid/height PEK
449
+	&ver
450
+		#00 .grid/width PEK
451
+		&hor
452
+			( get x,y ) SWP2 OVR STH SWP2 OVR STHr
453 453
 			( unlock ) #00 SET-LOCK
454 454
 			( incr ) SWP ++ SWP
455
-			DUP2 LTH ^$hor JNZ
455
+			DUP2 LTH ,&hor JNZ
456 456
 		POP2
457 457
 		( incr ) SWP ++ SWP
458
-		DUP2 LTH ^$ver JNZ
458
+		DUP2 LTH ,&ver JNZ
459 459
 	POP2
460 460
 
461 461
 RTN
462 462
 
463 463
 @run ( -- )
464 464
 	
465
-	,init JSR2
465
+	;init JSR2
466 466
 
467
-	#00 ~grid.height
468
-	$ver
469
-		#00 ~grid.width
470
-		$hor
471
-			( get x,y ) SWP2 OVR STH SWP2 OVR STHr 
472
-			DUP2 GET-CELL ,run-char JSR2
473
-			( incr )    SWP ++ SWP
474
-			DUP2 LTH ^$hor JNZ
467
+	#00 .grid/height PEK
468
+	&ver
469
+		#00 .grid/width PEK
470
+		&hor
471
+			( get x,y ) SWP2 OVR STH SWP2 OVR STHr
472
+			DUP2 GET-CELL ;run-char JSR2
473
+			( incr ) SWP ++ SWP
474
+			DUP2 LTH ,&hor JNZ
475 475
 		POP2
476 476
 		( incr ) SWP ++ SWP
477
-		DUP2 LTH ^$ver JNZ
477
+		DUP2 LTH ,&ver JNZ
478 478
 	POP2
479
-	,redraw JSR2
479
+	;redraw JSR2
480 480
 
481 481
 RTN
482 482
 
483 483
 @draw-interface ( -- )
484 484
 	
485
-	~Screen.height #0008 SUB2 =Screen.y
485
+	.Screen/height DEI2 #0008 SUB2 .Screen/y DEO2
486 486
 
487 487
 	( Positionx )
488
-	#0000 =Screen.x
489
-	~selection.x1 
490
-		DUP #04 SFT GET-CHAR #20 SUB #00 SWP #0008 MUL2 ,font ADD2 =Screen.addr
491
-	#22 =Screen.color
492
-	#0008 =Screen.x
493
-		#0f AND GET-CHAR #20 SUB #00 SWP #0008 MUL2 ,font ADD2 =Screen.addr
494
-	#22 =Screen.color
488
+	#0000 .Screen/x DEO2
489
+	.selection/x1 PEK
490
+		DUP #04 SFT GET-CHAR #20 SUB #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
491
+	#22 .Screen/color DEO
492
+	#0008 .Screen/x DEO2
493
+		#0f AND GET-CHAR #20 SUB #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
494
+	#22 .Screen/color DEO
495 495
 
496 496
 	( Positiony )
497
-	#0010 =Screen.x
498
-	~selection.y1 
499
-		DUP #04 SFT GET-CHAR #20 SUB #00 SWP #0008 MUL2 ,font ADD2 =Screen.addr
500
-	#22 =Screen.color
501
-	#0018 =Screen.x
502
-		#0f AND GET-CHAR #20 SUB #00 SWP #0008 MUL2 ,font ADD2 =Screen.addr
503
-	#22 =Screen.color
504
-
505
-	#0020 =Screen.x
506
-	,position_icn =Screen.addr
507
-	#23 =Screen.color
497
+	#0010 .Screen/x DEO2
498
+	.selection/y1 PEK
499
+		DUP #04 SFT GET-CHAR #20 SUB #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
500
+	#22 .Screen/color DEO
501
+	#0018 .Screen/x DEO2
502
+		#0f AND GET-CHAR #20 SUB #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
503
+	#22 .Screen/color DEO
504
+
505
+	#0020 .Screen/x DEO2
506
+	;position_icn .Screen/addr DEO2
507
+	#23 .Screen/color DEO
508 508
 
509 509
 	( Frame )
510
-	#0030 =Screen.x
511
-	~timer.frame 
512
-		DUP #04 SFT GET-CHAR #20 SUB #00 SWP #0008 MUL2 ,font ADD2 =Screen.addr
513
-	#22 =Screen.color
514
-	#0038 =Screen.x
515
-		#0f AND GET-CHAR #20 SUB #00 SWP #0008 MUL2 ,font ADD2 =Screen.addr
516
-	#22 =Screen.color
517
-
518
-	#0040 =Screen.x
519
-	,beat_icn =Screen.addr
520
-	#21 ~timer.frame #08 MOD #00 EQU #02 MUL ADD =Screen.color
510
+	#0030 .Screen/x DEO2
511
+	.timer/frame PEK
512
+		DUP #04 SFT GET-CHAR #20 SUB #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
513
+	#22 .Screen/color DEO
514
+	#0038 .Screen/x DEO2
515
+		#0f AND GET-CHAR #20 SUB #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
516
+	#22 .Screen/color DEO
517
+
518
+	#0040 .Screen/x DEO2
519
+	;beat_icn .Screen/addr DEO2
520
+	#21 .timer/frame PEK #08 MOD #00 EQU #02 MUL ADD .Screen/color DEO
521 521
 
522 522
 	( Speed )
523
-	#0050 =Screen.x
524
-	~timer.speed 
525
-		DUP #04 SFT GET-CHAR #20 SUB #00 SWP #0008 MUL2 ,font ADD2 =Screen.addr
526
-	#22 =Screen.color
527
-	#0058 =Screen.x
528
-		#0f AND GET-CHAR #20 SUB #00 SWP #0008 MUL2 ,font ADD2 =Screen.addr
529
-	#22 =Screen.color
523
+	#0050 .Screen/x DEO2
524
+	.timer/speed PEK
525
+		DUP #04 SFT GET-CHAR #20 SUB #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
526
+	#22 .Screen/color DEO
527
+	#0058 .Screen/x DEO2
528
+		#0f AND GET-CHAR #20 SUB #00 SWP #0008 MUL2 ;font ADD2 .Screen/addr DEO2
529
+	#22 .Screen/color DEO
530 530
 
531 531
 	( TODO: Signal VU )
532 532
 
533 533
 	( File )
534
-	~Screen.width #0028 SUB2 =Screen.x
535
-	~Screen.x 8+ =Screen.x ,eye_icns =Screen.addr #21 =Screen.color
536
-	~Screen.x 8+ =Screen.x ,filestate_icn =Screen.addr #21 =Screen.color
537
-	~Screen.x 8+ =Screen.x ,load_icn =Screen.addr #21 =Screen.color
538
-	~Screen.x 8+ =Screen.x ,save_icn =Screen.addr #21 =Screen.color
534
+	.Screen/width DEI2 #0028 SUB2 .Screen/x DEO2
535
+	.Screen/x DEI2 8+ .Screen/x DEO2 ;eye_icns .Screen/addr DEO2 #21 .Screen/color DEO
536
+	.Screen/x DEI2 8+ .Screen/x DEO2 ;filestate_icn .Screen/addr DEO2 #21 .Screen/color DEO
537
+	.Screen/x DEI2 8+ .Screen/x DEO2 ;load_icn .Screen/addr DEO2 #21 .Screen/color DEO
538
+	.Screen/x DEI2 8+ .Screen/x DEO2 ;save_icn .Screen/addr DEO2 #21 .Screen/color DEO
539 539
 
540 540
 RTN
541 541
 
542 542
 @redraw ( -- )
543 543
 	
544
-	#00 ~grid.height
545
-	$ver
546
-		( pos-y ) OVR #00 SWP #0008 MUL2 =Screen.y
547
-		#00 ~grid.width
548
-		$hor
549
-			( pos-x )   OVR #00 SWP #0008 MUL2 =Screen.x 
550
-			( get x,y ) SWP2 OVR STH SWP2 OVR STHr 
551
-			( sprite )  DUP2 ,get-cell-sprite JSR2 =Screen.addr
552
-			( draw )    ,is-selected JSR2 #0d MUL #21 ADD =Screen.color
553
-			( incr )    SWP ++ SWP
554
-			DUP2 LTH ^$hor JNZ
544
+	#00 .grid/height PEK
545
+	&ver
546
+		( pos-y ) OVR #00 SWP #0008 MUL2 .Screen/y DEO2
547
+		#00 .grid/width PEK
548
+		&hor
549
+			( pos-x ) OVR #00 SWP #0008 MUL2 .Screen/x DEO2
550
+			( get x,y ) SWP2 OVR STH SWP2 OVR STHr
551
+			( sprite ) DUP2 ;get-cell-sprite JSR2 .Screen/addr DEO2
552
+			( draw ) ;is-selected JSR2 #0d MUL #21 ADD .Screen/color DEO
553
+			( incr ) SWP ++ SWP
554
+			DUP2 LTH ,&hor JNZ
555 555
 		POP2
556 556
 		( incr ) SWP ++ SWP
557
-		DUP2 LTH ^$ver JNZ
557
+		DUP2 LTH ,&ver JNZ
558 558
 	POP2
559 559
 
560
-	,draw-interface JSR2
560
+	;draw-interface JSR2
561 561
 
562 562
 RTN
563 563
 
... ...
@@ -565,18 +565,18 @@ RTN
565 565
 
566 566
 @values [
567 567
 	
568
-	00 00 00 00 00 00 00 00 
569
-	00 00 00 00 00 00 00 00 
568
+	00 00 00 00 00 00 00 00
569
+	00 00 00 00 00 00 00 00
570 570
 
571 571
 	00 01 02 03 04 05 06 07
572 572
 	08 09 00 00 00 00 00 00
573 573
 
574
-	00 0a 0b 0c 0d 0e 0f 10 
574
+	00 0a 0b 0c 0d 0e 0f 10
575 575
 	11 12 13 14 15 16 17 18
576 576
 	19 1a 1b 1c 1d 1e 1f 20
577 577
 	21 22 23 00 00 00 00 00
578 578
 
579
-	00 0a 0b 0c 0d 0e 0f 10 
579
+	00 0a 0b 0c 0d 0e 0f 10
580 580
 	11 12 13 14 15 16 17 18
581 581
 	19 1a 1b 1c 1d 1e 1f 20
582 582
 	21 22 23 00 00 00 00 00
... ...
@@ -608,7 +608,7 @@ RTN
608 608
 	[ 0000 0082 4438 0000 ] ( closed )
609 609
 
610 610
 
611
-@font ( specter8-frag font ) 
611
+@font ( specter8-frag font )
612 612
 [
613 613
 	0000 0000 0000 0000 0008 0808 0800 0800
614 614
 	0014 1400 0000 0000 0024 7e24 247e 2400