# unit cio

### CIO interface

author: Tomasz Biela (Tebe)

## Interface:

name: | description:
--- | ---
Opn | #### procedure Opn(chn, ax1, ax2: byte; device: PByte); assembler; Open channel ##### parameters: chn - channel 0..7 ax1 - parameter ax2 - parameter device - name of device, example "D:"
Cls | #### procedure Cls(chn: byte); assembler; Close channel ##### parameters: chn - channel 0..7
Get | #### function Get(chn: byte): byte; assembler; Get one byte ##### parameters: chn - channel 0..7
BGet | #### procedure BGet(chn: byte; buf: PByte; cnt: word); assembler; register; Get CNT bytes to BUF ##### parameters: chn - channel 0..7 buf - buffer cnt - bytes counter
Put | #### procedure Put(chn, a: byte): assembler; Write one byte ##### parameters: chn - channel 0..7 a - byte
BPut | #### procedure BPut(chn: byte; buf: PByte; cnt: word); assembler; register; Put CNT bytes from BUF ##### parameters: chn - channel 0..7 buf - buffer cnt - bytes counter
XIO | #### procedure XIO(cmd, chn, ax1, ax2: byte; device: PByte); assembler; Special command ##### parameters: cmd - command chn - channel 0..7 ax1 - parameter ax2 - parameter device - name of device, example "S2:"