This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DS390:"DB 02h ,DW Reset" and ljmp

for example,inst390.uv2 project in the C:\Keil\C51\EXAMPLES\Dallas 390\Asm,in disassembly window ,the first instruction is displayed as "c:0x000000 020003 LJMP RESET(c:0003)" with source code :
DB 02H ; LJMP in Classic 8051 Mode
DW WORD0 Reset
if "ljmp Reset",it is displayed as "c:0x000000 020000".
why ljmp displayed in such a way in classic 8051 mode without ACON set?

Parents
  • why ljmp displayed in such a way in classic 8051 mode without ACON set?

    On the 8051 architecture, the reset vector is at address 0000h and the first interrupt is at address 0003h. This means there are only 3 bytes available for the reset vector.

    On the standard 8051, this is encoded as an LJMP instruction which takes exactly 3 bytes.

    On the 390, the LJMP instruction takes 4 bytes and would overwrite the first byte of the first interrupt vector. So, the "OLD" LJMP instruction is encoded as a DB 02 (which is the 8051 LJMP) rather than the fancy new 4-byte LJMP mnemonic of the 390.

    Jon

Reply
  • why ljmp displayed in such a way in classic 8051 mode without ACON set?

    On the 8051 architecture, the reset vector is at address 0000h and the first interrupt is at address 0003h. This means there are only 3 bytes available for the reset vector.

    On the standard 8051, this is encoded as an LJMP instruction which takes exactly 3 bytes.

    On the 390, the LJMP instruction takes 4 bytes and would overwrite the first byte of the first interrupt vector. So, the "OLD" LJMP instruction is encoded as a DB 02 (which is the 8051 LJMP) rather than the fancy new 4-byte LJMP mnemonic of the 390.

    Jon

Children