beautypg.com

Rets, Reti – NEC PD754144 User Manual

Page 285

background image

CHAPTER 11 INSTRUCTION SET

285

User’s Manual U10676EJ3V0UM

RET

Function: [MkI mode]

PC

11-8

(SP), MBE, RBE, 0, 0

(SP+1)

PC

3-0

(SP+2)

PC

7-4

(SP+3), SP

SP+4

[MkII mode]

PC

11-8

(SP), 0, 0, 0, 0

(SP+1)

PC

3-0

(SP+2), PC

7-4

(SP+3)

Ч, Ч, MBE, RBE

(SP+4), SP

SP+6

Restores the contents of the data memory (stack) addressed by the stack pointer (SP) to the program counter (PC),

memory bank enable flag (MBE), and register bank enable flag (RBE), and then increments the contents of the SP.

Caution

All the flags of the program status word (PSW) other than MBE and RBE are not restored.

RETS

Function: [MkI mode]

PC

11-8

(SP), MBE, RBE, 0, 0

(SP+1)

PC

3-0

(SP+2), PC

7-4

(SP+3), SP

SP+4

Then skip unconditionally

[MkII mode]

PC

11-8

(SP), 0, 0, 0, 0

(SP+1)

PC

3-0

(SP+2), PC

7-4

(SP+3)

Ч, Ч, MBE, RBE

(SP+4), SP

SP+6

Then skip unconditionally

Restores the contents of the data memory (stack) addressed by the stack pointer (SP) to the program counter (PC),

memory bank enable flag (MBE), and register bank enable flag (RBE), increments the contents of the SP, and then

skips unconditionally.

Caution

All the flags of the program status word (PSW) other than MBE and RBE are not restored.

RETI

Function: [MkI mode]

PC

11-8

(SP), MBE, RBE, 0, 0

(SP+1)

PC

3-0

(SP+2), PC

7-4

(SP+3)

PSW

L

(SP+4), PSW

H

(SP+5)

SP

SP+6

[MkII mode]

PC

11-8

(SP), 0, 0, 0, 0

(SP+1)

PC

3-0

(SP+2), PC

7-4

(SP+3)

PSW

L

(SP+4), PSW

H

(SP+5)

SP

SP+6

Restores the contents of the data memory (stack) addressed by the stack pointer (SP) to the program counter (PC)

and program status word (PSW), and then increments the contents of the SP.

This instruction is used to return execution from an interrupt processing routine.

I/II

I/II

I/II

This manual is related to the following products: