dasm-assembler / dasm

Macro assembler with support for several 8-bit microprocessors
https://dasm-assembler.github.io/
GNU General Public License v2.0
213 stars 39 forks source link

Defining a constant with value ofa label fails on latest nightly build #25

Closed FabienTregan closed 4 years ago

FabienTregan commented 4 years ago

The following code fails with to compile on windows, with both x86 and x64,with build from commit a3e6790722c4f4337dbac1c472cf2134db7c3061


    processor       6502

InMemoryCodeLength  equ InMemoryCodeEnd

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Variables segment

        seg.u   Variables
        org $80

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Code segment

    seg Code
        org $1000

; ----  modified code-> copied to memory  ----------------

Start

        nop

InMemoryCodeEnd

        nop

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Epilogue

    org $fffc
        .word Start ; reset vector
        .word Start ; BRK vector

             MAC SOME_MACRO
                nop
             ENDM
dasm.exe rainbow.a -obuild/o.bin -lbuild/o.lst -sbuild/o.sym -f3
rainbow.a (38): error: Macro "some_macro" defintion is repeated.

Unrecoverable error(s) in pass, aborting assembly!
Complete.

In addition to the typo (defintion -> definition), what is orth noting is :

msaarna commented 4 years ago

Thanks for the report! Looks like an unintended consequence of the "error on duplicate macro" update. I've reverted that update, and the snapshots were updated.