9 instruction set, 10 addressing modes, Nstruction – Maxim Integrated Secure Microcontroller User Manual
Page 48: Ddressing, Odes

Secure Microcontroller User’s Guide
48 of 187
4.9 Instruction Set
The secure microcontroller executes an instruction set that is object-code compatible with the industry
standard 8051 microcontroller. As a result, software tools written for the 8051 are compatible with the
secure microcontroller, including cross-assemblers, compilers, and debugging tools.
There are 42 instruction types recognized by the secure microcontroller. When the instruction uses both
source and destination operands, they are specified in the order of “destination, source.”
4.10 Addressing Modes
There are eight addressing modes. Five of these are used to address operands. The other three are used in
instructions that transfer execution of the program to another address (e.g., branch, jump, call). The
modes that address source operands include register addressing, direct addressing, register-indirect
addressing, immediate addressing, and register-indirect with displacement. The first three can also be
used to address a destination operand. Most instructions use operands that are located in the internal data
registers.
The addressing modes used for the control transfer instructions include relative addressing, page
addressing, and extended addressing. The operation of these addressing modes is summarized in the
following paragraphs. An example follows.
Register Addressing
Register addressing is used on operands contained in one of the eight registers (R7–R0) of the currently
selected working register bank. A register bank is selected via a 2-bit field in the PSW SFR. The working
registers can also be accessed through either direct addressing or register-indirect addressing. This is
because the working registers are mapped into the lower 32 bytes of internal data RAM, as previously
discussed.
ADD
A, R4
; Add Accumulator to Working register R4
Direct Addressing
Direct addressing is the only mode available for use on operands within the SFRs. Byte addressing can
also be used to access the 128 internal data registers.
MOV 072H, 074H ; Load direct reg. (072H) with direct reg. (074H)
Bit direct addressing is available on 128 bits located in the internal data registers in the byte addresses of
20H–2FH inclusive. Direct bit addressing is also available in SFRs located at addresses on 8-byte
boundaries starting at 80H (i.e., 80H, 88H, 90H, 98H, ...0F0H, 0F8H).
SETB 00H
; Set addressable bit 00H (D0 in Internal Data Reg. 20H)
Register-Indirect Addressing
Some instructions use register-indirect addressing for accessing operands in other internal data registers.
Use the contents of working register R1 or R0 as a pointer to other internal data registers.
ANL
A, @R0
; Logical AND of Accumulator with Internal Data
; register pointed to by contents of R0