SERIAL

 
The SERIAL (RS-232) driver is loaded by the HTBasic command:
 
LOAD BIN "SERIAL[;COM1 Isc][COM2 Isc]…[COMX Isc]"
 
It is configured using the Device Setup Serial Driver Properties box.
 
 
SERIAL controls up to twenty-seven serial ports named COM1 to COM256. After SERIAL is loaded, HTBasic takes control of the serial ports assigned to it and no other process can use those serial ports until SERIAL is unloaded, or HTBasic terminates. You must specify an ISC for each COM port when loading SERIAL from the command line or a program.
 

Baud Rates

The baud rate is specified in the Properties box or may be changed by CONTROL n,3;rate, where n is the ISC of the serial port and rate is the baud rate. The possible baud rates are dependent on the hardware.
 

Character Framing

Initial default character framing is undefined. The character framing (bits per character and parity) is set using the Properties box, or by using CONTROL n,4;value where n is the ISC of the serial port and value is one of the values listed in the HTBasic User’s Guide for control register 4. The possible character framing is dependent on the hardware.
 

Handshaking

  • XON/XOFF is the default handshaking which ignores the CTS and RTS lines.
  • RTS and CTS lines can be enabled using the Properties box, or with CONTROL n,5;value and CONTROL n,12;value.
  • XON/XOFF software handshaking can be enabled or disabled using CONTROL n,100;value.
 

Interrupts

ON INTR and ENABLE INTR are supported for the serial ports.
 
These commands are explained in the User’s Guide, "Serial (RS-232) I/O".