III.5 The 8051 Instruction Set

ASEM-51 implements all 8051 machine instructions including generic jumps and calls. The assembler implements two instructions

JMP  <address>
CALL <address>

that do not represent a specific opcode: generic jump and call. These instructions will always evaluate to a jump or call, not necessarily the shortest, that will reach the specified address.
JMP may assemble to SJMP, AJMP or LJMP, while CALL can only evaluate to ACALL or LCALL. Note that the assembler decision may not be optimal. For code addresses that are forward references, the assembler always generates LJMP or LCALL respectively. However, for backward references this is a powerful tool to reduce code size without extra trouble.

With the $PHILIPS control, ASEM-51 can be switched to the reduced instruction set of the Philips 83C75x family of microcontrollers. This disables the LJMP, LCALL, and MOVX instructions as well as the XDATA and XSEG pseudo instructions, and generic jumps and calls will always assemble to absolute addressing.

The rest of the 8051 instruction mnemonics is listed in Appendix D. Appendices I and J are containing tables of all 8051 instructions with their opcodes, mnemonics, arguments, lengths, affected flags and durations. The comprehensive example program DEMO.A51 provided shows all the 8051 instructions in a syntactical context.

For detailed information on the Intel MCS-51 architecture and instruction set refer to the MCS® 51 Microcontroller Family User's Manual. (Requires full Internet access!)

All MCS-51 instruction mnemonics are copyright © by Intel Corporation!



[contents] [up] [back] [next]