RMX/80 BASIC-80

BASIC-80

Adding User-Written I/O Drivers to RMX/SO BASIC-SO

You can add your own 1/0 drivers to any configuration of RMX/80 BASIC-80, so that BASIC-80 input and output statements employ user-defined 110 drivers. BASIC-80 treats these drivers as files with the device label :Ll:. This is the proper syntax, as shown in opening a sequential disk file for output to the 110 driver file :Ll:List:

10 OPEN "0",#1, ":L1:LlST"

The remainder of the file name may be anything conforming to the ISIS-II filename conventions. BASIC-80 will use the user I/O drjver whenever an OPEN command is issued for a filename with a device type of :Ll:. The open request message is sent to the BQOPNX exchange instead of to the DFS RQOPNX exchange. The messages sent to BQOPNX are exactly the same as messages sent to the DFS exchange RQOPNX. Consult the RMX/SO User's Guide for details. Therefore, a user- supplied task called BQUSER must wait at the BQOPNX exchange and must supply an exchange address when OPEN messages are received. This task or another task waits at this exchange and handles READ (for input files) or WRITE (for output files) and CLOSE requests. Figure F-8 is an example of a user-written liD driver.

Adding BASIC-SO USR Routines to a Configuration

You can call 8080/8085 assembly language, FORTRAN-80, or PL/M-SO routines from BASIC-SO with the USR function (see Appendix E).

These routines can also reside in PROM. For ease of use, dedicate one or more PROMs and their sockets to this purpose. In this way, you can burn different subroutines as different needs arise without altering the addresses of the routines. Changing routines becomes as simple as changing PROMs.

Adding PROM-Based BASIC-SO Programs to a Configuration

You can also burn BASIC-SO programs into PROM with the ISIS-II BAPROM util- ity program. BAPROM converts BASIC-SO programs saved in ASCII format (with the SAVE "filename", A option) into relocatable object module format. You can save these modules from either ISIS-II or RMX/80 BASIC-80. They can then be linked, if needed, located, burned into PROM, and then run with the PRUN command.

If you wish to add USR routines or source files created by BAPROM to a given con- figuration, you can add the object modules to the LINK command; there is no automatic way, however, to communicate the starting addresses to BASIC-SO. You must use the PUBLICS option of LOCATE and check the LOCATE PRINT file to find starting addresses.

You can also execute a BASIC-80 program immediately upon restart. To do this, you must change the constant BQPRUN in BASCM.ASM to the address of the BASIC-80 program stored in PROM. Here's an example:

1.Convert START.BAS into START.OBJ with the BAPROM program.

2.Add START.OBJ to the LINK command in the GBASIC.CSD module.

3.Change: BQPRUN: DW 0

to

EXTRN

START

 

BQPRUN: DW

START

in

BASCM.ASM

 

F-14

Page 106
Image 106
Intel 9800758-02 manual Adding User-Written I/O Drivers to RMX/SO BASIC-SO, Open 0,#1, L1LlST