BigDumbDinosaur wrote:
urbanspr1nter wrote:
Hi all, newbie here ... I've been reading through a few tutorials and have been coming across syntax like this:
Code:
ldx #32*\1+\2
The way I have been interpreting this is that we are loading the decimal value 32 to the X register. But what does *\1 + \2 mean? Specifically what does the * and \ signify?
Firstly, welcome to our 6502 world.
I'd have to know which assembler is being used to answer your question. Usually,
* represents the program counter, but could also mean multiplication (it's context-dependent). The use of
\ is something I have not seen before in assembly language.
Thank you. Actually I think whartung might be right.
I looked over some of the wla documentation and apparently they are macro arguments.
\1 and \2 are the first and second parameters respectively. It looks like it is actually doing what whartung also says... It multiplies the first argument by 32, then adds the second parameter.
I'm just looking over some SNES sample code in terms of loading tile info into VRAM and now it makes more sense.