Dec 222017
 
Convert com programs to Basic.
File COMTOBAS.ZIP from The Programmer’s Corner in
Category BASIC Language
Convert com programs to Basic.
File Name File Size Zip Size Zip Type
COMTOBAS.BAS 2048 843 deflated
COMTOBAS.DOC 2048 760 deflated
TPCREAD.ME 199 165 deflated

Download File COMTOBAS.ZIP Here

Contents of the COMTOBAS.DOC file




.COM file/BASICA CONVERSION PROGRAM

by Timothy R. Hickman

The complex and time consuming task of creating a BASICA
program to transmit a .COM file in 7 bit form for modems and
bulletin boards is a breeze if done using the program
"Convert.bas". This program will create a BASICA program to
automatically read a .COM file and generate another BASICA
program which, when run, will recreate the .COM file. This
BASICA program is also quite useful as a means of providing
machine language files in an easy-to-install program in
printed form.

CONVERT.BAS is composed of four modules:

The first module asks for the .COM filename and the number of
bytes in that file. The number of bytes in the file must be
read from the directory beforehand. It then reads that
file and converts its hex values into decimal, stuffing them into
an array. The file has to be opened as a random file to avoid
a false end-of-file.

The second module creates a temporary BASICA file called
CREATE.BAS. Line numbers, DATA statements and the decimal
values read previously are saved to this file.

The third module merges the temporary basic file containing
data statements with the end of the original file and then
deletes the first three modules.

The last module is the standard BASICA program which, when run,
will create a .COM file by reading DATA statements into the
file.

Here is the program:


 December 22, 2017  Add comments

Leave a Reply