AnsweredAssumed Answered

TOS - RTSHC08.c

Question asked by roberto.m on Sep 1, 2010
Latest reply on Sep 1, 2010 by Tony Papadimitriou

Hi to all,

Looking into RTSHC08.c I've found:

void _ICMP(int j, ...) {
/* DESC:     16 bit compare i <rel> j
   IN:       X:A i, TOS j
   OUT:
   WRITTEN:  A,H,X */

  asm {
                CPX     j:0
                BNE     _ICMP_0
                CMP     j:1
                BEQ     _ICMP_0
                CLRA
                BCS     _ICMP_1
                LDA     #2
  _ICMP_1:       ;
                CMP     #1
  _ICMP_0:       ; // flags are set for i - j
                _PUL_RA
                AIS     #2                      ; // free pushed parameter
                JMP     0,X ! {HX+SR}, {HX+A}
  }
}

 

What is TOS? It is very popular in that file, but no documentation on it. Is it a command? what does it mean (transfer on stack?)?

Outcomes