How Does This IBM Translator Software Package From MINNY ELECTRONICS Stack Up??
This package bills itself as “a file transfer and BASIC language dialect translater”. PC-Import will allow the user, who has access to an IBM Personal Computer (or compatible) equipped with a communication board and a QL, to “download” and translate MicroSoft BASIC programs into SuperBASIC, which will run independently on the QL. After a couple of false starts, I was able to successfully import IBM BASIC programs into my QL.
The first problem was hardware oriented. The manual assumes the user has a ready-made RS-232 cable. As I built my own cable, there were some problems not addressed in the accompanying manual. The QL serial ports only have 5 lines (GND, Txd, RxD, DTR, and CTS). The IBM serial ports have 9 different lines. In order for IBM BIOS to send messages out the serial port, both the DSR and CTS lines must be “true”. I had to “tie” the DSR and CTS pins on the IBM together, to achieve communications from the IBM to the QL. This was accomplished by soldering a “jumper” wire between pins 5 and 6 (CTS & DTR) on the IBM cable end.
The other false start was due to an error in the manual. The manual provides step-by-step instructions on preparing MS-DOS to send information out its RS-232 port. To accomplish this, the printer output (LPT1) is directed to the communication output (COM1). The instructions successfully got me to this point, but the steps to direct a copy of the BASIC program to the printer output was in error. “COPY A: [file_name} LST1” would not work. This should have read, “COPY A: {file_name} LPT1”. With this minor correction, I received data from the IBM successfully every time.
Before a BASIC program is transferred to the QL, it must be in ASCII format. The manual provides sufficient instruction on how to insure the BASIC files are in ASCII. As the program is “sent” to the QL, it is written to a file on a user-specified microdrive. The transfer portion of PC-IMPORT is straightforward and quick. The transfer rate is 4800 baud and only takes seconds.
The most important part of the program is the translation of IBM’s BASIC into SuperBASIC. As PC-IMPORT is written entirely in BASIC, the translation is slow. Approximately 2.8 bytes are translated per second. A 4551 byte program took 27 minutes and 16 seconds to translate. The manual claims that up to 90 percent of the translation work can be achieved by PC-IMPORT. I found this figure to be highly overstated. Only a portion of non-compatible MicroSoft BASIC is translated into SuperBASIC (see Table 1). A fair knowledge of BASIC programming, and an ability to follow a BASIC listing to fathom the flow and logic are required to successfully get most imported BASIC programs to run on the QL.
As an acid-test, I took a text-manipulation program I had written on an IBM at work as an example. The program includes no graphics and simply accepts input from the keyboard. It then breaks up the text into proper spacing for book card labels. Due to major differences between the way the IBM BASIC handles string manipulation and undefined variables, I ran into many problems getting the program to run on the QL. Even though I had written the program, it was hard to follow the logic and correctly make the “hand-translations” required. One of the major problems was caused by the incomplete PC-IMPORT translation of the MID$ command.
A 2048 byte program (translated in 12:09 minutes) took me about 20 to 25 minutes to re-edit and hand-translate to achieve proper execution. I would not have been able to achieve this without the constant referral to the MicroSoft BASIC manual. I have had limited experience in BASIC programming on an IBM. (I would like to take a second to applaud the Sinclair BASICs. They are far easier languages to program, than MicroSoft BASIC.) If you do not have access to a MicroSoft manual, check your local library, you’ll probably need it. As SuperBASIC will mark any BASIC line with “MISTAKE”, the “hand-translation” job is made easier. The PC-IMPORT manual does provide a small table of BASICA commands with SuperBASIC equivalents, if any.
Most of the programs I imported dealt with graphics, but none of the graphic commands are translated by PC-IMPORT. One thing to keep in mind when translating most BASICs into Sinclair BASIC, is that their graphic screens are upside down (point 0,0 is in the upper-left-hand corner). Many of the IBM graphic commands can be imitated by creating procedures with SuperBASIC, to achieve the proper results (see Listing 1).
Some other uses for PC-IMPORT, which aren’t mentioned in the manual, include: downloading BASIC ASCII files from bulleting boards and translating them into SuperBASIC. Using QUILL to type in a BASIC listing, printing it to a microdrive file and using PC-IMPORT to translate. The printer drive with QUILL will need to be altered to print a useable file to the microdrive (see Table 2). One may also use a simple program to enter an IBM listing directly into a microdrive file (see Listing 2).
I have mixed feelings about PC-IMPORT. It is slow and incomplete. PC-IMPORT must be viewed only as a programmer’s tool. To achieve full usefulness from PC-IMPORT, the user must be a fair to accomplished BASIC programmer. If one has access to an IBM (or any other “on-line” source of MicroSoft BASIC), a lot of typing and raw translating can be avoided. I believe that PC-IMPORT could have been a much better program had other IBM BASIC commands been supported (i.e., PSET, INSTR, SPACE$, “” or Interger Division, LOG). Also commands such as MID$ should have been fully translated, or RANDOMIZE should have been translated to the British spelling. I only hope that Minny Electronics will provide updated versions of this product in the future.
This program was obtained for review from: RMG Enterprises, 1419 1/2 7th Street, Oregon City, OR 97045, (503) 655-7484.
LISTING 1
1450 REMark ---- MicroSoft BASIC command to draw a box
1452 REMark ---- The two co-ords are adjacent corners of the box
1454 REMark ---- followed by ink color -- B = box or BF = Fill
1460 REMark ---- LINE (IX1,IY1)-(IX2,IY2),RND*2+1,BF
1462 :
1464 REMark ---- SuperBASIC translation using PROCEDURE box
1466 box IX1,IY1,IX2,IY2,RND(1 TO 7),1
1468 :
1470 REMark ---- LINE (IX1,IY1)-(IX2,IY2),0,B
1472 box IX1,IY1,IX2,IY2,0,0: REMark SuperBASIC translation
1474 :
9000 DEFine PROCedure box (x,y,xc,yc,crayon,all)
9005 FILL all: INK crayon
9010 LINE x,y TO xc,y TO xc,yc TO x,yc TO x,y
9015 FILL 0
Table 1 — IBM commands translated into Super BASIC
INPUT DATA THEN GOTO GOSUB TAB TO ' ASC COLOR SQR SGN LOCATE LEFT$ MID$ RIGHT$ STRING$ ELSE VAL
Table 2 — Quill Printer Driver for ASCII BASIC
DRIVER NAME :BASIC PORT :ser1 BAUD RATE :9600 PARITY :NONE LINES/PAGE :255 CHARACTERS/LINE :255 CONTINUOUS FORMS :YES END OF LINE CODE :LF PREAMBLE CODE :NONE POSTAMBLE CODE :NONE All other options :NONE
NOTE: To send the ASCII BASIC to microdrive, the above printer driver must be installed or be present on the default drive (usually #1) as “PRINTER_DAT”. Select the Print option from within Quill and direct output to [Device_filename] instead of the printer.