Limited Instruction Set One (Spring 2022)

 

Arithmetic instructions

 

 

 

 

ADDC A, Rn

C

AC

F0

RS1

RS0

OV

 

P

 

Bytes

1

Cycles

1

Encoding

00111nnn

Operation

A = A + C + Rn

Example

ADDC A, R3   è  3B

 

ADDC A, #immediate

C

AC

F0

RS1

RS0

OV

 

P

 

Bytes

2

Cycles

1

Encoding

00110100

immediate

Operation

A = A + C + immediate

Example

ADDC A, #0F7h  è 34 F7

ADDC A, #02Bh  è 34 2B

 

Logical instructions

ORL A, Rn

C

AC

F0

RS1

RS0

OV

 

P

 

Bytes

1

Cycles

1

Encoding

01001nnn

Operation

ORL

A = A OR Rn

Example

ORL A, R5   è 4D

 

ORL A, #immediate

C

AC

F0

RS1

RS0

OV

 

P

 

Bytes

2

Cycles

1

Encoding

01000100

immediate

Operation

ORL

A = A OR immediate

Example

ORL A, #8Eh     è 44 8E

ORL A, #0B6h    è 44 B6

 

 

Branching instructions

 

LCALL addr16

C

AC

F0

RS1

RS0

OV

 

P

 

Bytes

3

Cycles

2

Encoding

00010010

A15-A8

A7-A0

Operation

LCALL

PC = PC + 3

SP = SP + 1

(SP) = PC[7-0]

SP = SP + 1

(SP) = PC[15-8]

PC = addr16

Example

LCALL 0AB34H  è 12 AB 34

LCALL 56CDH   è 12 56 CD

 

The End