Jump, Loop and Call Instructions: University of Engineering and Technology Taxila
Jump, Loop and Call Instructions: University of Engineering and Technology Taxila
Jump, Loop and Call Instructions: University of Engineering and Technology Taxila
Chapter 3
JUMP, LOOP and CALL
Instructions
Chapter 6
Arithmetic Instructions and
Programs
HEX BCD
29 0010 1001
+ 18 + 0001 1000
41 0100 0001 AC=1
+ 6 + 0110
47 0100 0111
Subtraction of Unsigned Numbers
SUBB A, source ; A = A – source – CY
SUBB when CY = 0
– Take 2’s complement of subtraend (source)
– Add it to minuend
– Invert carry
Example (Positive Result)
Example (Negative Result)
SUBB When CY = 1
For multibyte numbers
Multiplication of Unsigned Numbers
MUL AB ; A B, place 16-bit result in B and A
MOV A,#25H ;load 25H to reg. A
MOV B,#65H ;load 65H in reg. B
MUL AB ;25H * 65H = E99 where
;B = 0EH and A = 99H
Chapter 7
LOGIC INSTRUCTIONS
AND PROGRAMS
RL A ;rotate left A
MOV A,#72H ;A=0111 0010
RL A ;A=1110 0100
RL A ;A=1100 1001
Rotating through the carry
RRC A ;rotate right through carry
Chapter 8
SINGLE-BIT INSTRUCTIONS
AND PROGRAMMING