•  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-FileJSSET                   Jump to Subroutine if Bit Set

Operation:
    If S[n] = 1,
    then SP+1->SP;PC->SSH;SR->SSL;xxxx->PC
    else PC+1->PC

Assembler Syntax:
    JSSET   #n,X:ea,xxxx
    JSSET   #n,X:aa,xxxx
    JSSET   #n,X:pp,xxxx
    JSSET   #n,Y:ea,xxxx
    JSSET   #n,Y:aa,xxxx
    JSSET   #n,Y:pp,xxxx
    JSSET   #n,S,xxxx

Description:
    Jump to the subroutine at the 16-bit absolute address in program
memory specified in the instruction's 24-bit extension word if the
nth bit of the source operand S is set. The bit to be tested is
selected by an immediate bit number from 0-23. If the nth bit of the
source operand S is set, the address of the instruction immediately
following the JSSET instruction (PC) and the SR are pushed onto the
system stack. Program execution then continues at the specified
absolute absolute address in the instruction's 24-bit extension word.
If the specified memory bit is not set, the PC is incremented, and
the extension word is ignored. However, the address register specified
in the effective address field is always updated independently of the
state of the nth bit. All address register indirect addressing modes
may be used to reference the source operand S. Absolute short and I/O
short addressing modes may also be used.

Restrictions:
    A JSSET instruction used within a DO loop cannot specify the loop
address (LA) as its target.

    A JSSET located at LA, LA-1, or LA-2 ofa DO loop, cannot specify the
program controller registers SR, SP, SSH, SSL, LA, or LC as its target.

    JSSET SSH or JSSET SSL cannot follow an instruction that changes the
SP.

    A JSSET instruction cannot be repeated using the REP instruction.

Example:
    JSSET #$17,Y:<$3F,$100  ;go to sub. at P:$0100 if bit 23 in Y:$3F
                            is set

Explanation of Example:
    In this example, program execution is transferred to the subroutine
at absolute address P:$0100 in program memory if bit 23 of Y memory
location Y:$003F is a one. If the specified bit is not set, no jump is
taken and the PC is incremented by 1.

Condition Codes:
    The condition codes are notaffected by this instruction.

Instruction Format:
    JSSET   #n,X:ea,xxxx
    JSSET   #n,X:aa,xxxx
    JSSET   #n,X:pp,xxxx
    JSSET   #n,Y:ea,xxxx
    JSSET   #n,Y:aa,xxxx
    JSSET   #n,Y:pp,xxxx
    JSSET   #n,S,xxxx


    xxxx = 16-bit Absolute Address

    #n = bit number

    ea = (Rn)-Nn
         (Rn)+Nn
         (Rn)-
         (Rn)+
         (Rn)
         (Rn+Nn)
         -(Rn)

    aa = 6-bit Absolute Short Address

    pp = 6-bit I/O Short Address

    S  = ( X0,X1,Y0,Y1,A0,B0,A2,B2,A1,B1,A,B,
            Rn,Nn,Mn,SR,OMR,SP,SSH,SSL,LA,LC)

Timing:     6 + jx oscillator clock cycles

Memory:     2 program words