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?
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
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.
Then mnemonic is not what's new about that --- it's the same mnemonic, for the same machine instruction byte. Only the size of the operand changes, if the assembler was put into 390 contiguous moude.
The LJMP could be coded in the usual way if $MOD_CONT weren't a "primary" control, i.e. if one could change back and forth between $MOD_CONT and $MOD51 within a source file. But as-is, LJMP would do the wrong thing, so one has to use either DB 02 as an LJMP in disguise (as seen in the OP), or an SJMP instead of LJMP.
most "fancy newfangled derivatives" run in 'native mode' of not told otherwise, I guess, for 'drop in replacement purposes'.
Erik