mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-10 16:25:05 +00:00
Prevented infinite loop when asma's output is empty
This commit is contained in:
parent
3b9519d945
commit
fa91704ef9
1 changed files with 5 additions and 0 deletions
|
@ -46,12 +46,17 @@
|
|||
DEO2 instruction to 0x00ff. In order to execute File/load and have the
|
||||
CPU continue at memory location 0x0100, we write the final DEO2
|
||||
instruction there and jump there as our final act.
|
||||
|
||||
Just in case the assembled code is zero-length (which can occur when
|
||||
assembling an empty source file), we write a BRK to the reset vector so
|
||||
that will prevent an infinite loop.
|
||||
)
|
||||
;&dest-file .File/name DEO2
|
||||
#0000 .File/offset DEO2
|
||||
#ff00 .File/length DEO2
|
||||
#0100 .File/load
|
||||
LIT DEO2 #00ff STA
|
||||
LIT BRK #0100 STA
|
||||
#00ff JMP2
|
||||
|
||||
&source-file
|
||||
|
|
Loading…
Reference in a new issue