
Input Character or Line From the RS-232 Port
Syntax
GET #IOCB,varb
INPUT #IOCB,varb$
Remarks
These functions input data from the RS-232 port; the GET statement inputs the numeric value of one
character into a numeric variable and the INPUT statement inputs a string of characters into a string
variable. On the INPUT statement, if the data is a numerical ASCII string, you may read the data into
a numeric variable. Input strings are terminated by an end-of-line (EOL)
character.
Note that the IOCB must be opened for read or read/write (modes 4 or 12), but whether in
concurrent mode or not has no effect on GET/INPUT statement operation. Refer to your BASIC
reference manual for more information on these statements.
Output Character or Line To the RS-232 Port
Syntax
PUT #IOCB,exp
PRINT #IOCB;exp$
Remarks
These functions output data to the RS-232 port; the PUT statement outputs the numeric value of one
character to the port, and the PRINT statement outputs a string of characters to the port. The syntax
of the PRINT statement is the same as a normal PRINT statement except that the "#IOCB;"
precedes the expression.
Note that the IOCB must be opened for write or read/write (mode 8 or 12), but whether in concurrent
mode or not has no effect on GET/INPUT statement operation. Refer to your BASIC reference
manual for more information on these statements.
Reading the Port Status
Syntax
STATUS #IOCB,DUMMY
FLAGS = PEEK(746) : REM Error bits relating to status history
LINESTAT = PEEK(747) : REM Status of handshake lines
or
STATUS #IOCB,DUMMY
FLAGS = PEEK(746) : REM Error bits relating to status history
INCHARS = PEEK(747) : REM Number of chars in input buffer
OUTCHARS = PEEK(749) : REM Number of chars in output buffer
Remarks
These statement sequences are useful for determining many facts about the state of the RS-232
port. The first syntax is used when in pseudo "block mode I/O" (same as "non-concurrent"), whereas
the second is used in concurrent mode I/O. Notice that the variable DUMMY is simply a CIO status
of the success of the STATUS command. If there were an error (DUMMY<>1), then BASIC would
halt and give an error message (unless a TRAP was performed prior to the STATUS).
The block mode STATUS (first syntax) returns a status history of the port (in FLAGS) and the state
MIO Service Manual
Page 66
Summary of Contents for Mio
Page 1: ......
Page 3: ...MIO Service Manual Page 2 ...
Page 4: ...MIO Service Manual Page 3 ...
Page 5: ...MIO Service Manual Page 4 ...
Page 6: ...MIO Service Manual Page 5 ...
Page 7: ...MIO Service Manual Page 6 ...
Page 8: ...MIO Service Manual Page 7 ...
Page 10: ...U1 74LS20 DUAL 4 INPUT NAND GATE MIO Service Manual Page 9 ...
Page 11: ...U2 U12 U24 74LS175 QUAD D FLIP FLOP MIO Service Manual Page 10 ...
Page 12: ...MIO Service Manual Page 11 ...
Page 13: ...U3 U4 74LS138 3 TO 8 LINE DECODER MIO Service Manual Page 12 ...
Page 14: ...MIO Service Manual Page 13 ...
Page 15: ...U5 7407 HEX BUFFER DRIVER MIO Service Manual Page 14 ...
Page 16: ...U6 6551 ASYNCHRONOUS COMMUNICATION INTERFACE ADAPTER ACIA MIO Service Manual Page 15 ...
Page 17: ...MIO Service Manual Page 16 ...
Page 18: ...MIO Service Manual Page 17 ...
Page 19: ...MIO Service Manual Page 18 ...
Page 20: ...MIO Service Manual Page 19 ...
Page 21: ...MIO Service Manual Page 20 ...
Page 22: ...MIO Service Manual Page 21 ...
Page 23: ...U7 U10 74LS04 HEX INVERTER MIO Service Manual Page 22 ...
Page 24: ...U8 74LS02 QUAD 2 INPUT NOR GATE MIO Service Manual Page 23 ...
Page 25: ...U9 U25 74LS93 4 BIT BINARY COUNTER MIO Service Manual Page 24 ...
Page 26: ...MIO Service Manual Page 25 ...
Page 27: ...MIO Service Manual Page 26 ...
Page 28: ...U11 74LS10 TRIPLE 3 INPUT NAND GATE MIO Service Manual Page 27 ...
Page 29: ...U13 U21 U67 U69 74LS00 QUAD 2 INPUT NAND GATE MIO Service Manual Page 28 ...
Page 31: ...U15 27C128 16K x 8 EPROM MIO Service Manual Page 30 ...
Page 32: ...U16 U20 74LS73A DUAL J K FLIP FLOP WITH CLEAR MIO Service Manual Page 31 ...
Page 33: ...MIO Service Manual Page 32 ...
Page 34: ...MIO Service Manual Page 33 ...
Page 35: ...U17 MC1489P QUAD LINE RECIEVER MIO Service Manual Page 34 ...
Page 36: ...U18 LM3086 TRANSISTOR ARRAY MIO Service Manual Page 35 ...
Page 37: ...U19 74HC4046 PHASE LOCKED LOOP MIO Service Manual Page 36 ...
Page 38: ...MIO Service Manual Page 37 ...
Page 39: ...MIO Service Manual Page 38 ...
Page 40: ...MIO Service Manual Page 39 ...
Page 41: ...MIO Service Manual Page 40 ...
Page 42: ...MIO Service Manual Page 41 ...
Page 43: ...MIO Service Manual Page 42 ...
Page 44: ...U22 74LS139 DUAL 1 OF 4 DECODER DEMULTIPLEXER MIO Service Manual Page 43 ...
Page 45: ...MIO Service Manual Page 44 ...
Page 46: ...U23 74LS158 QUAD 2 INPUT MULTIPLEXER MIO Service Manual Page 45 ...
Page 47: ...MIO Service Manual Page 46 ...
Page 49: ...MIO Service Manual Page 48 ...
Page 50: ...U28 74LS240 OCTAL BUFFER LINE DRIVER WITH 3 STATE OUTPUTS MIO Service Manual Page 49 ...
Page 52: ...MIO Service Manual Page 51 ...
Page 53: ...MIO Service Manual Page 52 ...
Page 54: ...MIO Service Manual Page 53 ...
Page 55: ...MIO Service Manual Page 54 ...
Page 56: ...MIO Service Manual Page 55 ...
Page 57: ...MIO Service Manual Page 56 ...
Page 58: ...MIO Service Manual Page 57 ...