•  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-FileJSCLR                   Jump to Subroutine if Bit Clear

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

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

Description:
    Jump to 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 clear. 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 clear, the address of the instruction immediately following the
JSCLR instruction (PC) and the SR are pushed onto the system stack.
Program  execution then contintinues at the specified absolute address
in the instruction's 24-bit extension word. If the specified memory bit
is not clear, the PC is incremented and the extension word is ignored.
However, the adress 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 adressing modes may also
be used.

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

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

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

    A JSCLR instrcuction cannot be repeated using the REP instruction.

Example:
    JSCLR   #$1,Y:<<$FFE3,$1357     ; go sub. at P:$1357 if bit 1 in
                                    ; Y:$FFE3 is clear

Explanation of Example:
    In this example, program execution is transferred to the subroutine
at absolute address P:$1357 in program memory if bit 1 of the external
I/O location Y:<<$FFE3 is a zero. If the specified bit is not clear, no
jump is taken and the PC is incremented by 1.

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

Instruction Format:
    JSCLR   #n,X:ea,xxxx
    JSCLR   #n,X:aa,xxxx
    JSCLR   #n,X:pp,xxxx
    JSCLR   #n,Y:ea,xxxx
    JSCLR   #n,Y:aa,xxxx
    JSCLR   #n,Y:pp,xxxx
    JSCLR   #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