RS232C Extended BIOS Call specification
September 18th, 1984
December 24th, 1985
RS232C Extended BIOS Call specification Page 2
1.0 GENERAL DESCRIPTION
The RS232C driver can be used by application programs using the
"EXTENDED BIOS CALL" mechanism. Such user can access each function in
the RS232C driver through the entry jump table with inter-slot call
funtion provided in the BIOS. The user is able to know the location
of this table by EXTENDED BIOS CALL 0 and 1. Refer to the document
"Specification of the EXTENDED BIOS CALL" for details.
1.1 EXTENDED BIOS CALL ENTRY TABLE
The RS232C driver has entries as follows. A application program is
able to use RS232C driver by 'inter-slot call' to those entries.
For I/O port only type of RS-232C interface.
EXBTBL: DEFB DVINFB ; device information
DEFB 0 ; reserved for future expansion
DEFB 0
JP INIT ; initialize RS232C port
JP OPEN ; Open RS232C port
JP STAT ; ReaD STATus
JP GETCHR ; receive data
JP SNDCHR ; send data
JP CLOSE ; close RS232C port
JP EOF ; tell EOF code received
JP LOC ; reports number of characters in the
; receiver buffer
JP LOF ; reports number of free space left in
; receiver buffer
JP BACKUP ; back up a character
JP SNDBRK ; send a break character
JP DTR ; turn on/off DTR line
NOENT
NOENT
NOENT
RS232C Extended BIOS Call specification Page 3
Multi channel type RS-232C cartridge
EXBTBL:
DEFB DVINFB
DEFB 1 ; version number
DEFB 0 ; reserved for future expansion
JP INIT ; initialize RS232C port
JP OPEN ; open RS232C port
JP STAT ; ReaD STATus
JP GETCHR ; reveive data
JP SNDCHR ; send data
JP CLOSE ; close RS232C port
JP EOF ; tell EOF code received
JP LOC ; reports number of characters in the
; receiver buffer
JP LOF ; reports number of free space left in the
; receiver buffer
JP BACKUP ; back up a character
JP SNDBRK ; send break character
JP DTR ; turn on/off DTR line
JP SETCHN ; set channel number
NOENT
NOENT
NOTE
The RS232C receiver is driven by the
interrupt generated by receiver ready.
However, the inter-slot call handler
disables interrupt automatically. So,
when control returns to the application
program, it has to enable interrupt as
soon as possible. Otherwise, RS232C
receiver routine loses incoming
characters.
RS232C Extended BIOS Call specification Page 4
2.0 DESCRIPTION OF EACH EXTENDED BIOS CALL
2.1 Initialize RS232C Port (INIT)
Entry: [HL]= address of the parameter table
[B] = slot address of the parameter table
Return: carry flag is set if illegal parameters are contained
Modify: [AF]
Description:
To initialize the RS232C port with specified parameter. This entry
must be called before any other function calls are made. The
parameters are similar to _COMINI expanded statement of BASIC.
However, note that all the ascii parameters must be specified with
upper case characters only.
BAUD RATE
It is possible to set different baud rate for transmitter and
receiver. The possible value for the baud rate are as follows:
50, 75, 110, 300, 600, 1200, 1800, 2000, 2400, 3600, 4800,
7200, 9600, 19200
When negative value is specified, its absolute value is written to
i8253 timer/counter directly.
TIME OUT
The RS232C driver waits till the CTS (Clear To Send) signal is
turned on and/or XON is received when the character is to be sent.
The driver will generates time out error when it waits for them, if
specified time passed. Its time is specified this value at second.
If 0 specified then the driver doesn't generate time out error and
waits forever.
RS232C Extended BIOS Call specification Page 5
+-------------------------------+
[B]:[HL]--> | Character length '5'-'8' |\
+-------------------------------+ \
| Parity 'E','O','I','N' | |
+-------------------------------+ |
| Stop bits '1','2','3' | |
+-------------------------------+ >-- ASCII
| XON/XOFF controll 'X','N' | | character
+-------------------------------+ |
| CTR-RTS hand shake 'H','N' | |
+-------------------------------+ |
| Auto LF for receive 'A','N' | |
+-------------------------------+ |
| Auto LF for send 'A','N' | |
+-------------------------------+ /
| SI/SO control 'S','N' |/
+-------------------------------+
| Receiver baud rate (low) |\
+--- ----+ \
| 50-19200 (high) | |
+-------------------------------+ |
| Transmitter baud rate (low) | >-- Binary
+--- ----+ |
| 50-19200 (high) | |
+-------------------------------+ /
| Time out counter 0-255 |/
+-------------------------------+
RS232C Extended BIOS Call specification Page 6
2.2 Open RS232C Port (OPEN)
Entry: [HL]= address of FCB (must be located higher address
than 8000H)
[C] = buffer length ( 32-254 )
[E] = open mode, one of following:
+----------+------------------------------+
|open mode | meanings |
+----------+------------------------------+
| 1 | mode |
| 2 |