•  Back 
  •  Instruction Set 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : MC56001 Documentation
Author      : JAY Software
Version     : 1.0 (19/11/1997)
Subject     : Programming/Assembler
Nodes       : 152
Index Size  : 4106
HCP-Version : 4
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : 
@help       : 
@options    : -i +y +z -t4
@width      : 100
View Ref-FileRTS                     Return from Subroutine

Operation:
    SSH -> PC; SP - 1 -> SP

Assembler Syntax:
    RTS

Description:
    Pull the program counter (PC) from the stack. The previous program
counter is lost. The status register (SR) is not affected.

Restrictions:
    Due to pipelining in the program controller and the fact that the
RTS instruction accesses certain controller registers, the RTS
instruction must be immediately preceded by any of the following
instructions:

Immediately before RTS:
    MOVEC to LA, LC, SSH, SSL, or SP
    MOVEM to LA, LC, SSH, SSL, or SP
    MOVEP to LA, LC, SSH, SSL, or SP
    MOVEC from SSH
    MOVEM from SSH
    MOVEP from SSH


    An RTS instruction cannot be the LAST instruction in a DO
loop (at LA).

    An RTS instruction cannot be repeated using the REP instruction.

Condition Codes:
    The condition codes are not affected by this instruction.

Instruction Format:
    RTS

Timing:     4+rx oscillator clock cycles

Memory:     1 program word