This page is a wiki. Please login or create an account to begin editing.


6 posts / 0 new
Last post
Offline
Joined: 2013 Feb 1
Seeking Help on Very Old CPM/DOS Compiler

Greetings, a newbie here.

Some decades ago I did a research project using an Osborne "portable" computer running CPM, using the old Basic language. I later transferred the programs into a pre-windows DOS computer, an old Leading Edge as I recall. By memory that was running an M-Basic or Q-Basic compiler. I reproduce some of the program text below, the older folk here will remember it probably. This was part of my university work, a research project, which I need to reconstruct and fire up to working condition once again, but of course the old floppy driven Osborne and Leading Edge are no longer in this world.

I went 100% to Macs some years after that, but saved all the old files and never used them since. Now I need to reconstruct that project, so I am looking around for a Mac compiler that would run those old programs, with minimal tweaking for identifications of locations for data files and printers.

Is this a lost cause? Or should I find a dos-based computer system? I don't even know if the Windows computers allow one to get rid of the windows and go back down to dos, or if they even use that anymore.

I also tried the RealBasic and that is a totally different animal, of no help so far as I could see.

Anyhow, whatever suggestions you could offer would be appreciated. I'll give the representative program below.

Thanks,
James

10 COMMON TRAITNAME$,LENGTH%,CARDNUM%,LOCATION%
20 DIM CODELIST$(100),CODESUM%(100)
30 YES%=1:NO%=0:DONE%=0:CS$=CHR$(26):B$=CHR$(7):COUNT%=0
40 OPEN "R",1,"A:VARIABLE.ASC",8+LENGTH%:FIELD 1,6+LENGTH% AS VAR$ 50 PRINT CS$;"PLEASE WAIT FOR CODELIST"
60 FOR I%=1 TO 100
70 CODELIST$(I%)="X"
80 CODESUM%(I%)=0
90 NEXT I%
100 PRINT".";
110 FOR J%=1 TO 1170:SEARCHING%=YES%:INCLUDE%=NO%:NUM%=1
120 GET #1,J%
130 IF J% MOD 25 = 0 THEN PRINT".";
140 VARIABLECODE$=MID$(VAR$,6,LENGTH%)
150 WHILE SEARCHING%
160 IF CODELIST$(NUM%)=VARIABLECODE$ THEN SEARCHING%=DONE%:CODESUM%(NUM%)=CODESUM%(NUM%)+1:GOTO 190 170 IF CODELIST$(NUM%)="X" THEN INCLUDE%=YES%:SEARCHING%=DONE%:GOTO 190 180 NUM%=NUM%+1
190 WEND
200 IF INCLUDE%=YES% THEN CODELIST$(NUM%)=VARIABLECODE$:CODESUM%(NUM%)=CODESUM%(NUM%)+1:COUNT%=COUNT%+1 210 NEXT J%
220 CLOSE #1
230 E%=1
240 PRINT CS$;"CODELIST NOW BEING SORTED ";E%:PRINT
250 MOVING%=YES%
260 WHILE MOVING%
270 MOVING%=NO%
280 FOR I%=1 TO COUNT%-1
290 X$=CODELIST$(I%)
300 Y$=CODELIST$(I%+1)
305 X#=VAL(X$):Y#=VAL(Y$)
310 IF X#";DUMMY$ 430 LPRINT TRAITNAME$
440 LPRINT"THE FOLLOWING CODES WERE DETECTED:":LPRINT
450 WHILE CODELIST$(NUM%)<>"X"
460 IF CODELIST$(NUM%)=" " THEN PRINT"b";:GOTO 500
470 IF CODELIST$(NUM%)=" 0" THEN PRINT"b0";:GOTO 500
480 PRINT CODELIST$(NUM%);"(";CODESUM%(NUM%);")";
490 LPRINT CODELIST$(NUM%);"(";CODESUM%(NUM%);")":LPRINT
500 PRINT", ";:NUM%=NUM%+1
510 IF NUM% MOD 28=0 THEN PRINT CS$;B$:INPUT"ADJUST PRINTER, GIVE ";D$ 520 WEND
530 PRINT CS$
540 INPUT"DO YOU WANT TO RUN THE WORLDMAP PROGRAM NOW?";QUEST$ 550 IF QUEST$="N" THEN PRINT CS$;"GOOD BYE!":GOTO 580
560 IF QUEST$<>"Y" THEN PRINT"WHAT???":GOTO 540
570 CHAIN "WORLDMAP"
580 END

Comments

grawlix.computing's picture
Joined: 2009 Jun 1

Do you absolutely need a compiler, or would an interpreter work for you?

There's bound to be a Mac BASIC interpreter out there. 5 seconds of searching turned up Chipmunk Basic, but I don't know much about it. RealBASIC, I agree, would be a completely different animal. If nothing else, you can set up a DOSBox on your Mac, and try to acquire the original tools you were using on that DOS machine. Or, at least, something with a more approximate lineage.

How much code are you talking about? For instance, what percentage of the project is the sample you've provided?

Offline
Joined: 2013 Feb 1

And interpreter might be OK also. I tried Chipmunk years ago, didn't function.

The code sample shown is maybe 10% or less. I had to chain programs together to make them work on those old machines, with the Voyager Spacecraft memory.

Thanks.

Offline
Joined: 2009 Sep 3

That looks like QBASIC. If you are on OS9 or earlier I'd fire up a PC emulator (SoftPC or SoftWindows) and see if you can get it to run under DOS.

MikeTomTom's picture
Offline
Joined: 2009 Dec 7

@James D: If you have a really old Mac to run this on (such as a Mac Plus, etc) you could take a look at MacBasic & Microsoft Basic from here. These would also run under Mini vMac if necessary. I don't know anything about them tho' as to their suitability, as I have not tried them before.

If you have a not so old PPC Mac, you might want to take a look at METAL, which is now available AFAIK, only from this Wayback web archive (a direct DL of 2.4 MB, ".sit" archived).

According to this "Pure Mac" web page:

Metal 1.7.3

METAL is a 100% free extended BASIC language metacompiler for Mac.
The ultimate goals of METAL are to bring back the spirit of 1980s programming and provide both beginners and advanced developers with a way to quickly convey their ideas and focus on creativity!
* License: Freeware
* Author/Publisher: Mari Saric
* Modification Date: September 9, 2001
* Requirements: Mac OS X and Mac OS 9 or higher

If you scroll that "Pure Mac" page you'll locate other BASIC tools.

[Edit]: Added links for METAL & uploaded to here.

Northcott's picture
Offline
Joined: 2009 Aug 15

This page gives a link to a build of the FreeBasic compiler for OS X. Through a quick Google search, I couldn't really find any newer builds (and the main website doesn't offer a download). FreeBasic supposedly has a "high compatibility with QuickBASIC", which was the commercial Microsoft's commercial BASIC compiler in the late 80's, which was stripped down and bundled with MS-DOS as QBasic.

In addition to plain Microsoft BASIC for Macintosh, there's also Microsoft QuickBASIC for Macintosh here somewhere; it's a little newer IIRC. QB64, a compiler aiming for compatibility with QuickBASIC, is available for OS X.

Looking at your code, it should run in any or all the solutions recommended so far. If you want to run it on a modern Mac though, Chipmunk BASIC or that QB64 are probably your best bets.