... | ... |
@@ -67,7 +67,14 @@ BRK |
67 | 67 |
|
68 | 68 |
@on-button ( -> ) |
69 | 69 |
|
70 |
- .Controller/func DEI DEBUG |
|
70 |
+ .Controller/func DEI |
|
71 |
+ DUP #02 ! ,&no-f2 JCN |
|
72 |
+ ;toggle-debugger JSR2 |
|
73 |
+ &no-f2 |
|
74 |
+ DUP #08 ! ,&no-f4 JCN |
|
75 |
+ ;reboot JSR2 |
|
76 |
+ &no-f4 |
|
77 |
+ POP |
|
71 | 78 |
|
72 | 79 |
BRK |
73 | 80 |
|
... | ... |
@@ -115,6 +122,20 @@ BRK |
115 | 122 |
|
116 | 123 |
BRK |
117 | 124 |
|
125 |
+@toggle-debugger ( -- ) |
|
126 |
+ |
|
127 |
+ ( toggle debug ) #fd0e STH2k LDA #00 = STH2r STA |
|
128 |
+ |
|
129 |
+RTN |
|
130 |
+ |
|
131 |
+@reboot ( -- ) |
|
132 |
+ |
|
133 |
+ ( clear devices/stacks ) |
|
134 |
+ #fd00 #0300 ;mclr JSR2 |
|
135 |
+ |
|
136 |
+RTN |
|
137 |
+ &boot-path "boot.rom $1 |
|
138 |
+ |
|
118 | 139 |
@draw-stacks ( -- ) |
119 | 140 |
|
120 | 141 |
AUTO-YADDR |
... | ... |
@@ -200,6 +221,16 @@ RTN |
200 | 221 |
|
201 | 222 |
JMP2r |
202 | 223 |
|
224 |
+@mclr ( addr* len* -- ) |
|
225 |
+ |
|
226 |
+ OVR2 ++ SWP2 |
|
227 |
+ &loop |
|
228 |
+ STH2k #00 STH2r STA |
|
229 |
+ INC2 GTH2k ,&loop JCN |
|
230 |
+ POP2 POP2 |
|
231 |
+ |
|
232 |
+JMP2r |
|
233 |
+ |
|
203 | 234 |
@print-hex ( value* -- ) |
204 | 235 |
|
205 | 236 |
SWP ,&byte JSR |
... | ... |
@@ -212,6 +243,15 @@ JMP2r |
212 | 243 |
|
213 | 244 |
JMP2r |
214 | 245 |
|
246 |
+@print-str ( string* -- ) |
|
247 |
+ |
|
248 |
+ #0001 SUB2 |
|
249 |
+ &while |
|
250 |
+ INC2 LDAk DUP #18 DEO ,&while JCN |
|
251 |
+ POP2 |
|
252 |
+ |
|
253 |
+JMP2r |
|
254 |
+ |
|
215 | 255 |
@error-txts |
216 | 256 |
&0 "Working-stack 20 "underflow $1 |
217 | 257 |
&1 "Return-stack 20 "underflow $1 |
... | ... |
@@ -459,8 +459,8 @@ run(Uxn *u) |
459 | 459 |
controller_key(devctrl, get_key(&event)); |
460 | 460 |
else if(get_button(&event)) |
461 | 461 |
controller_down(devctrl, get_button(&event)); |
462 |
- else if(get_fkey(&event)) |
|
463 |
- controller_special(&supervisor.dev[0x8], get_fkey(&event)); |
|
462 |
+ /* else if(get_fkey(&event)) |
|
463 |
+ controller_special(&supervisor.dev[0x8], get_fkey(&event)); */ |
|
464 | 464 |
else |
465 | 465 |
do_shortcut(u, &event); |
466 | 466 |
ksym = event.key.keysym.sym; |