beautypg.com

Microcontroller, Appendix a — virtual machine architecture – Rainbow Electronics AT89C2051 User Manual

Page 8

background image

Microcontroller

5-54

Appendix A — Virtual Machine Architecture

Table 1. Fundamental Resource Set

Table 2. General Addressing Modes

Notes:

1. Addressing mode is in lower 3 bits of op code.

2. Mode S+ always pops 16 bits from stack. Only 16-bit values can be pushed.

3. Modes [S+] and [S] will always use a 16-bit address on the top pf the stack but the final target can be 8 or 16 bits.

ACC

16-bit accumulator 8-bit accesses are auto zero-filled

INDEX

16-bit addressing register, cannot be manipulated as 8 bits

SP

16-bit stack pointer

PC

16-bit program counter

Syntax

Coding

Description

#n

x0 ii(ii)

Immediate (8 or 16-bit operand)

aaaa

x1 dd dd

Direct memory address

I

x2

Indirect (through INDEX register) no offset

n,I

x3 oo

Indirect (through INDEX register) with 8-bit offset

n,S

x4 oo

Indirect (through SP) with 8-bit offset

S+

x5

On Top of Stack (remove)

[S+]

x6

Indirect through TOS (remove)

[S]

x7

Indirect through TOS (leave on stack)