Category : Miscellaneous Language Source Code
Archive   : TIPI.ZIP
Filename : TIPI.ADR

 
Output of file : TIPI.ADR contained in archive : TIPI.ZIP
ABS
Data ( n -- abs(n) )
String ( -- )

Replaces the top value on the data
stack with its absolute value.

ASC
Data ( -- N )
String ( A$ -- A$ )

Places a number N on the data
stack, where N is the ASCII value
of the first character of the
string on the top of the string
stack.

BEEP
Data ( -- )
String ( -- )

Produces a short beep.

BEGIN
Data ( -- )
String ( -- )

Starts a BEGIN UNTIL loop.
When TIPI encounters an UNTIL, it
will branch back to the BEGIN
if the value on the data stack is
FALSE.

BYE
Data ( n -- )
String ( -- )

Exits a TIPI program and returns
to DOS. BYE returns the top value
from the data stack as an error
level to DOS.

CALL
Data ( -- )
String ( program$ param$ -- )
Return ( -- )
Calls a DOS program (program$) with
parameters given in param$. Sets
ERROR to 255 if the call is
unsuccessful. Otherwise ERROR is
set to zero unless the called DOS
program returns it's own error
code.

CASE
Data ( -- )
String ( -- )

Begins a CASE structure.

CASE$
Data ( -- )
String ( -- )

Begins a CASE$ structure.

CHDIR
Data ( -- )
String ( dir$ -- )

Changes the current DOS directory
to the one specified by the top
string on the string stack.

CHR$
Data ( N -- )
String ( -- M$ )

CHR$ converts an integer N from
the data stack to an ASCII
character and places the single
character string on the top of the
string stack.

CLOSE
Data ( N -- )
String ( -- )

Closes file N. N should be either
a 1 or a 2.

CLS
Data ( -- )
String ( -- )

Clears the screen and places the
cursor in the upper left corner.

COLOR
Data ( Foreground Background -- )
String ( -- )

Sets the foreground and background
colors of the screen for
subsequent prints. Colors are as
follows: 0 Black, 1 Blue, 2 Green,
3 Cyan, 4 Red, 5 Magenta, 6 Brown,
7 Gray, 8 Dark Gray, 9 Lt. Blue,
10 Lt. Green, 11 Lt. Cyan,
12 Lt. Red, 13 Lt. Magenta,
14 Yellow, 15 White.
Notes --
1) Background colors 8 to 15
result in blinking text.
2) The COLOR command has no effect
on the Atari Portfolio.

COLOR?
Data ( -- flag )
String ( -- )

Returns TRUE if a color card is
detected, FALSE if a monochrome
card is detected

COLUMN
Data ( -- col )
String ( -- )

Places the column of the current
cursor position on the data stack.

COMMAND$
Data ( -- )
String ( -- Command$ )

Places a string on the string
stack consisting of what followed
the word TIPI on the DOS command
line when TIPI was invoked.

CONSOLE
Data ( -- 0 )
String ( -- )

Places the constant 0 on the data
stack. The CONSOLE instruction is
used for clarity. For example, the
sequence CONSOLE ISINPUT is much
clearer than 0 ISINPUT.

CR
Data ( -- )
String ( -- )

Sends a carriage return to the
current output device.

CURRENT
Data ( -- -2 )
String ( -- )

Places the constant -2 on the data
stack. CURRENT is used for
clarity. For example,
1 CURRENT FILEPOS is much clearer
than 1 -2 FILEPOS.

CURSOR
Data ( N -- )
String ( -- )

If N is zero, the cursor will be
made invisible. If N is non-zero,
the cursor will be made visible.
WARNING! Don't execute a 1 CURSOR
unless you have already executed
at least one 0 CURSOR.

DATE$
Data ( -- )
String ( -- D$ )

Places the current date on the
string stack in the form
"MM-DD-YYYY".

DEFARRAY
Data ( N -- )
String ( -- )

Creates an integer array of N
elements. The word after DEFARRAY
is used as the name of the array.
For example, 10 DEFARRAY BOB would
create a 10 element array named
BOB. When using STORE or FETCH
with ARRAY variables, you must
precede the ARRAY name with a
number indicating the element to
which you are refering.
For example, 3 BOB FETCH will
fetch the contents of the third
element of BOB, while 77 5 BOB
STORE will store the number 77 in
the fifth element of BOB. TIPI has
enough array space for a total of
up to 1000 array elements in a
TIPI program. TIPI also has a
limit of 100 distinct named
variables per program.

