open put get



APPENDIX EIGHT

IOCB COMMAND BYTE VALUES

The third byte in each IOCB is the command byte, called IOCMD. This is the byte that tells CIO what kind of I/O we want to do (see Appendix Seven if none of this makes sense). It can have the values in Figure 60.

VALUE MEANING
BASIC equivalent
3
OPEN channel OPEN #n
5
GET record
INPUT #n
7
GET bytes
GET #n
9
PUT record none
11
PUT bytes PUT #n
12
CLOSE channel CLOSE #n
13
GET status none

            FIGURE 60. IOCB command byte values

In case you're wondering what happened to PRINT #n, BASIC uses a special vector to talk directly to the handler for this particular statement.

You should note that with the "GET bytes" and "PUT bytes" routines, BASIC only allows you to GET and PUT one byte at a time. If you access CIO directly, however, you can GET or PUT a whole buffer. With this in mind, you may ask what the difference is between GETting or PUTting a buffer and GETting of PUTting a record. If there are no carriage returns (End-Of-Lines or EOLs) in the buffer then there is no difference. A record, however, ends when either the end of the buffer is reached or an EOL encountered.

CIO takes care of all of these commands. Some of the devices also have their own special commands, which the corresponding device handler takes care of. Here's a list of those commands, which you can access using BASIC's XIO command:

Display Handler
 

17
DRAW line
18
FILL


Disk File Manager
 
  32
RENAME file
  33
DELETE file
  35
LOCK file
  36
UNLOCK file
  37
POINT
  38
NOTE
254
FORMAT disk


RS-232 Handler
 
32  
Force short block
34
CONTROL DTR, RTS, XMT
36
Configure baud rate
38
Configure translation mode
40
Start concurrent I/O mode


For more information on any of these commands, you should see the OS manual or the 850 Interface manual.

As mentioned in Appendix Seven, if you want to use the resident disk handler (i.e., you're not using DOS or FMS at all), you have to set up the DCB and then do a JSR DISKINV (58451). The DCB has different command values than the IOCB, of course, and a list can be found under DCOMND at location 770.


Return to Table of Contents | Previous Chapter | Next Chapter