Microcontroller – Rainbow Electronics AT89C2051 User Manual

Page 10

Advertising
background image

Microcontroller

5-56

Table 4. Compare Modifiers

Notes:

1. These instructions must immediately follow a CMP instruction.

2. NOT instruction is used to implement explicit NE.

Table 5. Jump Instructions

Note:

1. Switch table format: addr1, value1, addr2, value2, ... 0, default addr

Table 6. Stack Manipulation Instructions

Note:

1. Explicit POP instruction are not required since various addressing modes use and remove the top item on stack.

Name

Description

LT

ACC = 1 if less than (signed)

LE

ACC = 1 if less than or equal (signed)

GT

ACC = 1 if greater than (signed)

GE

ACC = 1 if greater than of equal (signed)

ULT

ACC = 1 if lower than (unsigned)

ULE

ACC = 1 if lower than or same (unsigned)

UGT

ACC = 1 if higher than (unsigned)

UGE

ACC = 1 if higher than or same (unsigned)

Name

Description

JMP

Long jump (16-bit absolute)

JZ

Long jump if ACC=0 (16-bit absolute)

JNZ

Long jump if ACC!=0 (16-bit absolute)

SJMP

Short jump (8-bit PC offset)

SJZ

Short jump if ACC=0 (8-bit PC offset)

SJNZ

Short jump if ACC!=0 (8-bit PC offset)

IJMP

Indirect jump (Address in ACC)

SWITCH

Jump through switch table (ACC=value, INDEX=table)

Name

Description

CALL

Call subroutine (16-bit absolute address)

RET

Return from subroutine

ALLOC

Allocate space on stack (8-bit value)

FREE

Release space on stack (8-bit value)

PUSHA

Push ACC on stack

PUSHI

Push INDEX on stack

TAS

Copy ACC to SP

TSA

Copy SP to ACC

Advertising