Compare between SJMP and LJMP in terms of number of bytes ea
Solution
LJMP (long jump) It is a 3-byte instruction in which the first byte is the opcode, and the second and third bytes represent the 16-bit address of the target location. The 2-byte target address allows a jump to any memory location from 0000 to FFFFH. causes the program to branch to a destination address defined by the 16-bit operand in the jump instruction. Because a 16-bit address is used the instruction can cause a jump to any location within the 64KByte program space (216 = 64K).
SJMP (short jump)
it is 2 byte instruction where first byte is the opcode i.e. operation code and the second byte is the address location i.e. it uses a singe byte address. This address is a signed 8-bit number and allows the program to branch to a distance –128 bytes back from the current PC address or +127 bytes forward from the current PC address. The address mode used with this form of jumping (or branching) is referred to as relative addressing, introduced earlier, as the jump is calculated relative to the current PC address.
LJMP requires 3 bytes of program memory and can jump to any address
in the program.
SJMP requires 2 bytes of program memory, but can only jump to an ad-
dress within 128 bytes of itself.
both using 2 clock cycles
2)i suppose the target address of jump backwar is maximum of 128 bytes from the current program counter it might help
