In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
Home page Home page Home page Home page
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel

VERBatim - V124

This is the assembler routine used for addressing the serial port. It is the routine called by both V122 abd V123 and can thus be used to replace both of them. The same caveat regarding device drivers applies. V124 has been documented by Dan Ellis on the RevTech bulletin board (1985), by RevTech in the "System Subroutines" documentation available to Advantage subscribers and in V124.TXT in UTILITY.DOC. Unfortunatley documentation is in part conflicting and/or misleading so we present below details of calling V124.

As V124 is an assembler routine it is passed varying numbers of parameters depending upon the action to be taken, but the basic parameters are

0001           V124( Action, Channel, Info, Amt, Status )

where ACTION is the action to take, CHANNEL is the handle assigned by DOS to the device driver, INFO is the data being sent to/from the driver/buffer, AMT is used to state the number of bytes to read from the driver/buffer and STATUS is a flag variable.

To utilise the serial port, the device must first be opened (OP), and if necessary, configured (CI/CO). Information can then be either read (RD) or written (WR) with the Break Key being checked for (TB) until all operations are completed, at which stage the device must be closed (CL). Please note that before opening the device for the first time, an RBASIC FLUSH should be issued to ensure integrity of string space/data.


V124("OP", CHANNEL, "COMM$" : CHAR(0), "", FLAG) Note that INFO is here set to the DOS internal name for the port. This action opens the port to the channel and returns a FLAG of 0 for OK, 1 for fail.


Returns a seven byte string in INFO containing the current port parameters. When a number is represented by a byte, the ASCII character is returned, not the literal, EG Char(2) not 2.

Byte 1 - the baud rate. Returns a number between 0 and 15, this representing
a baud rate of 50, 75, 110, 134.5, 150, 200, 300, 600, 1200, 1800, 2000,
2400, 3600, 4800, 9600 or 19200. EG 0 = 50 14 = 9600 etc.

Byte 2 - number of stop bits

Byte 3 - number of data bits

Byte 4 - literal character for parity

Byte 5 - Protocol byte. If this Byte is CHAR(4), XOFF mode is set, if
CHAR(16), STRIP nulls mode is set, if CHAR(20), both modes are set.

Byte 6 - not used

Byte 7 - break count


Used to set the current port parameters. INFO should be loaded with a seven byte string with layout as above. When a number is represented by a byte, the ASCII character should be used not the literal, EG CHAR(2) not 2. Note that Byte 6 should be loaded with a CHAR(0).


The IO equivalent of an INPUT INFO,-1. Returns whatever is waiting in the buffer at the time the request was issued and waits for no special characters to return.


The IO equivalent of a PRINT :. Places the INFO into the buffer for sending along the serial line.


Sees if break key has been hit, and if so sends a break signal to the port.


Closes the channel to the port/device driver. This MUST be done at the end of a comms session otherwise data corruption could occur. For examples of using the above commands, see V124.TXT on UTILITY.DOC.

(Volume 1, Issue 9, Pages 7,8)
Pixel Footer R1 C1 Pixel