TOS - RTSHC08.c

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TOS - RTSHC08.c

Jump to solution
991 Views
roberto_m
Contributor III

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?)?

Labels (1)
0 Kudos
1 Solution
395 Views
tonyp
Senior Contributor II

TOS (in this context) usually stands for Top Of Stack.

View solution in original post

0 Kudos
1 Reply
396 Views
tonyp
Senior Contributor II

TOS (in this context) usually stands for Top Of Stack.

0 Kudos