DEFAULT
Data ( n -- )
String ( -- )

Used within a CASE structure to
cover any cases not dealt with
by previous OF clauses.

DEFAULT$
Data ( -- )
String ( a$ -- )

Used within a CASE$ structure to
cover any cases not dealt with
by previous OF$ clauses.

DEFINE
Data ( -- )
String ( -- )

DEFINE is used to define new TIPI
instructions. The word following
DEFINE is the name of the new TIPI
instruction. Following this will
be a sequence of TIPI instructions
followed by the word ENDDEF. Once
a new TIPI instruction has been
defined, it may be used just like
any of the built-in TIPI
instuctions. For example,
DEFINE SQUARED DUP * ENDDEF
DEFINE CUBED DUP SQUARED * ENDDEF
will create two new TIPI
instructions, SQUARED and CUBED
which will respectively square and
cube a value on the stack. Up to
100 new TIPI instuctions may be
defined in a TIPI program.

DEFSEG
Data ( N -- )
String ( -- )

DEFSEG is used to define the data
segment used in subsequent PEEK

and POKE instructions. If N is -1,
the data segment will be set back
to TIPI's default data segment
address.

DEFSTR
Data ( -- )
String ( -- )

Creates a new string variable. The
word after DEFSTR is used as the
name of the string. For example,
DEFSTR MARY will create a new
string variable called MARY. STORE
and FETCH are used to place values
into variables and retrieve them
respectively.

DEFTABLE
Data ( -- )
String ( -- )

Creates a new data table. The word
after DEFTABLE is used as the
name of the table. For example,
DEFTABLE FRED will create a new
table called FRED. Following the
name will be a series of numbers or
TIPI instructions followed by the
instruction ENDTABLE. After a table
has been defined, any instruction in
the table may be executed by
preceding the table name with the
number of the instruction to
execute. For example, 4 FRED would
execute the fourth instruction in
FRED.

DEFVAR
Data ( -- )
String ( -- )

Creates a new numeric variable.
The word after DEFVAR is used as
the name of the variable. For
example, DEFVAR HERB will create a
new variable called HERB. STORE
and FETCH are used to place values
into variables and retrieve them
respectively.

DEPTH
Data ( -- N )
String ( -- )

Places N on the data stack, where
N is the depth of the data stack.

DEPTH$
Data ( -- N )
String ( -- )

Places N on the data stack, where
N is the depth of the string stack.

DO
Data ( N -- )
String ( -- )

Begins a DO loop. Processing
continues until a LOOP instruction is
encountered. The loop will be
executed N times.

DROP
Data ( N -- )
String ( -- )

Removes the top value from the
data stack.

DROP$
Data ( -- )
String ( A$ -- )

Removes the top value from the
string stack.

DUP
Data ( N -- N N )
String ( -- )

Duplicates the top value on the
data stack.

DUP$
Data ( -- )
String ( A$ -- A$ A$ )

Duplicates the top value on the
string stack.

ELSE
Data ( -- )
String ( -- )

Used within IF ELSE ENDIF
constructs.

ENDCASE
Data ( -- )
String ( -- )

Ends a CASE structure.

ENDCASE$
Data ( -- )
String ( -- )

Ends a CASE$ structure.

ENDDEF
Data ( -- )
String ( -- )

Ends an instruction definition.

ENDIF
Data ( -- )
String ( -- )

Ends an IF ELSE ENDIF construct.

ENDOF
Data ( -- )
String ( -- )

Ends an OF clause in a CASE
structure.

ENDOF$
Data ( -- )
String ( -- )

Ends an OF$ clause in a CASE$
structure.

ENDTABLE
Data ( -- )
String ( -- )

Ends a table structure.

EOF
Data ( -- -1 )
String ( -- )

Places the constant -1 on the data
stack. EOF is used for clarity.
For example, 1 EOF FILEPOS is much
clearer than 1 -1 FILEPOS.

ERROR
Data ( -- n )
String ( -- )

Places the number of the current
error on the data stack.

EVAL
Data ( -- ? )
String ( I$ -- ? )

Evaluates the instruction I$ from
the string stack.

EXTENDED
Data ( -- n )
String ( -- )

Returns the contents of the system
variable EXTENDED. This is used in
conjuction with INKEY$. Extended
will be 0 if a "normal" key is
pressed, 1 if an "extended" key is
pressed.

FALSE
Data ( -- 0 )
String ( -- )

Places the value of FALSE (0) on
the top of the data stack.

