4/17/98 6-45 Addressing Modes and Data Types
ADDS Add Short
Syntax: ADDS dest, #value
Operation: dest <- dest + #data4
Description: Four bits of signed immediate data are added to the destination. The immediate data
is sign-extended to the proper size, then added to the variable specified by the destination operand,
which may be either a byte or a word. The immediate data range is +7 to -8. This instruction is used
primarily to increment or decrement pointers and counters.
Size: Byte-Byte, Word-Word
Flags Updated: N, Z
(Note: the C and AC flags must
not be updated by ADDS since this instruction is used to replace
the 80C51 INC and DEC instructions, which do not update the flags.)
ADDS Rd, #data4
Bytes: 2
Clocks: 3
Operation: (Rd) <-- (Rd) + #data4
Encoding:
ADDS [Rd], #data4
Bytes: 2
Clocks: 4
Operation:((WS:Rd)) <-- ((WS:Rd)) + #data4
Encoding:
ADDS [Rd+], #data4
Bytes: 2
Clocks: 5
Operation: ((WS:Rd)) <-- ((WS:Rd)) + #data4
(Rd) <-- (Rd) + 1 (byte operation) or 2 (word operation)
Encoding:
1 0 1 0 SZ 0 0 1 d d d d #data4
1 0 1 0 SZ 0 1 0 0 d d d #data4
1 0 1 0 SZ 0 1 1 0 d d d #data4