Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
FabienTregan opened this issue Jan 10, 2020 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@FabienTregan
Copy link

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


	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 :

  • If you remove InMemoryCodeLength equ InMemoryCodeEnd, the code compiles (though the error message is about duplicated macro which is abviously not duplicated)
  • If you remove the maco definition, it also compiles fine
  • If you use build from previous snapshot build ( a3e6790 ) it also does compile fine.
@msaarna msaarna self-assigned this Jan 10, 2020
@msaarna
Copy link
Member

msaarna commented Jan 10, 2020

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.

@msaarna msaarna added the bug Something isn't working label Jan 12, 2020
@msaarna msaarna closed this as completed Jan 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants