The CB runtime

cb development C BASIC CBASIC

How to use the CB runtime?

First of all why use the CB runtime? Well, the answer to this question coincides with the reason why the runtime was created.
The reason was to keep alive, in days of 64-bit processors, applications written with the MB86 language which was a BASIC dialect (mostly derived from CBASIC) in use, as the name suggests, in the 80s.
So if you have purchased a valid MB86 license you can use the CB runtime to produce 32-bit or 64-bit executables for MS Windows OSs.

And now let's see how to use the CB runtime, there are some simple steps to take:

STEP 1 The CB Runtime


Download one of following CB runtime and unzip it inside a folder, the C:\CB for example.

CB Runtime

Please note that the version number shown in the previous figure is indicative, you should always download the latest version.

STEP 2 The C/C++ Compiler


Install, if not already present, one of the C/C ++ compilers listed in the picture below, according the chosen done on STEP 1:

C/C++ Supported Compilers

Please note that, in the case of Visual Studio, the Express versions, the 2013 and 2015 versions and the Visual Studio Code are also fine.

STEP 3 The DOSBox Emulator


Inside a 64 bit OS you cannot run the MB86.EXE translator because is a 16 bit module, then you must install a DOSBox emulator from where run the translator.

The DOSBox emulator

If you use a 32 bit Windows OS you can skip this step.

STEP 4 Build The Executable


Open the C/C++ compiler command prompt according the chosen done on STEP 1 and STEP 2 (see details in the picture below), and move to the CB folder (cd C:\CB). Open the DOSBox console e mount the CB folder as C:\ local directory and move to it (mount c: c:\cb then c:).

C/C++ Supported Compilers

Now you have two options: use the CBBuilder tools or from the DOSBox prompt run the translation of the BASIC source file into C source file and then from the C/C++ compiler prompt run the build process, which is compilation and linking, using one of BUILD*.CMD script file.

Please note that if you want to use the BUILD*.CMD scripts you have to choose the 32 or 64 bit version according to the chosen C/C++ compiler command prompt.

Previous Post Next Post