• Please review our updated Terms and Rules here

BASIC Converter Chart ?

CP/M User

Veteran Member
Joined
May 2, 2003
Messages
2,986
Location
Back of Burke (Guday!), Australia
I thought it would be useful to have one of these as a guide to all the variations of BASIC from all those 80s Vintage Computers. I found one that was scanned but the detailed scanned was incomplete, I guess because of the size of it being A2 I think they said and thought it might be better to just type out the commands and variations and have it in a Tabled file (like it's already presented) just to get the information out there.

The only one I have is from the Usborne book "Computer Spacegames", unfortunately that book came out before my computer system in 1983 and it's missing some of the other popular computer systems too and then I remembered my "Your Computer - Bumper Book of Programs" were offering a conversion chart, which was in 1987.

But I'm guessing these things are hard to pickup? Or not many people have them because it was for those who had numerous computers in the 80s.
 
The various editions of David Ahl's Basic Computer Games had a section indicating how to convert to between different BASIC flavors. By the mid-80s, it became common to quickly hack a version of the same book for each major computer's specific BASIC.
 
Yes the Usborne books were very good when it came to substituting the machine specifics with the alternative, we even had a program called BBC BASIC which was an aid to writing BBC BASIC programs on our system.

The David Ahl books seem to be a lot earlier (1973 & 1978 respectively), but I noticed this 2010 edition, so I'm not sure what's in that one.

I was looking to convert a game from the Oric BASIC to our system, though the game is very common and already exists, so should look for something a bit different.
 
There is also the BASIC Handbook by David A. Lien, but it might predate some of the systems you look to use. Actually most BASIC implementations that somehow follow ANSI standard should to most part be the same, and only custom commands for graphics, sound, input, file handling would differ. I don't know if there is a Rosetta Stone for good old BASIC, or how complex it would be.

ORIC by the way uses a derivate of Microsoft BASIC, but of course with some custom commands and once you go into POKE territory, you need to know the memory map and exactly how the source computer works to successfully convert it to another machine.
 
TRS-80 BASIC is very similar to IBM PC BASIC -- especially the CoCo's Extended BASIC, which shares many of the same sound and graphics commands as BASICA / GW-BASIC.

C64 BASIC programs with lots of sound or graphics will be a nightmare to convert to anything else, due to the extensive use of POKEs and PEEKs instead of proper commands. But I was able to convert an Atari BASIC game to the Apple II's Applesoft BASIC without too much trouble. It was just a matter of cross-referencing the relevant commands and slightly changing the parameters in order to accomodate the different screen resolution.
 
There is also the BASIC Handbook by David A. Lien, but it might predate some of the systems you look to use. Actually most BASIC implementations that somehow follow ANSI standard should to most part be the same, and only custom commands for graphics, sound, input, file handling would differ. I don't know if there is a Rosetta Stone for good old BASIC, or how complex it would be.

Rosetta Code actually has a few BASIC variants including Locomotive BASIC that I'm most familiar with, sometimes the examples vary a little bit, just looking at the examples for the ZX BASIC, it looks like their mostly standard problems. I'm a bit more interested in the Graphical aspects.

ORIC by the way uses a derivate of Microsoft BASIC, but of course with some custom commands and once you go into POKE territory, you need to know the memory map and exactly how the source computer works to successfully convert it to another machine.

The example I had unfortunately does have some Machine Code at the end of the program and wasn't prepared to translate it back to Z80, so will skip that program and as I said earlier the game has already been written a Dozen times.

Was just looking for something different that could be ported, I've been looking at some programs for the lesser known VZ200/300 computers, the BASIC for that looks straightforward, but it's got things like "SET(<val1>,<val2>)" which I don't know it's function. But I might be better looking for a Manual online for those Computers because it's got other things like SOUND which might vary from the SOUND found on my computer.
Just looking at the BASIC that the VZ200/300 computers had it looks as if has Microsoft BASIC as well because it's got things like "PRINT@139,"Q = UP", the number following the "@" represent where it's Printed onscreen, though I cannot remember how it was structured.
 
Last edited:
You're right, there are a lot of odd variants of BASIC. I found out that BASIC is a big challenge to unravel particularly if its been convoluted to pack it into small amounts of memory.

I wanted to play some of the old games on a DOS screen so I started translating them to C console programs. I wrote a utility program to reads in the BASIC program and strips out line number references that are never used. That helps simplify seeing the structure.

Sorry I couldn't really follow all that Information, I can see where a BASIC to C program could be useful, I'm guessing my the look of the Program List you listed a lot of those BASIC programs are generic and can be written across a number of dialects. I was interested in interpreting something from one computer system for another, I was able to do this once with a Snowflake program written in Apple ][ BASIC by having an emulator, though was hoping to write something successfully without relying on an emulator, but I guess I'd be better off with the Manual for that computer which will tell me (I guess) what each command does.
 
TRS-80 BASIC is very similar to IBM PC BASIC -- especially the CoCo's Extended BASIC, which shares many of the same sound and graphics commands as BASICA / GW-BASIC.

I've been fortunate enough to track down Radio Shack "Getting Started With Color BASIC TRS-80 Color Computer" which I must of picked up years ago and within that describes a lot of the commands. It appears the VZ 200/300 computers shared the same BASIC, though there's some POKEs at the start of this game that point to areas of memory which aren't used on the TRS-80, and these are are standard alone pokes which are no longer used within the program, which makes me suspect they must be localities which do something when POKEd. Here's the POKEs if anyone knows what they mean:

Code:
POKE30862,82:POKE30863,121:POKE31058,243:POKE31059,201

C64 BASIC programs with lots of sound or graphics will be a nightmare to convert to anything else, due to the extensive use of POKEs and PEEKs instead of proper commands. But I was able to convert an Atari BASIC game to the Apple II's Applesoft BASIC without too much trouble. It was just a matter of cross-referencing the relevant commands and slightly changing the parameters in order to accomodate the different screen resolution.

Hasn't even occurred for me to translate c64 programs, having Hardware Sprites and probably accessible from BASIC would add more complexity to their programs.
 
I'm surprised that nobody's mentioned CBASIC. I suspect that up until about 1985, CBASIC accounted for most of the business applications written in BASIC for microcomputers.

And yes, there are endless variants--I wrote a business BASIC back in 1978, that at least up to 2012 was still in commercial use. Windows now owns that arena, it seems. I'm still proud of the fact that my BASIC beat the pants off of Microsoft compiled BASIC in a benchmark test back in the day.
 
I was under the impression that CBASIC was a fairly standard BASIC compiler, in a sense if you write CBASIC code you could be confident it would work across a number of CP/M systems including CP/M-86 if you wanted.

I wrote a little Text Based Graphical Demo once in CB86, which was such a pain, because I wanted to time the program properly, so it would run at the same speed on all those different compatibles, and found CB to be very tricky when working with Assembly routine.

There seems to be a Section for CB80 on Rosetta Code, but no program examples.
 
Oh, there are CBASIC manuals around; Here, for example.. CBASIC is Gordon Eubanks' adaptation of his BASIC-E dialect (said BASIC-E is in the public domain, with source code available), so it has some interesting features, just sufficient to make it irritating to people who aim to go cross-platform :).

But, like BASIC-E, CBASIC is strictly a compiled language; there's no interactive mode. So statement labels are optional, as there's no interactive editor.

The BASIC (Star BASIC) that I and a couple of programmers worked out was even more geared toward business users. ISAM as well as random-access files were part of it; there were only two variable types--numeric and character (strings); the default internal representation was decimal float and operators did not change their meaning according to type. So you could write, for example, C=A$+3 and add the numeric representation of the contents of A$ and 3, assigning it to C. String operators were different, so as to be optimizable. Statement labels, of course, were optional, but could be alphanumeric and required only a suffix colon. It was very well received and ran like the wind on an x80 system--and it was multitasking. The programmers that used it really seemed to like it.

Calling it BASIC was a pretty far stretch, I guess. Not only do I still have the original design document, but I have the manual and a T-shirt... :) Now, of course, just another forgotten dialect.
 
