The 8051 Microcontroller and Embedded

(lily) #1
Department of Computer Scien

ce and Information Engineering

National Cheng Kung University, TAIWAN
HANEL

LOOP AND JUMP INSTRUCTIONSConditional Jumps


MOV A,R0 ;A=R0JZ OVER ;jump if A = 0MOV A,R1 ;A=R1 JZ OVER ;jump if A = 0...

‰Jump only if a certain condition is metJZ label ;jump if A=0OVER: Determine if R5 contains the value 0. If so, put 55H in it.


MOV A,R5 ;copy R5 to AJNZ NEXT ;jump if A is not zeroMOV R5,#55H
NEXT: ...

Can be used only for register A, not any other register
Free download pdf