How to define local labels in SNASM68k (genesis)?

Discussion of development of software for any "obsolete" computer or video game system.
Post Reply
ReverendSA
Posts: 31
Joined: Wed Mar 23, 2016 12:27 pm

How to define local labels in SNASM68k (genesis)?

Post by ReverendSA » Sun Apr 26, 2020 12:23 pm

I am trying to use labels in a macro, but everytime I call the macro twice, I get a "label already defined" error. My only guess is that local labels may solve the problem. First instinct was to preface with a period (i.e .Loop instead of Loop), but the same error occurs. Maybe it's something else but I can't find out.

User avatar
TmEE
Posts: 761
Joined: Wed Feb 13, 2008 9:10 am
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
Contact:

Re: How to define local labels in SNASM68k (genesis)?

Post by TmEE » Sun Apr 26, 2020 1:28 pm

Manual suggests @ or . in front of the label.
You can find the manual here : https://segaretro.org/File:SNASM68K_680 ... Manual.pdf

ReverendSA
Posts: 31
Joined: Wed Mar 23, 2016 12:27 pm

Re: How to define local labels in SNASM68k (genesis)?

Post by ReverendSA » Sun Apr 26, 2020 3:26 pm

TmEE wrote:
Sun Apr 26, 2020 1:28 pm
Manual suggests @ or . in front of the label.
You can find the manual here : https://segaretro.org/File:SNASM68K_680 ... Manual.pdf
wow you're a life saver. I will hold this document closely to my chest and never let it go...........

correct syntax appears to be:

Code: Select all

Loop\@:

Post Reply