I can only presume CBASIC was excluded from BASIC conversion charts for being a piece of Software, but I noticed that the BASIC conversion chart I found online has included IBM PC-BASIC A on the list. I'm unsure if that BASIC was built-in on a ROM like other BASIC languages were, or if it came on a Disk.
The audience usually for those Languages were people who had a multiple range of computers that wanted to port a program from one computer to another.
I'm unsure how popular CBASIC was, obviously CP/M was popular in the early 80s, though the machines were Disk Based, so perhaps more of an exclusive group of people were using those machines.
 
I can only presume CBASIC was excluded from BASIC conversion charts for being a piece of Software, but I noticed that the BASIC conversion chart I found online has included IBM PC-BASIC A on the list. I'm unsure if that BASIC was built-in on a ROM like other BASIC languages were, or if it came on a Disk.
The audience usually for those Languages were people who had a multiple range of computers that wanted to port a program from one computer to another.
I'm unsure how popular CBASIC was, obviously CP/M was popular in the early 80s, though the machines were Disk Based, so perhaps more of an exclusive group of people were using those machines.

I'm not sure what you're getting at, exactly. CBASIC was extremely popular for "serious" business applications, such as payroll, AR, AP, Inventory, Billing, etc. It was Gordon Eubanks' bread and butter for a few years.

