[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BRUN becomes RUN - minor bug though
I wrote this little ca65 program in order to be able to wrap a BASIC
program into a binary, to make it easier to pack stuff into single files.
It's got a minor bug, possibly because I don't yet understand fpbasic's
internals well enough: it only does the RUN correctly if executed from a
running program (the one I tested was Key-Cat).
.org $0800
jmp relocate
.incbin "mybas.fp", $0002
xtrabyte: .incbin "mybas.fp", $0000, $0002
relocate: lda xtrabyte
sta $0801
lda xtrabyte+1
sta $0802
lda #<xtrabyte
sta $AF
lda #>xtrabyte
sta $B0
lda #$00
sta $0800
jmp $D912
So I'm guessing $D912 is the wrong address... Otherwise, it works great
and I might try using it to wrap some stuff into a single file (following
which I'll wrap it *again* to make it a BAS file again... lol)
BTW, I'm planning to do this with DLM stuff, but if anyone's got stuff
that isn't "hacktro'd" I'd like to take a shot at that too xD, esp. now
that I've learned how to use stuff like Advanced Demuffin. (Now I'm
wishing my real //e had the EDM!)
-uso.