-----------------------------------
Tinyloc
-----------------------------------

Wishing to experiment with the Commodore 128 CP/M mode, I first tried to run the LOCCALC.BAS program with the famous Microsoft MBASIC interpreter under CP/M.
The software LOCCALC.BAS, developed in the CBM Basic V2 dialect, works without modifications with the MBASIC interpreter, with the only precaution of typing capital letters as inputs.
This fact is not surprising because Commodore Basics are directly derived from MBASIC and they share most of their syntax with it.
In particular Basic V2 is a subset of MBASIC and it is highly portable not only between Commodore machines, but also towards BASICA/GW-BASIC, the latter widely used on IBM PCs and compatibles of the time.

I wanted to run LOCCALC.BAS in a free CP/M environment, but unfortunately it is still unclear today whether the MBASIC interpreter is free software or not, despite Microsoft having publicly released the source codes.
So I decided to develop a new program that could work with the public domain Tiny Basic interpreter, a version of which I found on the internet compiled for the CP/M operating system.
Tiny Basic, however, has several limitations compared to Basic V2, including the use of only integer numbers, no strings, only numeric input supported, the lack of possibility to manage the ASCII encoding of characters, the absence of AND and OR operators in the IF statements.
I therefore wrote a very limited program, Tinyloc, which only allows you to calculate the qth locator starting from the geographical coordinates in DMS format.
Given the limitations of the interpreter, I consider this a good result.

Here is the link to the source code of Tinyloc: tinyloc.txt
Here is the link to a bootable disk image in d71 format with the program Tinyloc itself and the Tiny Basic interpreter: tinyloc.d71

To load, run and use Tinyloc follow the instructions reported below.

[Back to the home page]

Screenshots/usage

To load and start the program Tinyloc with the VICE Commodore emulator:
0 - Start the VICE Commodore emulator (x128)
1 - Attach the disk image "tinyloc.d71" to drive 8 (must be a 1571 disk drive) and type BOOT at the C128 prompt.
2 - Once the CP/M operating system is loaded, type DIR at the CP/M prompt to view the contents of the disk
3 - Type TINYBAS at the CP/M prompt to load the Tiny Basic interpreter
4 - Once the Basic interpreter is loaded, type LOAD TINYLOC at the interpreter's prompt (all capital tetters, file name without extension and without quotes) to load the program
5 - Type RUN (all capital letters) at the interpreter's prompt to run the program


Loading and running Tinyloc under CP/M with VICE emulating a C128 (CP/M mode)
Loading and
        running the program under CP/M with VICE (C128)


Enter longitude and latitude as required by the program.  The program prints the corresponding qth locator on the screen.


Entering longitude and latitude; The program Tinyloc calculates and prints the locator
Running the
        program: entering lon/lat and calculating the locator

To exit the Basic interpreter and return to the operating system, type BYE.
Have fun!

[Back to the home page]