jump and call instructions.pptx

750 views 9 slides Apr 20, 2023
Slide 1
Slide 1 of 9
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9

About This Presentation

fff


Slide Content

JUMP AND CALL INSTRUCTIONS

Address range of Jump and Call Instructions A jump or call instruction, replaces the contents of PC with a new address. The difference in bytes, of the new address from the address in the program where the jump or call is located is called the range of the jump or call. the instructions can have different ranges.

Jump Instruction Ranges

Storing and retrieving return address

Range of Jump and Call instructions Relative range: +127D to -128D. Short Absolute range: 2kbytes range Long Absolute range: 0000h to FFFFh

Absolute Range

Unconditional Jump Mnemonic Operation JMP addr Jump to address “ addr ” JMP @A+DPTR Jump to address A+DPTR NOP No operation.

Bit Jump Instructions Mnemonic Operation JC addr Jump to relative address addr if carry flag is set to 1 JNC addr Jump to relative address addr if carry flag is reset to 0 JB b,addr Jump to relative address addr if addressable bit b is set to 1 JNB b, addr Jump to relative address addr if addressable bit b is reset to 0 JBC b, addr Jump to relative address addr if addressable bit b is set. Then clear the bit to 0.

Byte jump Instructions Mnemonic CJNE A, addr1, addr2 CJNE A, #n, addr CJNE Rn , #n, addr CJNE @ Rp , #n, addr DJNZ Rn , addr DJNZ addr1, addr2 JZ addr JNZ addr
Tags