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 - 07-31-2022, 12:27 AM
RE: Binary into asm - by boriel - 08-02-2022, 12:58 PM
RE: Binary into asm - by Nando - 08-02-2022, 01:51 PM
RE: Binary into asm - by Nando - 08-02-2022, 09:13 PM
RE: Binary into asm - by boriel - 08-02-2022, 10:21 PM
RE: Binary into asm - by Nando - 08-02-2022, 11:20 PM
RE: Binary into asm - by Nando - 08-05-2022, 03:19 AM
RE: Binary into asm - by boriel - 08-09-2022, 06:26 AM
RE: Binary into asm - by Nando - 08-09-2022, 12:12 PM
RE: Binary into asm - by boriel - 08-10-2022, 11:07 AM
RE: Binary into asm - by Nando - 08-10-2022, 07:39 PM
RE: Binary into asm - by boriel - 08-11-2022, 08:59 AM
RE: Binary into asm - by Nando - 08-11-2022, 12:10 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)