Page 1 of 1

Spasm questions

PostPosted: 09 February 2015, 14:52
by add
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..
 

Re: Spasm questions

PostPosted: 09 February 2015, 15:42
by NanoWar
Code: Select all
_ ; 1
  jr +++_ ; => 4
_ ; 2
  jr _ ; => 3 (same as +_)
_ ; 3
  jr -_ ; => 3
_ ; 4

Re: Spasm questions

PostPosted: 09 February 2015, 15:45
by add
Ah, thank you NanoWar!