There's also Pick BASC, which firmly integrated Pick's data management system (still very much in use), not to mention the various minicomputer and mainframe BASICs.

The "serious" programs could run to many thousand lines each.
 
I'm not sure what you're getting at, exactly.

Just saying that BASIC Conversion Charts I've seen usually deal with the BASIC you get when you turn on a particular computer system. I've attached an example of the kind of thing I'm referring to (or maybe just put a link to the darn thing since I cannot attach that said file).

BASIC+converter+detail+copy.jpg


CBASIC was extremely popular for "serious" business applications, such as payroll, AR, AP, Inventory, Billing, etc. It was Gordon Eubanks' bread and butter for a few years.

I presumed as much.
 
Last edited:
I apologize if this has already been covered. Would someone please let me know what the function is of theses basics statements? I'm trying to make Blackjack from the David Ahl book work.

3300 AA=AA+11*(AA>=22):RETURN

2220 S(I)=Z(I)*(3*(-P(D1,2)>=10))-1)

3100 Q(I)=Q-(Q<0)/2

I figured they were some sort of conditionary statements, but I'm not sure what results are to be achieved.

Thanks!
 
In some basic dialects the comparisons evaluate to an integer 1 or 0

So, lets look at 3300

If A <22 then AA >= 22 would return a 0 so AA = AA+11*0 or AA=AA
IF A >=22 then AA >=22 would return a 1 so AA=AA+11*1 or AA=AA+11

Make sense? Any others?
 
Last edited:
I apologize if this has already been covered. Would someone please let me know what the function is of theses basics statements? I'm trying to make Blackjack from the David Ahl book work.

3300 AA=AA+11*(AA>=22):RETURN

2220 S(I)=Z(I)*(3*(-P(D1,2)>=10))-1)

3100 Q(I)=Q-(Q<0)/2

I figured they were some sort of conditionary statements, but I'm not sure what results are to be achieved.

Thanks!

The conditions in the parentheses are evaluated first, as 1 if the condition is true or 0 if it's false, before the rest of the statement. For example in the first one, if AA is greater than or equal to 22, the statement effectively becomes AA=AA+11*(1) or simply AA=AA+11.
 
Back
Top