How exactly is JMP XXXXH; executed ? First the PC(Program counter) will contain the address where this instruction is present. In first machine cycle opcode will be fetched and PC will be incremented . Now in the second machine cycle we have to read the second byte of this instruction which is nothing but half of the address where we want to jump . So it should be loaded into half of PC. But then how do we know the address of the 3rd byte of this instruction. I'm confused


There is an internal temporary register (not shown in the ISA documentation) that holds the second byte of the instruction while the third byte is being fetched. After that, the PC is updated with the full 16-bit value.

  • \$\begingroup\$ Don't we then need another t state to load the final address in PC .This would give us total T-states to be 11. Why are there 10 only ? \$\endgroup\$ – Bisma Apr 19 '20 at 11:58
  • \$\begingroup\$ The transfer of the two bytes to the PC occurs in parallel, during the final T state. \$\endgroup\$ – Dave Tweed Apr 19 '20 at 11:59
  • \$\begingroup\$ Is this what happens ...second byte is loaded into temporary register during second machine cycle . After that third byte is loaded into PC directly (as we can overwrite the address at this point) during third machine cycle and at same time contents of temporary register are loaded into other half of PC \$\endgroup\$ – Bisma Apr 19 '20 at 12:07
  • \$\begingroup\$ Yes, that's it. \$\endgroup\$ – Dave Tweed Apr 19 '20 at 12:08
  • \$\begingroup\$ Thankyou so much :) \$\endgroup\$ – Bisma Apr 19 '20 at 12:09

The 8085 instruction set is classified into 3 categories by considering the length of the instructions. In 8085, the length is measured in terms of “byte” rather then “word” because 8085 microprocessor has 8-bit data bus. Three types of instruction are: 1-byte instruction, 2-byte instruction, and 3-byte instruction. Source: Geeks for Geeks.

The article goes on to explain ...

  1. Three-byte instructions –

Three-byte instruction is the type of instruction in which the first 8 bits indicates the opcode and the next two bytes specify the 16-bit address. The low-order address is represented in second byte and the high-order address is represented in the third byte.

Note – These instructions would require three memory locations to store the binary codes. The mnemonic is always followed by 16-bit (or adr).

The three byte instruction won't execute until it has loaded the full address.

Task- Transfer the program sequence to the memory location 2085H.
Mnemonic- JMP 2085H
Opcode- JMP
Operand- 2085H
Hex Code- C3

  • \$\begingroup\$ I expect the task description should read "the memory location 2085H" to match the operand. \$\endgroup\$ – Graham Nye Apr 19 '20 at 14:11
  • \$\begingroup\$ Yes, 2050 was used in Example 1 on the linked article. I'd say it was a copy'n'paste error on their part. Thanks. \$\endgroup\$ – Transistor Apr 19 '20 at 14:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.