Discussion in 'Embedded Systems and Microcontrollers' started by PG1995, Apr 21, 2012.
Please have a look on the attachment and kindly help me with the queries. Thank you.
Thanks for giving it a look. But I have solved it. I will continue this thread with related problems.
Please have a look on the attachment and kindly help me. Thank you.
I am not familiar with the 8051 instruction set.
But maybe here is the answer.
There are three types of addressing for CALL and JMP:
Short - 1 byte address (relative) -128 +127 addressing range
Absolute - 1 byte address -> 11-bit address
Long - 2 byte address - > 16-bit address
So your question is answered in the AJMP instruction.
Some bits of the instruction are used for the instruction itself, eg ACALL is the first 5 bits of the first byte, which leaves 3 free bits to use with the second byte for the address.
<ed> Not quite read your question properly, I don't know why SCALL doesn't use the extra bits </ed>.
Thank you, MrChips, Markd77.
I understand it now.