MOV XARn, PC
6-182
MOV XARn, PC Save the Current Program Counter
SYNTAX OPTIONS OPCODE OBJMODE RPT CYC
MOV XARn, PC 0011 1110 0101 1nnn 1 − 1
Operands XARn XAR0 to XAR7, 32-bit auxiliary registers
loc32 Addressing mode (see Chapter 5)
PC 22-bit program counter
Description Load XARn with the contents of the PC:
XARn = 0:PC;
Flags and
Modes
None
Repeat This instruction is not repeatable. If this instruction follows the RPT
instruction, it resets the repeat counter (RPTC) and executes only once.
Example
TableA:
.long CONST1
.long CONST2
.long CONST3
.
FuncA:
MOV XAR5,PC
SUBB XAR5,#($−TableA)
MOVL ACC,*+XAR5[2]
MOVL @VarA,ACC
; Location of TableA is relative to
; the current program
; XAR5 = current PC location
; XAR5 = TableA start location
; Load ACC with CONST2
; Store CONST2 in VarA