mirror of https://git.sr.ht/~rabbits/drifblim
Assembles hello.tal
This commit is contained in:
parent
cb657b1313
commit
2e9d70f934
8
makefile
8
makefile
|
@ -18,10 +18,10 @@ run: all
|
||||||
# @ ${EMU} ${ROM} src/${ID}.tal ${ROM}
|
# @ ${EMU} ${ROM} src/${ID}.tal ${ROM}
|
||||||
# @ ${EMU} ${ROM} examples/hello.tal bin/hello.rom
|
# @ ${EMU} ${ROM} examples/hello.tal bin/hello.rom
|
||||||
# @ ${EMU} bin/hello.rom
|
# @ ${EMU} bin/hello.rom
|
||||||
@ uxnasm examples/hello.tal bin/res.rom
|
@ uxnasm examples/hello.tal bin/a.rom
|
||||||
@ uxncli ~/roms/hx.rom bin/res.rom
|
@ uxncli ~/roms/hx.rom bin/a.rom
|
||||||
@ cat examples/hello.tal | ${EMU} ${ROM} > bin/res.rom
|
@ cat examples/hello.tal | ${EMU} ${ROM} > bin/b.rom
|
||||||
@ uxncli ~/roms/hx.rom bin/res.rom
|
@ uxncli ~/roms/hx.rom bin/b.rom
|
||||||
install: all
|
install: all
|
||||||
@ cp ${ROM} ${DIR}
|
@ cp ${ROM} ${DIR}
|
||||||
uninstall:
|
uninstall:
|
||||||
|
|
|
@ -309,17 +309,18 @@
|
||||||
POP2 POP2 #00 JMP2r
|
POP2 POP2 #00 JMP2r
|
||||||
&on-found ( name* bounds* -- byte )
|
&on-found ( name* bounds* -- byte )
|
||||||
( LITk ) NIP DUP #00 EQU #70 SFT ORA STH
|
( LITk ) NIP DUP #00 EQU #70 SFT ORA STH
|
||||||
( modes ) #0003 ADD2 STHr
|
( modes ) #0003 ADD2
|
||||||
( flag ) [ LITr 00 ]
|
|
||||||
&w ( -- )
|
&w ( -- )
|
||||||
LDAk #20 OVR [ LIT "2 ] EQU ?&>end
|
LDAk ?{ POP2 STHr JMP2r }
|
||||||
DUP ADD OVR [ LIT "r ] EQU ?&>end
|
LDAk get-mode-value STH ORAr
|
||||||
DUP ADD OVR [ LIT "k ] EQU ?&>end
|
INC2 !&w
|
||||||
DUP ADD OVR #00 EQU ?&>end
|
|
||||||
&>end
|
@get-mode-value ( c -- byte )
|
||||||
NIP STH
|
DUP [ LIT "2 ] NEQ ?{ POP #20 JMP2r }
|
||||||
ORAr INC2 LDAk ?&w
|
DUP [ LIT "k ] NEQ ?{ POP #80 JMP2r }
|
||||||
POP2 STHr ADD JMP2r
|
DUP [ LIT "r ] NEQ ?{ POP #40 JMP2r }
|
||||||
|
POP #00
|
||||||
|
JMP2r
|
||||||
|
|
||||||
(
|
(
|
||||||
@|stdlib )
|
@|stdlib )
|
||||||
|
@ -376,7 +377,7 @@
|
||||||
POP2 POP2r JMP2r
|
POP2 POP2r JMP2r
|
||||||
|
|
||||||
@<pstr> ( str* -: )
|
@<pstr> ( str* -: )
|
||||||
LDAk #18 DEO
|
LDAk #19 DEO
|
||||||
INC2 & LDAk ?<pstr>
|
INC2 & LDAk ?<pstr>
|
||||||
POP2 JMP2r
|
POP2 JMP2r
|
||||||
|
|
||||||
|
@ -394,7 +395,7 @@
|
||||||
&b ( -- )
|
&b ( -- )
|
||||||
DUP #04 SFT <phex>/c
|
DUP #04 SFT <phex>/c
|
||||||
&c ( -- )
|
&c ( -- )
|
||||||
#0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD #18 DEO
|
#0f AND DUP #09 GTH #27 MUL ADD [ LIT "0 ] ADD #19 DEO
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
(
|
(
|
||||||
|
|
Loading…
Reference in New Issue