Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
#INCBIN not working in 1.4 and 1.3
#1
Hi all,

I'm back with some ZX BASIC projects.

The Z80 #INCBIN doesn't work for me. I never tried it before, but I think it's implemented (it's mentioned in the Syntax page of the wiki, and in a post by Boriel about graphics (2011)).

Code:
asm
#incbin "file.bin"
end asm

I use 1.4, but a symbolic link lets me switch to 1.3. Both versions show the same error: "invalid directive #incbin".

Is it a bug?

Thank you.
Reply
#2
Preprocessor directives start with # symbol. Incbin is not a preprocessor directive, but an assembler one. So don't use the # prefix. Example:
Code:
asm
    incbin "file.bin"
    end asm
Reply
#3
boriel Wrote:Preprocessor directives start with # symbol. Incbin is not a preprocessor directive, but an assembler one. So don't use the # prefix.

I'll try it. Thank you. I'm afraid I'm a victim of "counterdocumentation"... Smile Both links I've showed above (the current wiki and a post of yours) say "#incbin". Maybe the syntax changed some time ago?
Reply
#4
programandala.net Wrote:
boriel Wrote:Preprocessor directives start with # symbol. Incbin is not a preprocessor directive, but an assembler one. So don't use the # prefix.

I'll try it. Thank you. I'm afraid I'm a victim of "counterdocumentation"... Smile Both links I've showed above (the current wiki and a post of yours) say "#incbin". Maybe the syntax changed some time ago?
You are right!! Sad
It's a documentation mistake! INCBIN is an ASM directive (like DEFB)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)