36
Example:
DEFINT A-D, X
All variables beginning with A, B, C, D, and X will be integer variables.
DEF USER Statement
Purpose:
To specify the starting address of an assembly language subrou-
tine that will be called via the USR function
Format:
DEF USR [<digit>] = <offset>
<digit> is an integer from 0 to 9. The digit corresponds to the
USR routine number whose address is being specified. If <digit>
is omitted, DEF USR0 is assumed.
<offset> is the starting address of the USR routine.
Remarks:
Any number of DEF USR statements may appear in a program to redefine sub-
routine starting addresses, thus allowing access to as many subroutines as nec-
essary.
Program Example:
100
DEF USR1=&H2100
110
POKE &H2100, &H39
120
A=USR1 (A)
130
PRINT A
DIM Statement
Purpose:
To specify the maximum values for array variable subscripts and
allocate storage accordingly
Format:
DIM <variable>(<subscripts>)
[ ,<variable>(<subscripts>)]...
<variable> is a legal variable name.
<subscripts> are the maximum number of elements for each di-
mension of the array. There can be up to 255 subscripts but the
maximum size of the array cannot exceed the amount of memory
available.
Example:
DIM A (10,20), B$(30)
Remarks:
If an array variable name is used without a DIM statement, the maximum value of
the array’s subscript(s) is assumed to be 10. If a subscript is used that is greater
than the maximum specified, an error will occur. The minimum value for a sub-
script is zero.
The DIM statement initializes all the elements of numeric arrays to zero. String
array elements are initialized to NULL.
END Statement
Purpose:
To terminate program execution, close all files, and return to
command level
Format:
END
Remarks:
END statements may be placed anywhere in the program to terminate execu-
tion. Unlike the STOP statement, END closes all open files or devices. An END
statement at the end of the program is optional. BASIC always returns to com-
mand level after an END is executed.
Commands, Statements, and Functions
Summary of Contents for C500-ASC04
Page 1: ...C500 ASC04 ASCII Unit Operation Manual Revised February 2001 ...
Page 5: ...iv ...
Page 7: ...vi ...