In the following code find the offset for the SJMP instructi

In the following code, find the offset for the SJMP instruction. \"--\"\" are spacers that represent a number of instructions.

Solution

It is a short jump from SJMP ST i.e,811A.This is a Backward jump.

Current PC will be +2 i.e,811A+2=811C.Since PC will always points to next instruction to be executed.

Hence offset = LABEL location - current PC

=8100-811C= -1C

In binary -1C=11100100 which is E4 in Hex.

 In the following code, find the offset for the SJMP instruction. \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site