- Version : 1.2 (Septembre 2007)
- Gratuitiel pour :
- Langue :
- Ecran :
- Fichier téléchargeable : tinybasic.zip (170 Ko)
est un petit exercice de style, le développement d'un interpréteur Basic minimaliste pour Palm en utilisant iziBasic
. J'ai ensuite porté le code source sous PP & NaPP
pour Palm ainsi que sous Free Pascal
Qu'est ce que tinyBasic ?Note : la population concernée par ce genre de "joujou" étant principalement la communauté des développeurs, la langue usuelle de travail de cette communauté étant l'anglais, je vous prie de bien vouloir me pardonner de ne pas avoir pris le soin de traduire en français le reste de cette page (mais si quelqu'un souhaite le faire, il sera le bienvenu !).
tinyBasic is a quick & dirty Tiny BASIC interpreter for Palm.
Source code versions are available in Basic (iziBasic) and Pascal (PP, NaPP and Free Pascal), to be found in the download package together with full documentation. These source codes are of course in "Copyleft", as my small contribution to its original author's great philanthropy (read below). Tiny BASIC
Tiny BASIC started out as a way to get a BASIC running in the minimum amount of memory space (~2 KBytes), because RAM used to be very expensive and home computers would only have a few KB of RAM back in the 1970's.
Here is an interesting link about Tiny BASIC: http://en.wikipedia.org/wiki/Tiny_BASIC_programming_language
Nowadays, Tiny BASIC is no more than a programming game that still a few people have fun with
But, nevertheless, my work inspired some other people, including Carl Gundel, who is the author of the well-known Liberty Basic. Read the full story here: http://basicprogramming.blogspot.com/2007/01/tiny-basic-revisited.html
And play online with Carl's port of my tinyBasic here: http://www.runbasic.com/
My Tiny BASIC dialect, that I just called "tinyBasic", is similar and loosely based on the Intel 8080 Tiny BASIC written by Li Chen Wang and appearing in Doctor Dobb's Journal of Computer Calisthenics & Orthodontia in the May 1976 Vol 1, No. 5 issue. It is worth mentioning that Li Chen Wang's Tiny BASIC interpreter was released with full source code, showing the "copyleft" label for the first time, and occupied only 1.77 KBytes of memory.
The main differences between my tinyBasic dialect and Li Chen Wang's Tiny BASIC are:
- the use of float and not of integer numbers (because it is written in iziBasic, there is no need to bring a limit in this area), and the use of the integer division operation ("") to easily get the integer part of a number;
- the no use of GOSUB/RETURN to avoid a stack (and because you can easily simulate a GOSUB/RETURN call with GOTO and a variable set to the return line);
- the addition of the LOAD/SAVE statements, for allowing to keep working on a source code;
- the addition of the HELP statement, to get an immediate onboard reminder;
- the addition of the MEM statement, to get an idea of the free remaining storage;
- the addition of the CLS statement, to clear the screen;
- the addition of the TICKS/TICKSPERSEC functions, to show how to integrate functions in the math parser and to get an idea of speed execution (benchmarking).
Note: tinyBasic's bytecode in iziBasic is 3.20 KBytes long, to be compared with the 1.77 KBytes of Li Chen Wang's Tiny BASIC.Updates Description1.2 (09/17/07)
- recompiled this program with the latest iziBasic version 6.1 to avoid device freezes or soft resets on some devices1.1 (04/30/07)
- minor update of iziBasic's source code to retrieve correctly values like -3 or .5 (before one had to write a=0-3 or a=0.5, when now a=-3 and a=.5 are valid entries)
- another minor update was to only accept integer values as line numbers
- ported the iziBasic source code to PP, NaPP and Free Pascal1.0 (11/04/05)
- initial release (iziBasic source code only)