Chapter 1 Introduction
Linear S12 Core Reference Manual, Rev. 1.01
14 Freescale Semiconductor
1.3.2 Operators
oprmemreg — Refer to the OPR addressing summary to see how to expand this into the operand specification for 1 of 16
OPR addressing modes (allowed forms and brief description shown here below).
#oprsxe4i
— Short Immediate.oprsxe4iis any label or expressionwhich evaluatesto one of the values -1, 1, 2, 3...14,
or 15. Auto sign-extended to 8, 16, 24, or 32 bits.
Di
— Register as operand. Di is any one of the eight CPU data registers D0, D1, D2, D3, D4, D5, D6, or D7.
(opru4,xys)
— Short offset (0-15) from X, Y, or S. opru4 is any label or expression that evaluates to unsigned 0-15.
(+xy) | (xy+) | (–xy) | (xy–) | (–S) | (S+) — Auto pre/post inc/dec from X, Y, or S (S=SP).
Where xy is either of the two index register names X or Y.
(Di,xys)
— Register offset from X, Y, or S. xys is any one of the 24-bit indexing registers X, Y, or S (S=SP).
16-bit D2, D3, D4, D5 treated as signed, D0, D1, D6, D7 treated as unsigned.
[Di,xy]
— Register offset from X or Y Indirect. D2, D3, D4, D5 treated as signed, D0, D1, D6, D7 are unsigned.
(oprs9,xysp)
— 9-bit signed offsetfrom X,Y,S,or P. oprs9 is any label or expressionthat evaluates to a 9-bit signedvalue
from–256 to +256. (0 istreated as +256)xysp is anyone of the 24-bitregisters X, Y, Sor P (S=SPP=PC).
[oprs9,xysp]
— 9-bit signed offset from X, Y, S, or P Indirect.
opru14
— Short Extended (16K). opru14 is anylabel or expressionthat evaluatesto a 14-bitunsignedaddress from
$000000 through $003FFF. All registers and 12K of RAM.
(opru18,Di)
— 18-bit unsigned offset from Di. opr18 isany label or expressionthat evaluates to an 18-bit unsigned value
from $000000 through $03FFFF (256K).
opru18
— Medium Extended (256K). Reaches any address from $000000 to $03FFFF. All on-chip RAM.
(opr24,xysp)
— 24-bit offset from X, Y, S, or P. opr24 is any label or expression that evaluates to a 24-bit value (16M).
[opr24,xysp]
— 24-bit offset from X, Y, S, or P Indirect.
(opru24,Di)
— 24-bit offset from Di. Can also be considered as a register offset from any 16M address or label.
opr24
— Long Extended (16M). Reaches any address in the full 16M memory space.
[opr24]
— 24-bit address Indirect.
oprregs1 — Any combination of the CPU registers in the list (CCH, CCL, D0, D1, D2, D3) separated by commas. Used
with the PSH and PUL instructions.
oprregs2 — Any combination of the CPU registers in the list (D4, D5, D6, D7, X, Y) separated by commas. Used with the
PSH and PUL instructions.
oprs9 — Any label or expression that evaluates to a 9-bit signed value from –256 to +256. (0 is treated as +256)
oprsxe4i — Any label or expression which evaluates to one of the values -1, 1, 2, 3...14, or 15. Auto sign-extended to 8,
16, 24, or 32 bits.
opru4 — Any label or expression that evaluates to the unsigned values 0 through 15.
opru14 — Any label or expression that evaluates to a 14-bit unsigned address from $000000 through $003FFF. All
registers and 12K of RAM.
opru18 — Any label or expression that evaluates to an 18-bit unsigned value from $000000 through $03FFFF (256K).
trapnum — Any label or expression that evaluates to the code for one of the unused opcodes on pg2 of the opcode map.
Valid values are 0x92..0x9F, 0xA8..0xAF, 0xB8..0xBF and 0xC0..0xFF.
width:offset — Any label or expression that evaluates to a 10-bit immediate operand. Used to specify field width and offset
w:o for bit field instructions where w and o are each 5-bit values (w=0 treated as 32).
xy — One of the two index register names X or Y.
xys — Any one of the 24-bit indexing registers X, Y, or S (S=SP).
xysp — Any one of the 24-bit registers X, Y, S or P (S=SP P=PC).
+
— Add
–
— Subtract or negate (two’s complement)
∗
— Multiply
/
— Divide
|expression|
— Absolute value of the expression shown between vertical bars