Ok, so I got some weird results
First I compiled the following code:
and it compiled ok, but produced no result (just finished the generated basic loader at line 30)
So, after some trial and error, I decided to try a goto 10 on the first line, and label the line with pause 0 with 10, therefore skipping the asm for the incbin (as it does not need to be executed, altough I assumed it would not be an issue)
This executed the second asm code, but I got gibberish instead of the expected drawing.
To check if there was something wrong with the bin file or something like that, I added the following basic code before the asm routine:
This produced the desired art (but slower than the other assembly routine would); after the pause 0/ keypress, it run the asm and I got gibberish again.
Is there something wrong with my code, or is it some sort of bug?
Another try, I replaced the code with the following, turning the bin file non-relocatable:
This produced the expected image, but the program ended with the following message:
C Nonsense in BASIC, 30:1
(PS: It's not my intention to hardcode the image file)
First I compiled the following code:
Code:
art:
asm
incbin "final.bin"
end asm
pause 0
paper 0: ink 7: border 0: CLS
asm
ld hl,(.LABEL._art)
ld de,18432
ld bc,2048
ED
LDIR
RET
end asm
and it compiled ok, but produced no result (just finished the generated basic loader at line 30)
So, after some trial and error, I decided to try a goto 10 on the first line, and label the line with pause 0 with 10, therefore skipping the asm for the incbin (as it does not need to be executed, altough I assumed it would not be an issue)
This executed the second asm code, but I got gibberish instead of the expected drawing.
To check if there was something wrong with the bin file or something like that, I added the following basic code before the asm routine:
Code:
for n=0 to 2047
poke (18432+n), peek (@art+n)
next n
pause 0
This produced the desired art (but slower than the other assembly routine would); after the pause 0/ keypress, it run the asm and I got gibberish again.
Is there something wrong with my code, or is it some sort of bug?
Another try, I replaced the code with the following, turning the bin file non-relocatable:
Code:
GOTO 10
art:
asm
org 50000
incbin "final.bin"
end asm
10 pause 0
paper 0: ink 7: border 0: CLS
asm
ld hl,50000
ld de,18432
ld bc,2048
ED
LDIR
RET
end asm
This produced the expected image, but the program ended with the following message:
C Nonsense in BASIC, 30:1
(PS: It's not my intention to hardcode the image file)