0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-22 22:05:11 +00:00

Dealt with source files that don't end with whitespace

This commit is contained in:
Andrew Alderwick 2021-05-14 23:02:41 +01:00
parent ac91aea27b
commit e442342664

View file

@ -87,7 +87,7 @@
&filename &filename
( "test.usm 00 ) ( "test.usm 00 )
"projects/demos/piano.usm 00 "projects/examples/gui/label.usm 00
&lines [ 20 "lines 20 "in 20 "total. 0a 00 ] &lines [ 20 "lines 20 "in 20 "total. 0a 00 ]
@ -110,19 +110,23 @@
&loop &loop
OVR2 .File/name DEO2 OVR2 .File/name DEO2
DUP2 .File/offset DEO2 DUP2 .File/offset DEO2
#0100 .File/length DEO2 #0023 STH2k .File/length DEO2
#fe00 DUP2k .File/load DEO2 #f000 DUP2k .File/load DEO2
.File/success DEI2 ORAk ,&not-end JCN .File/success DEI2
POP2 POP2 DUP2 STH2r SUB2 ORA ,&last-one JCN
&error
POP2 POP2 POP2
JMP2r
&not-end
,asma-assemble-chunk JSR asma-IF-ERROR ,&error JCN ,asma-assemble-chunk JSR asma-IF-ERROR ,&error JCN
SUB2 SUB2 SUB2 SUB2
,&loop JMP ,&loop JMP
&last-one
ADD2k #00 ROT ROT STA
#0001 ADD2
,asma-assemble-chunk JSR asma-IF-ERROR ,&error JCN
POP2
&error
POP2 POP2 POP2
JMP2r
@asma-init-assembler ( -- ) @asma-init-assembler ( -- )
#ff ;asma/pass STA #ff ;asma/pass STA
#0000 ;asma/error STA2 #0000 ;asma/error STA2