
62
Example:
TIME$ = “09:10:00”
PRINT TIME$
Remarks:
In the form <y$> = TIME$, TIME$ returns an eight character string in the
form: hh:mm:ss. If <x$> is not a valid string, an error message will be displayed.
USR Function
Purpose:
To call a user-written assembly language program.
Format:
USR [<number>](<argument>)[,W]
<number> is a digit from 1 to 9 that was previously assigned to
the given assembly program with the DEF USR statement.
<x> is an argument used to pass data from the BASIC program
to the assembly program.
Example:
J = USR2(I),W
Remarks:
If <number> is omitted, the default value is zero.
If the W parameter in the USR statement is not specified then the watchdog timer
refresh will be performed as usual. If the W parameter is specified, then the user
must include a watchdog timer refresh routine in the assembly program.
The watchdog timer prevents the program from overrunning. When the set time
has run out, the ASCII Unit is reset, and the message “I/O ERR” is displayed on
the programming console of the PC.
By refreshing the watchdog timer before its set value is up, the program can be
continuously executed.
To refresh the watchdog timer in the assembly program, execute the following
two steps every 90 milliseconds when, W has been designated:
AIM #DF,03
OIM #20,03
The following table lists the Argument type and its corresponding Accumulator
code number.
Accumulator
Value
Argument Type
2
Integer
3
Character
4
Single-precision, real number
5
Double-precision, real number
Index register X contains the memory address where the argument is stored.
The address differs as shown below depending on the type of the argument.
Commands, Statements, and Functions
Содержание C500-ASC04
Страница 1: ...C500 ASC04 ASCII Unit Operation Manual Revised February 2001 ...
Страница 5: ...iv ...
Страница 7: ...vi ...