Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Binary into asm
#5
What happens is what you suspected: this is machine code now, not BASIC, and the CPU executing is reaching the binary file ("final.bin").

Instead, jump over it with a GOTO, or better, put an END instruction before the incbin. Don't use RET in the ASM region. The compiler has an epilogue to return to the ROM BASIC safely:

Try this and tell me if it works: Shy
Code:
paper 0: ink 7: border 0: CLS

asm
ld hl,(.LABEL._art)
ld de,18432
ld bc,2048
LDIR
end asm

END: REM the program ends and returns to BASIC. This prevents executing the following lines.

art:
asm
incbin "final.bin"
end asm

Let me know!
Reply


Messages In This Thread
Binary into asm - by Nando - 2022-07-31, 01:27 AM
RE: Binary into asm - by boriel - 2022-08-02, 01:58 PM
RE: Binary into asm - by Nando - 2022-08-02, 02:51 PM
RE: Binary into asm - by Nando - 2022-08-02, 10:13 PM
RE: Binary into asm - by boriel - 2022-08-02, 11:21 PM
RE: Binary into asm - by Nando - 2022-08-03, 12:20 AM
RE: Binary into asm - by Nando - 2022-08-05, 04:19 AM
RE: Binary into asm - by boriel - 2022-08-09, 07:26 AM
RE: Binary into asm - by Nando - 2022-08-09, 01:12 PM
RE: Binary into asm - by boriel - 2022-08-10, 12:07 PM
RE: Binary into asm - by Nando - 2022-08-10, 08:39 PM
RE: Binary into asm - by boriel - 2022-08-11, 09:59 AM
RE: Binary into asm - by Nando - 2022-08-11, 01:10 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)