Added device support error
This commit is contained in:
parent
c53ca56775
commit
11249a9e52
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
@on-reset ( -> )
|
@on-reset ( -> )
|
||||||
.Console/type DEI ?&>has-arg
|
.Console/type DEI ?&>has-arg
|
||||||
;dict/usage &err <print-str>
|
;dict/usage <print-str>
|
||||||
#010f DEO
|
#010f DEO
|
||||||
BRK &>has-arg
|
BRK &>has-arg
|
||||||
;on-waitsrc .Console/vector DEO2
|
;on-waitsrc .Console/vector DEO2
|
||||||
|
@ -42,16 +42,14 @@
|
||||||
[ LIT2 00 -emu/sleep ] STZ
|
[ LIT2 00 -emu/sleep ] STZ
|
||||||
#0000
|
#0000
|
||||||
&w ( -- )
|
&w ( -- )
|
||||||
<step> POP
|
<step>
|
||||||
.uxn/err LDZ ?&err
|
.uxn/err LDZ ?&err
|
||||||
.emu/sleep LDZ ?&end
|
#00 EQU ?&end
|
||||||
INC2 ORAk ?&w
|
INC2 ORAk ?&w
|
||||||
&end POP2
|
&end ( -- )
|
||||||
( TODO: Catch too long ) JMP2r
|
POP2 JMP2r
|
||||||
&err ( -- )
|
&err ( opcode -- )
|
||||||
POP2 #00 ;wst/ptr STA
|
POP !<reset>
|
||||||
#00 ;rst/ptr STA
|
|
||||||
JMP2r
|
|
||||||
|
|
||||||
@halt ( opcode -- opcode )
|
@halt ( opcode -- opcode )
|
||||||
#01 .emu/sleep STZ
|
#01 .emu/sleep STZ
|
||||||
|
@ -65,18 +63,16 @@
|
||||||
DUP #0f NEQ ?&>no-halt
|
DUP #0f NEQ ?&>no-halt
|
||||||
&>no-halt
|
&>no-halt
|
||||||
DUP #18 NEQ ?&>no-out
|
DUP #18 NEQ ?&>no-out
|
||||||
POP #18 DEO
|
POP NIP #18 DEO
|
||||||
POP JMP2r &>no-out
|
JMP2r &>no-out
|
||||||
DUP #19 NEQ ?&>no-err
|
DUP #19 NEQ ?&>no-err
|
||||||
POP #19 DEO
|
POP NIP #19 DEO
|
||||||
POP JMP2r &>no-err
|
JMP2r &>no-err
|
||||||
( | error )
|
( | error )
|
||||||
LIT "! #18 DEO
|
;dict/err-device <print-str>
|
||||||
<phex>/b
|
<phex>/b
|
||||||
#2018 DEO
|
|
||||||
<phex>
|
|
||||||
#0a18 DEO
|
#0a18 DEO
|
||||||
JMP2r
|
POP2 JMP2r
|
||||||
|
|
||||||
(
|
(
|
||||||
@|stdlib )
|
@|stdlib )
|
||||||
|
@ -125,6 +121,7 @@
|
||||||
|
|
||||||
@dict &usage "usage: 20 "uxnvm.rom 20 "game.rom 0a $1
|
@dict &usage "usage: 20 "uxnvm.rom 20 "game.rom 0a $1
|
||||||
&bytes-free 20 "bytes 20 "free. 0a $1
|
&bytes-free 20 "bytes 20 "free. 0a $1
|
||||||
|
&err-device "Unsupported 20 "device: 20 $1
|
||||||
|
|
||||||
~vm.tal
|
~vm.tal
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue