Spasm questions

Need help with programming? Feel free to ask anything. Answers are welcome as well!
  • Author
  • Message
Offline
User avatar

add

Topic Starter

Spasm questions

Post09 February 2015, 14:52

I thought it'd be a good idea to collect the Spasm questions in one topic, as I think I will have quite a few in the future and I don't want to clutter up the forum with just that :-)
So here goes the first one.


QUESTION: Anonymous labels, can I have several in a row? And if so, how?
Example:
Code: Select all
_:
  ; code
  jr nz, +_
  ; more code
_:
  ; even more code
  jr z, -_ ; this will go to the one above, but I want it to go to the anonymous label that is (in this case) first..
 
Offline
User avatar

NanoWar

Site Admin

Re: Spasm questions

Post09 February 2015, 15:42

Code: Select all
_ ; 1
  jr +++_ ; => 4
_ ; 2
  jr _ ; => 3 (same as +_)
_ ; 3
  jr -_ ; => 3
_ ; 4
Offline
User avatar

add

Topic Starter

Re: Spasm questions

Post09 February 2015, 15:45

Ah, thank you NanoWar!

Return to Programming Help

Who is online

Users browsing this forum: No registered users and 2 guests

cron