Zeex/amx_assembly — pull request #9 by Y-Less (2013-04-16 19:10:59+00:00)
Title: asm_macros

I've now edited the code to do this:

@emit LOAD.S.alt 8
@emit LCTRL 4
@emit SUB
@emit SCTRL 4
@emit XCHG

Cearly almost identical to the equivalent "#emit" code:

#emit LOAD.S.alt 8
#emit LCTRL 4
#emit SUB
#emit SCTRL 4
#emit XCHG

I've written a whole pile of macros so that this is VERY forgiving with case - any component can be: UPPER, lower, or Mixed like the original:

@emit Load.s.ALT 8

You can also write it several other ways for backwards compatability:

@emit Load.s.ALT 8 // Dot version.
@emit LoadSAlt 8 // Same as "AsmEmitXXX" functions.
@emit load_s_alt 8 // Original.
@emit Load_S_Alt 8 // Mixed.
@emit LOAD_S_ALT 8 // Upper-case.
@emit LOAD_S_alt 8 // Documentation style.

The last version (LOAD_S_alt) is designed to match the cases used in the pawn_implementer_guide.pdf documentation, so "pri" and "alt" are lower case but nothing else is. Or course, if you are using the "dot" version, each word's case is independent.