Texas Instruments MSC1210 User Manual

Page 307

Advertising
background image

8052 Instruction Set

E-23

8052 Instruction Set

SJMP

Short Jump

Syntax

SJMP relAddr

Instructions

OpCode

Bytes

Cycles

Flags

SJMP relAddr

0x80

2

2

None

SJMP jumps unconditionally to the address specified relAddr. RelAddr must
be within −128 or +127 bytes of the instruction that follows the SJMP instruc-
tion.

See also: LJMP, AJMP

SUBB

Subtract from Accumulator with Borrow

Syntax

SUBB A,operand

Instructions

OpCode

Bytes

Cycles

Flags

SUBB A,#data8

0x94

2

1

C, AC, OV

SUBB A,direct

0x95

2

1

C, AC, OV

SUBB A,@R0

0x96

1

1

C, AC, OV

SUBB A,@R1

0x97

1

1

C, AC, OV

SUBB A,R0

0x98

1

1

C, AC, OV

SUBB A,R1

0x99

1

1

C, AC, OV

SUBB A,R2

0x9A

1

1

C, AC, OV

SUBB A,R3

0x9B

1

1

C, AC, OV

SUBB A,R4

0x9C

1

1

C, AC, OV

SUBB A,R5

0x9D

1

1

C, AC, OV

SUBB A,R6

0x9E

1

1

C, AC, OV

SUBB A,R7

0x9F

1

1

C, AC, OV

SUBB subtracts the value of operand from the value of the accumulator, leav-
ing the resulting value in the accumulator. The value operand is not affected.

The carry (C) bit is set if a borrow was required for bit 7. Otherwise, it is cleared.
In other words, if the unsigned value being subtracted is greater than the accu-
mulator, the carry flag is set.

The auxillary carry (AC) bit is set if a borrow was required for bit 3. Otherwise,
it is cleared. In other words, the bit is set if the low nibble of the value being
subtracted was greater than the low nibble of the accumulator.

The overflow (OV) bit is set if a borrow was required for bit 6 or for bit 7, but
not both. In other words, the subtraction of two signed bytes resulted in a value
outside the range of a signed byte (−128 to 127). Otherwise, it is cleared.

See also: ADD, ADDC, DEC

Advertising