
7-6
Section
Details of BASIC Commands
146
close
Syntax:
CLOSE
[# <port expression>]
Description:
Statement. Closes a communications port..
<port expression> is an expression returning an integer in the range: [1… 3]. It is also possible in
this command to omit the # preceding the port expression.
On closing a port, the data remaining in the output buffer of the communications port is sent, the
data in the input buffer of the communications port is cleared.
If the port expression is omitted, all open ports will be closed. Once the port has been closed it
cannot be used for data transfer until it has been opened again. The
END
and
NEW
commands
automatically close the communications ports. The
STOP
command does not.
Remarks:
Note:
1.
Port #3 corresponds to the terminal port of the ASC31.
2.
If Port #3 is specified on the ASC11 or ASC21, an “ILLEGAL FUNCTION CALL”
error (code B005) will result.
3.
For the status of the
RTS
and
DTR
signal lines on closing a port, refer to 4.5.2
Transmission Control Signal Timing Chart.
Examples:
CLOSE #2
See also:
END
,
NEW
,
OPEN
cls
Syntax:
CLS
[# <port expression>]
Description:
Statement. Clears the screen.
<port expression> is an expression returning an integer in the range: [1… 3].
If the port number is omitted, the number of the terminal port will be used (#1 for the C200H-
ASC11/21 and #3 for the C200H-ASC31).
Remarks:
Note:
1.
Port #3 corresponds to the terminal port of the ASC31.
2.
If Port #3 is specified on the ASC11 or ASC21, an “ILLEGAL FUNCTION CALL”
error (code B005) will result.
Examples:
CLS
See also:
com on/off/stop
Syntax:
COM
[<port expression>] (
ON
|
OFF
|
STOP
)
Description:
Statement. Enables, disables, or stops the interrupt defined by the
ON COM
interrupt statement.
<port expression> is an expression returning an integer in the range: [1… 2].
If the port number is omitted, the port number will be #1.
ON
enables the interrupt. If a
COM
interrupt occurs while the interrupt is enabled, program
execution branches to the defined subroutine for interrupt processing.
OFF
disables the interrupt. All subsequent
ON COM
interrupts are ignored.
STOP
masks and enables the interrupt. If an interrupt is received, it is stored in memory but
program execution is not branched to the interrupt subroutine. Program execution will be
branched to the stored interrupt’s subroutine when the interrupt is unmasked with the COM ON
statement.
Remarks:
Note:
1.
The
COM ON
/
OFF
/
STOP
statement can only be executed after an
ON COM
statement
has been executed.
2.
Interrupts are disabled immediately after execution of ON COM GOSUB.
Examples:
COM 1 STOP
See also:
ON COM
Содержание C200H-ASC11
Страница 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Страница 2: ...iv...
Страница 4: ...vi...