25 Years of Programming
An open source source for C, C++, OWL, BASIC, MDB, XLS, DOT, and more...
Send file out through serial port of Heathkit H-89 computer, HDOS, Benton Harbor BASIC
This program was written in Extended Benton Harbor Basic to run under HDOS (the Heath Disk Operating System) on the Heathkit H-89 computer.
It transmits a file from an HDOS disk out through H-89 port 330Q (216D) to another computer.
I wrote it to rescue some files from HDOS disks. I didn't have an HDOS modem or file transfer program.
The OUT commands directly program the ports of the INS8250 serial communications chip.
Benton Harbor Basic is so slow that even at the specified rate of 9600 baud, the effective transmission rate is only about 300 baud (30 characters per second), but the advantage of it being so slow is that even with no error checking, there were no errors.
However, it does tend to transmit garbage after the end of the last sector, so look for and delete any garbage characters at the end of the destination file.
00010 REM HDOSTRF.BAS 00020 REM COPYRIGHT (C)1984 STEVEN WHITNEY. 00021 REM Initially published by http://25yearsofprogramming.com. 00030 REM Published under GNU GPL (General Public License) Version 3,with ABSOLUTELY NO WARRANTY. 00040 OUT 219,128 00050 OUT 216,12 00060 OUT 219,3 00070 OUT 217,0 00080 OUT 218,1 00090 OUT 220,11 00100 OUT 221,96 00110 OUT 222,176 00120 PRINT "THIS PROGRAM WORKS ONLY FOR 8-BIT, 9600 BAUD TRANSFERS" 00130 INPUT "WHAT FILE DO YOU WANT TO TRANSFER";A$ 00140 OPEN A$ FOR READ AS FILE #1 00150 A = CIN(1) 00160 REM I think the Autoscribe word processor used < as its end of line char. 00170 REM so I translate them to CRLF here. 00180 IF A = 60 THEN OUT 216,13 : OUT 216,10 00190 IF A <> 60 THEN OUT 216,A 00200 REM append a LF to each CR 00210 IF A = 13 THEN OUT 216,10 00220 GOTO 150
Copyright ©2012 Steven Whitney. Last modified Sun 07/29/2012 11:41:35 -0700.