The 8051 Microcontroller and Embedded

(lily) #1
Department of Computer Scien

ce and Information Engineering

National Cheng Kung University, TAIWAN
HANEL

LOOP AND JUMP INSTRUCTIONSCalculating Short Jump Address


‰To calculate the target address of a short jump (


SJMP, JNC, JZ, DJNZ,


etc.)


¾The second byte is added to the PC of the instruction immediately below the jump


‰If the target address is more than -128 to +127 bytes from the address below the short jump instruction


¾The assembler will generate an error stating the jump is out of range

Free download pdf