Assembler Register defines
The defines (name aliases) for registers 0-31 are predefined for for inline assembler. This can be changed with the directive .def.. Registers 0-31 are divided into 8 registers groups. Luna uses none of the registers as constantly entrained status or pointer. It can therefore be used and changed all the registers at any time.
The Register Groups:
Group | Register | Name |
---|---|---|
Low A | R0 | _LA0 |
R1 | _LA1 | |
R2 | _LA2 | |
R3 | _LA3 | |
Low B | R4 | _LB0 |
R5 | _LB1 | |
R6 | _LB2 | |
R7 | _LB3 | |
Temp 1 | R8 | _TMP0 |
R9 | _TMP1 | |
R10 | _TMP2 | |
R11 | _TMP3 | |
Temp 2 | R12 | _TMPA |
R13 | _TMPB | |
R14 | _TMPC | |
R15 | _TMPD | |
High A | R16 | _HA0 |
R17 | _HA1 | |
R18 | _HA2 | |
R19 | _HA3 | |
High B | R20 | _HB0 |
R21 | _HB1 | |
R22 | _HB2 | |
R23 | _HB3 | |
Low Pointer | R24 | WL |
R25 | WH | |
R26 | XL | |
R27 | XH | |
High Pointer | R28 | YL |
R29 | YH | |
R30 | ZL | |
R31 | ZH |
Using of the Groups
- LA,LB,Temp1 and Temp2: Be used for temporary data within the internal functions.
- HA and HB: Be used as general working registers.
- Low/High-Pointer: Are classified as Type Flags, array index, as an intermediate for shifting on the stack, as a classical pointer to access memory areas, as well as the call and used within internal functions.