PDA

View Full Version : Software issue IBM 5155 computer running XP



Hugo Holden
January 2nd, 2016, 04:01 PM
I have an IBM5155 (running DOS 3.3) fitted with a 3.5"/5.25 dual floppy drive. The idea of this is that I would be able to get data/programs in and out of the 5155 because I also have a 10 year old desktop computer running XP with an external 3.5" floppy drive.

In the case of the 5155 there is no evidence of any issue, can write & read to/from the 3.5" floppy and files all appears normal and programs run normally.

If I write a Basic program on the XP computer (I have Qbasic on that) and transfer it via the floppy to the 5155 there are no problems and it runs well on the BASIC in the the 5155 and everything appears to be normal.

However, if I create a Basic program, filename.BAS on the 5155 and make a copy to the floppy (and there is nothing wrong with the copy from the 5155's perspective as the copy itself will run normally in the 5155 ) and attempt to run this file on the XP computer it does not work. Inspecting the file, say with Wordpad, on the XP computer, the normal program listing is gone and it has been changed into assorted characters of the IBM code page tables, like those typically seen in the back of a DOS manual.

So it appears BASIC program files created on the modern computer running XP are back compatible with the 5155, but not the reverse case. What would be the explanation for this apparent one way compatibility in this case ?

ibmapc
January 2nd, 2016, 04:43 PM
This happens because, by default, the old "Disk Basic" on your old 5155 saves the file in a compressed binary format that your newer QBasic on your XP machine can not interpret. Try saving the program from your 5155 using the ",a" switch.

The following is from the GWBasic (http://hwiegman.home.xs4all.nl/gw-man/index.html) guide which is nearly identical to IBM Disk Basic that resides in ROM on your 5155:

SAVE Command
Purpose:

To save a program file on diskette.
Syntax:

SAVE filename,[,a]
SAVE filename,[,p]

Comments:

filename is a quoted string that follows the normal MS-DOS naming conventions. If filename already exists, the file will be written over. If the extension is omitted, .bas will be used.

The a option saves the file in ASCII format. Otherwise, GW-BASIC saves the file in a compressed binary format. ASCII format takes more space on the diskette, but some diskette access commands (for example, the MERGE command and some MS-DOS commands, such as TYPE) may require an ASCII format file.

The p option protects the file by saving it in an encoded binary format. When a protected file is later run or loaded, any attempt to list or edit it fails. When the p option is used, make an additional copy under another name or diskette to facilitate future program maintenance.

Hugo Holden
January 2nd, 2016, 05:34 PM
Thank you kindly ibmapc, the a switch solved the problem.

Hugo Holden
January 2nd, 2016, 06:38 PM
Two things that are apparent now that I can run the program created on the 5155 in a modern computer, one is the execution speed is so much faster on the XP so for a changing graphic but I can slow that down with delay loops to get a similar result.

The other thing is that when the graphics run in the QBasic on the XP, the entire screen displays the selected background & graphic. With the 5155, despite being in a graphic mode, LIST'' LOAD" SAVE" RUN" etc still displays at the bottom of the screen. Is there a trick to disabling that on screen menu display in the early Basic ?

Maverick1978
January 2nd, 2016, 07:09 PM
Not that I ever saw. I did once have a basic program I wrote to rename them to my most used commands....

Plasma
January 2nd, 2016, 07:36 PM
Key off

Hugo Holden
January 2nd, 2016, 07:45 PM
Thanks Plasma ! KEY OFF works just fine. In the meantime, in desperation and noticing that the graphics write on top of the menu, then LINE (0,192)-(320,200),0,BF masked over the menu with the background color ! but Key off is so much better.

ibmapc
January 2nd, 2016, 07:57 PM
Two things that are apparent now that I can run the program created on the 5155 in a modern computer, one is the execution speed is so much faster on the XP so for a changing graphic but I can slow that down with delay loops to get a similar result.

The other thing is that when the graphics run in the QBasic on the XP, the entire screen displays the selected background & graphic. With the 5155, despite being in a graphic mode, LIST'' LOAD" SAVE" RUN" etc still displays at the bottom of the screen. Is there a trick to disabling that on screen menu display in the early Basic ?




The following is from the GWBasic (http://hwiegman.home.xs4all.nl/gw-man/index.html) guide which is nearly identical to IBM Disk Basic that resides in ROM on your 5155:


Follow the link (http://hwiegman.home.xs4all.nl/gw-man/index.html) I provided previously. All of the BASIC commands should be described there. I know I have learned a lot from it. Also, you might look for a copy of Microsoft Quick BASIC. It will allow you to compile BASIC programs into .EXE files. When compiled, they will run much faster on your 5155.

P.S.
You can find Quick BASIC HERE (http://www.phatcode.net/downloads.php?id=172)

Hugo Holden
January 3rd, 2016, 01:35 AM
Thanks ibmapc, I have recently bought QuickBasic on vintage 5.25 floppys to try to see how the compiler speeds it up, but they have not arrived yet, hopefully they will work unless the magnetic dipoles have faded away...

Maverick1978
January 4th, 2016, 09:19 AM
Key off

Wow..... I'd totally forgotten about that one. The old brain, it needs a kick now and then!! :)