FETCH
Data ( v -- x )
or
String ( -- x$ )

Returns the contents of variable
v. The type of v (numeric or
string) determines if the contents
of the fetch is placed on the data
or the string stack.

FILEPOS
Data ( filenum action -- loc )
String ( -- )

FILEPOS is used to position and
read the value of a file pointer.
The filenum is a previously opened
file number (1 or 2) and the
action is either EOF, CURRENT or a
specific location. The number loc
returned on the data stack is the
location in the file where the
next action will occur. EOF moves
the pointer to the end of the
file, CURRENT keeps it at its
current position and any other
number moves the pointer to that
location in the file.
NOTE: For FILEPOS to move a file
pointer, the file should have been
opened with the "R" option.

FIRSTFILE
Data ( -- )
String ( filespec -- fname$ )

Finds the first file that matches
filespec. Filespec follows the
standard DOS wildcard rules (ie
the filespec can contain "*" or
"?" characters).

GETBYTE
Data ( filenum -- byte )
String ( -- )

Gets a single byte from a file
whose filenumber is filenum. The
file must have been previously
opened and filenum must be either
1 or 2.

GETDIR
Data ( num -- )
String ( -- dir$ )

GETDIR is used to get the current
directory. If num = 0 then GETDIR
returns the directory of the
current drive. If num is 1 GETDIR
uses the A drive, 2 uses the B
drive, etc. The directory returned
does NOT contain the drive letter
or the first "\". Thus, if the
current directory is the root
directory, 0 GETDIR will return
a null string ("").

GETNUM
Data ( -- n )
String ( -- )

Gets a number from the current
input device.

GET$
Data ( -- )
String ( -- string$ )

Gets a string from the current
input device.

IF
Data ( n -- )
String ( -- )

If n is non-zero, statements up to
the next ELSE or ENDIF will be
executed. If N is zero, statements
up to the next ELSE or ENDIF will
be skipped.

INDEX
Data ( -- INDEX )
String ( -- )

Copies the current DO LOOP index
value to the data stack.

INKEY$
Data ( -- )
String ( -- k$ )

Scans the keyboard and returns a
one character string. If no key is
pressed, k$ is null (""),
otherwise k$ is the character
whose key was pressed. If an
extended key was pressed, the
system variable EXTENDED is set to
TRUE.

INSTR
Data ( -- n )
String ( a$ b$ -- a$ b$ )

Searches a$ for the first
occurrence of b$. If b$ is in a$,
n is the location where b$ starts
in a$. If b$ is not in a$, n is
zero.

ISINPUT
Data ( n -- )
String ( -- )

Sets the current input device to
n, where n is either file number 1
or 2 or the CONSOLE. The CONSOLE
is device 0.

ISOUTPUT
Data ( n -- )
String ( -- )

Sets the current output device to
n, where n is either file number 1
or 2, the PRINTER or the CONSOLE.
The CONSOLE is device 0 and the
PRINTER is device 3.

KEY
Data ( -- k )
String ( -- )

Scans the keyboard and returns a
keycode. If no key is pressed, k
is 0.

KILL
Data ( -- )
String ( filespec$ -- )

Kills the specified file.

LCASE$
Data ( -- )
String ( A$ -- a$ )

Converts any uppercase characters
in A$ to lower case.

LEAVE
Data ( -- )
String ( -- )

Sets the current INDEX value to
one, thus ensuring the current DO
LOOP will be ended on this
itteration.

LEFT$
Data ( n -- )
String ( a$ -- l$ )

Returns a string consisting of the
n leftmost characters of a$. For
example, "This is a test" 7 LEFT$
would return "This is".

LEN
Data ( -- len )
String ( a$ -- a$ )

Places the length of a$ on the
data stack.

LF
Data ( -- )
String ( -- )

Sends a line feed to the current
output device.

LOCATE
Data ( row col -- )
String ( -- )

Places the cursor at row, col.

LOOP
Data ( -- )
String ( -- )

Closes a DO LOOP construct.
Decrements INDEX and loops back to
the DO if INDEX > 0, otherwise exits
the loop.

LTRIM$
Data ( -- )
String ( a$ -- b$ )

Trims any leading blanks from a$.

MAKEDIR
Data ( -- )
String ( dirspec$ -- )

Makes the directory specified in
dirspec$. If there is an error,
the system variable ERROR will be
set.

MAX
Data ( A B -- MAX )
String ( -- )

Places the greater of A or B
on the data stack.

MID$
Data ( s l -- )
String ( a$ -- b$ )

