vhelin / wla-dx

WLA DX - Yet Another GB-Z80/Z80/Z80N/6502/65C02/65CE02/65816/68000/6800/6801/6809/8008/8080/HUC6280/SPC-700/SuperFX Multi Platform Cross Assembler Package
Other
548 stars 98 forks source link

Macro ARGS issue #1 #57

Closed bazz1tv closed 9 years ago

bazz1tv commented 9 years ago

huc6280 but I wonder if the problem is universal (I recall similar problems on 65816 years ago)

ERROR:

PARSE_STACK: Unresolved reference to "bytes"
; ADDR suffix because WLA DX cannot take in a argument that could be # or $
.macro UP_VRAM_ADDR ARGS label, vram_addr, bytes
    lda #:label ;LABEL
    sta <bl
    lda #<label
    sta <si
    lda #>label
    sta <si + 1
    lda vram_addr.w + 0
    sta <di
    lda vram_addr.w + 1
    sta <di + 1
    lda #<(bytes/2) ; words
    sta <cl
    lda #>(bytes/2) ; words
    sta <ch
    jsr load_vram
.endm

Work-around until proper fix: replace "bytes" with "\3"

bazz1tv commented 9 years ago

This admittedly might have been my own mistake.. I cannot reproduce the issue anymore, even with an old-commit of WLA DX. I think it's safe to close this :)

I think my error was I had 'bytes' as argument and i used 'words' in the macro itself, and then I must have corrected it later?? I honestly am not sure..