![background image](http://html1.mh-extra.com/html/omron/c500-asc04/c500-asc04_operation-manual_743033072.webp)
61
<port> is the port number (1 or 2).
Example:
A$ = INPUT$(10,#1)
Remarks:
All characters except CTRL+X can be read, including CR and LF: CR and LF
cannot be read with the LINE INPUT statement.
The BASIC LED indicator on the ASCII Unit will blink indicating that the unit is
waiting for input. It will continue blinking until the specified number of characters
is entered.
Example Program:
10
CLS
20
A$ = INPUT$ (1)
30
A$ = HEX$ (ASC(A$))
40
PRINT A$
50
GOTO 20
Remarks:
displays key character codes.
LOC Function
Purpose:
To return the number of data items in the specified port buffer.
Format:
x = LOC(<port#>)
Example:
A = LOC(2)
Remarks:
The port specified must already be open and in input mode. The number of data
items in the buffer of the specified port is given in byte units.
PEEK Function
Purpose:
To read the contents of a specified memory address
Format:
PEEK(<I>)
<I> is the memory location and must be in the range of 0 to
65535 (&HFFFF).
Example:
A = PEEK(&H3000)
Remarks:
If the specified address is not an integer, it is converted into one.
Do not try to read reserved system addresses &H0000 to &H1FFF and &H8000
to HFFFF.
TIME$ Function
Purpose:
Sets or gives the time
Format:
TIME$ = <x$>
<y$> = TIME$
<x$> is a string expression indicating the time to be set. The fol-
lowing formats may be used:
hh: sets the hour (minutes and seconds 00)
hh:mm: sets the hours and minutes (seconds 00)
hh:mm:ss: sets the hours, minutes, and seconds
<y$> is a string variable to which the current value of the time is
to be assigned.
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 ...