Returns b$, a string of l
characters starting at position s
from a$.

MIN
Data ( A B -- MIN )
String ( -- )

Places the lesser of A or B
on the data stack.

MOD
Data ( A B -- C )
String ( -- )

Returns A modulo B.

MOUSE
Data ( AX BX CX DX -- AX BX CX DX )
String ( -- )

Calls the low-level mouse interupt.
See MOUSE.TPI for examples.
Note: This instruction has no effect
on the Atari Portfolio.

NEXTFILE
Data ( -- )
String ( -- file$ )

Returns the next file that matches
the filespec set by a previous
FIRSTFILE command. If there are no
more files matching the filespec,
the null string ("") is returned.

NOT
Data ( n -- m )
String ( -- )

Negates the truth value of a flag.
If n is non-zero, m is zero. If n
is zero, m is one.

OF
Data ( m n -- )
String ( -- )

Must be used within a CASE
structure. If m is equal to
n, the instructions
following the OF will be
executed until an ENDOF is
encountered.

OF$
Data ( -- )
String ( a$ b$ -- )

Must be used within a CASE$
structure. If a$ is equal to
b$, the instructions
following the OF$ will be
executed until an ENDOF$ is
encountered.

OFF
Data ( -- )
String ( -- )

Shuts off an Atari Portfolio. OFF
has no effect on a PC.

OPEN
Data ( N -- )
String ( T$ F$ -- )

Opens a file. N is the file number
and N may be either a 1 or a 2. T$
is the type of open and T$ may be
either "I", "O", "A" or "R" which
stand for Input, Output, Append or
Random respectively. F$ is the name
of the file to open.

OVER
Data ( a b -- a b a )
String ( -- )

Copies the second item on the data
stack to the top.

OVER$
Data ( -- )
String ( a$ b$ -- a$ b$ a $ )

Copies the second item on the data
stack to the top.

PARSE$
Data ( -- )
String ( TEXT$ -- NEWTEXT$ WORD$ )

Parses the first word from TEXT$.

PEEK
Data ( Addr -- Byte )
String ( -- )

Places the contents of Addr on the
stack. Addr is an address in the
current segment. To change the
current segment, use DEFSEG.

PICK
Data ( n -- m )
String ( -- )

Places a copy of the nth item on
the top of the data stack.

PICK$
Data ( n -- )
String ( -- m$ )

Places a copy of the nth item on
the top of the string stack.

POKE
Data ( Addr Byte -- )
String ( -- )

Pokes Byte into Addr. Addr is an
address in the current segment. To
change the current segment, use
DEFSEG.

POP
Data ( -- n )
String ( -- )

Pops a value off the return stack.

PORT?
Data ( -- flag )
String ( -- )

Returns TRUE if TIPI is running on
an Atari Portfolio, FALSE
otherwise.

PRINT
Data ( n -- )
String ( -- )

Prints the number n on the current
output device.

PRINTCHR
Data ( c -- )
String ( -- )

Prints the character whose ASCII
code is c on the current output
device.

PRINTER
Data ( -- 3 )
String ( -- )

Places the constant 3 on the data
stack. The PRINTER instruction is
used for clarity. For example, the
sequence PRINTER ISOUTPUT is much
clearer than 3 ISOUTPUT.

PRINT$
Data ( -- )
String ( a$ -- )

Prints the string a$ on the
current output device.

PUSH
Data ( n -- )
String ( -- )

Pushes a value to the return stack.

PUTBYTE
Data ( B F -- )
String ( -- )

Outputs byte B to file F.

RANDOM
Data ( N -- R )
String ( -- )

Replaces N on the data stack with
R, a random integer selected from
the range 1 to N (inclusive).

RANDOMIZE
Data ( -- )
String ( -- )

Initializes the random number
generator.

REMDIR
Data ( -- )
String ( dir$ -- )

Removes the directory dir$. The
directory should be empty before
you delete it. If REMDIR fails,
the system variable ERROR will be
set.

RENAME
Data ( -- )
String ( oldname$ newname$ -- )

Renames a file.

REPLACE$
Data ( -- )
String ( TEXT$ OLD$ NEW$ -- NEWTEXT$ )

Replaces any occurences of OLD$ in
TEXT$ with NEW$.

RIGHT$
Data ( n -- )
String ( A$ -- B$ )

Returns a string consisting of the
n rightmost characters of a$. For
example, "This is a test" 6 RIGHT$
would return "a test".

