home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_100
/
122_01
/
arith
< prev
next >
Wrap
Text File
|
1984-03-07
|
2KB
|
78 lines
PISTOL'S ARITHMETIC OPERATORS:
copyright (C) 1983 by E. E. Bergmann
operators defined in alphabetical(ASCII) order
meaning of NTT,TOS
:
::
*********************************************************
* *
* PISTOL-Portably Implemented Stack Oriented Language *
* Version 2.0 *
* (C) 1983 by Ernest E. Bergmann *
* Physics, Building #16 *
* Lehigh Univerisity *
* Bethlehem, Pa. 18015 *
* *
* Permission is hereby granted for all reproduction and *
* distribution of this material provided this notice is *
* included. *
* *
*********************************************************
:
::
/ NTT TOS --> NTT/TOS
/MOD NTT TOS --> (NTT/TOS) (NTT MOD TOS), see MOD
* NTT TOS --> NTT*TOS
+ NTT TOS --> NTT+TOS
- NTT TOS --> NTT-TOS
1+ TOS --> TOS+1
1+W! TOS -->
Increments word location pointed to by TOS by 1.
1- TOS --> TOS-1
3W- TOS --> TOS-3*W
ABS TOS -->ABS(TOS)
MAX NTT TOS --> MAX(NTT,TOS), signed comparisons
MIN NTT TOS --> MIN(NTT,TOS), signed comparisons
MINUS TOS --> -TOS
MOD NTT TOS --> (NTT MOD TOS), sign from NTT
examples: 1234 10 --> 4
-1234 10 --> -4
1234 -10 --> 4
-1234 -10 --> -4
TRANS TOS --> USER+W*TOS
TRANS@ 'TRANS@ : TRANS @ ;
USER+ TOS --> TOS+USER
W* TOS --> TOS*W
W+ TOS --> TOS+W
W+W! TOS -->
Increments word location pointed to by TOS by W.
W- TOS --> TOS-W
:
::
TOS - "Top Of Stack"
NTT - "Next to Top of stack"
:
or all reproduction and *
* distribution of this ma