8049/8039

INSTRUCTION SET

 

Mnemonic

Description

 

ADD A, R

Adrl register to A

 

ADD A,@R

Add data memory to A

 

ADD A, #data

Add immediate to A

 

ADDC A, R

Add register with carry

 

ADDC A,@R

Add data memory with carry

 

ADDC A, #data Add immediate with carry

 

ANL A, R

And register to A

 

ANLA,@R

And data memory to A

 

ANL A, #data

And immediate to A

 

ORLA, R

Or register to A

S ORLA,@R

Or data memory to A

.IJI

ORLA, #data

Or immediate to A

=

E

XRLA, R

Exclusive Or register to A

=

~

XRLA,@R

Exclusive or data memory to A

XRLA, #data Exclusive or immediate to A

 

INCA

Increment A

 

DECA

Decrement A

 

CLR A

Clear A

 

CPL A

Complement A

 

DAA

Decimal Adjust A

 

SWAP A

Swap nibbles of A

 

RLA

Rotate A left

 

RLCA

Rotate A left through carry

 

RR A

Rotate A right

 

RRCA

Rotate A right through carry

Bytes Cycle

11

22

11

22

11

22

1

22

1

11

22

1

Mnemonic

Description

Bytes Cycle

..

 

 

 

 

c

CALL

Jump to subroutine

2

2

~

..f,

RET

Return

 

2

=

RETR

Retu rn and restore status

 

2

'"

 

 

 

 

 

CLR C

Clear Carry

 

 

:g,

CPL C

Complement Carry

 

 

CLR Fa

Clear Flag a

 

 

.l!

CPL Fa

Complement Flag a

 

 

u.

 

 

 

CLR Fl

Clear Flag 1

 

 

 

CPL Fl

Complement Flag 1

 

 

 

MOV A, R

Move register to A

 

 

 

MOVA,@R

Move ~ata memory to A

 

 

 

MOV A,. #data

Move immediate to A

2

2

 

MOV R,A

Move A to register

1

 

 

MOV@R,A

Move A to data memory

1

 

~

MOV R, #data

Move immediate to register

2

2

MOV @R, #data Move immediate to data memory

2

2

>

 

 

 

 

0Move A, PSW Move PSW to A

::;

mMOV PSW, A Move A to PSW

m

XCH A, R

Exchange A and register

 

C

 

 

XCHA,@R

Exchange A and data memory

 

 

XCHD A,@R

Exchange nibble of A and register

 

 

MOVX A,@R

Move external data memory to A

2

 

MOVX@R,A

Move A to external data memory

2

INA, P OUTL P, A ANL P, #cIate

I ORL P, #data

INS A, BUS

~ OUTL BUS, A ANL BUS, #data

.'"5 ORL BUS,#data

MOVD A, P

MOVD P, A

ANLD P, A

ORLO P, A

~

,I INCRINC@R i' DECR 1:1:

Input port to A

 

2

Output A to port

 

2

And immediate to port

2

2

Or immediate to port

2

2

I nput BUS to A

 

2

Output A to BUS

1

2

And immediate to BUS

2

2

Or immediate to BUS

2

2

Input Expander port to A

 

2

Output A to Expander port

 

2

And A to Expander port

 

2

Or A to Expander port

 

2

Increment registel'

I ncrement data- memory

Decrement reg ister

 

MOVPA,@A

Move to A from current page

2

 

MOVP3 A,@A

Move to A from Page 3

2

.!!

MOVA, T

Read Timer/Counter

 

MOVT, A

Load Timer/Counter

 

c

STRTT

Start Timer

 

=

 

§STRT CNT Start Counter

~STOP TCNT Stop Timer/Counter

EN TCNTI Enable Timer/Counter Interrupt

t-

DIS TCNTI Disable Timer/Counter Interrupt

 

EN I

Enable external interrupt

i

DISI

Disable external interrupt

SEL RBO

Select register bank a

SEL RB1

Select register bank 1

8 SEL MBa

Select memory ba nk a

 

SEL MB1

Select memory bank 1

 

JMP addr

Jump unconditional

2

2

 

JMPP@A

Jump indirect

1

2

 

DJNZ R, addr

Decrement register and skip

2

2

 

JC addr

Jump on Carry = 1

2

2

 

JNC addr

Jump on Carry = a

2

2

 

J Z addr

Jump on A Zero

2

2

 

JNZ addr

Jump on A not Zero

2

2

~

JTO addr

Jump on TO = 1

2

2

~

JNTO addr

Jump on TO = a

2

2

d5

JTl addr

Jump on Tl = 1

2

2

 

JNT1 addr

Jump on T1 = a

2

2

 

JFO addr

Jump on FO = 1

2

2

 

JF 1 addr

Jump on Fl = 1

2

2

 

JTF addr

Jump on timer flag

2

2

 

JNI addr

Jump on INT = a

2

2

 

JBb addr

Jump on Accumulator Bit

2

2

ENTO ClK

Enable Clock output on TO

NOP

No Operatior.

Mnemonics copyright Intel Corporation 1976, 1977, 1978

6·38

AFN·00191A·03

Page 181
Image 181
Intel mcs-48 manual 8049/8039