ROT
Data ( A B C -- B C A )
String ( -- )

Rotates the top three values on
the data stack.

ROT$
Data ( -- )
String ( a$ b$ c$ -- b$ c$ a$ )

Rotates the top three values on
the string stack.

ROW
Data ( -- row )
String ( -- )

Places the row of the current
cursor position on the data stack.

RTRIM$
Data ( -- )
String ( A$ -- B$ )

Removes any trailing blanks from
A$.

SOUND
Data ( freq dur -- )
String ( -- )

Plays a sound of a given freq and
dur. 0 is the highest freq and
32767 is the lowest.

STORE
Data ( n v -- ) ( v -- )
String ( -- ) or ( s$ -- )

Stores a value into a variable.
The type of v (numeric or string)
determines if the contents of the
store is taken from the data or
the string stack.

STR$
Data ( N -- )
String ( -- N$ )

Converts an integer from the data
stack to a string. For example,
123 STR$ would place the string
"123" on the string stack.

SWAP
Data ( A B -- B A )
String ( -- )

Swaps the top two values on the
data stack.

SWAP$
Data ( -- )
String ( A$ B$ -- B$ A$ )

Swaps the top two values on the
string stack.

TICKS
Data ( -- t )
String ( -- )

Places the current PC tick count
on the data stack. A PC ticks
18.2 times per second, while a
Portfolio ticks either once
every 128 seconds or once every
second.

TIME$
Data ( -- )
String ( -- T$ )

Places the current time (in the
form "HH:MM:SS") on the string
stack.

TRACECOL
Data ( col -- )
String ( -- )

Sets the column that the trace
window will be shown on.

TRACEOFF
Data ( -- )
String ( -- )

Turns instruction tracing off

TRACEON
Data ( -- )
String ( -- )

Turns word tracing on. When
instruction tracing is on, TIPI
displays an informational window
showing the stacks and the
instructions being executed.

TRACEROW
Data ( row -- )
String ( -- )

Sets the row that the trace
window will be shown on.

TRACEVAR
Data ( var -- )
String ( -- )

Adds a var to the trace window.

TRUE
Data ( -- 1 )
String ( -- )

Places the constant 1 on the top
of the data stack.

UCASE$
Data ( -- )
String ( a$ -- A$ )

Converts all the characters in a
string to uppercase.

UNTIL
Data ( N -- )
String ( -- )

Branches back to BEGIN if N is
FALSE, otherwise continues.

VAL
Data ( -- N )
String ( S$ -- )

Converts a string to a number.

VARPTR
Data ( V -- A )
String ( -- )

Places the address of a variable
onto the data stack. This may be
used to PEEK and POKE values
directly into a variable.

VERSION
Data ( -- N )
String ( -- )

VERSION leaves an integer N on
the data stack. N is equal to the
version number times ten (ie if N
is 23 then the TIPI version number
is 2.3).

WEND
Data ( -- )
String ( -- )

WEND branches back to a previous
WHILE.

WHILE
Data ( N -- )
String ( -- )

If N is not equal to zero,
instructions between the WHILE
and WEND will be executed. WEND
will branch back to the WHILE.
If N is equal to zero, the
instructions between the WHILE
and the WEND will will be skipped.

"
Data ( -- )
String ( -- )

Begins and ends a text string.

#
Data ( -- )
String ( -- )

Identifies a comment. Anything
after the # on a line is ignored.

(
Data ( -- )
String ( -- )

Begins a comment.

)
Data ( -- )
String ( -- )

Ends a comment.

*

Data ( A B -- C )
String ( -- )

Multiplies A times B.

+
Data ( A B -- C )
String ( -- )

Adds A and B.

+$
Data ( -- )
String ( A$ B$ -- C$ )

Combines A$ and B$ into one
string.

-
Data ( A B -- C )
String ( -- )

Subtracts B from A.

/
Data ( A B -- C )
String ( -- )

Divides A by B.

<
Data ( A B -- C )
String ( -- )

C is TRUE if A is less than B,
FALSE otherwise.

=
Data ( A B -- C )
String ( -- )

C is TRUE if A equals B, FALSE
otherwise.

=$
Data ( -- C )
String ( A$ B$ -- )

C is TRUE if A$ equals B$, FALSE
otherwise.

>
Data ( A B -- C )
String ( -- )

C is TRUE if A is greater than B,
FALSE otherwise.



  3 Responses to “Category : Miscellaneous Language Source Code
Archive   : TIPI.ZIP
Filename : TIPI.ADR

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/