[YLUG] Pointer help correction

Dominic Hibbs dominic.hibbs at gmail.com
Mon Jan 14 13:46:14 GMT 2008


BBasic History

(I am not good at historical dates)
In the early 1980s schools were advised to start using computers and to
enable this a very good computer was designed for use  in schools in
association with the BBC.  It had a well thought out built in BASIC (in 32K
Bytes of ROM).  Unfortunately they made a very bad decision for their disc
chip and an even worse decision on the fileing system. This was despite
there being much better systems in use.
The Basic had many Pascal like features with named functions and procedures
and local variables.  However the floats were only five bytes long and the
integers 16 it (I think).
I had already taught myself assembly language for Z80, and the BBC machine
had an assembler buit into the BASIC ROM and it was easy to learn the 6502
assembly language on the BBC.  The IBM PC appeared with Microsoft's Quick
Basic - but that was truly aweful.  Pascal on the PC was full of problems
and slow to develope. The compile cycle time was typically four minutes.

I decide to study BASICs and their strong and weak points and after a year
of study I started writing BBASIC which was strongly modelled on BBC BASIC
but with many additional features.  Anyone who would like a copy to play
with can have one and I waive any copyrights

BBasic was written for the PC in assembler for 8086 and later 80386 under
DOS.

Numerics use 32 bit integers and eight byte floats although at that time
maths co-processors were not fitted to all (most) machines.
Variables were stored in a linked list but the pointer to the pointer to the
variable was in the program.  (most other BASICS had the variable name in
the stored program and had to look up the name each and every time it was
accessed.
 This means that the name need be stored once only and the look up occurs
once only at program writing time.  So the variable name has to be stored
where it can be found for program listing. The pointer to pointer is so that
variables can be local. The pointer to the value is stored on the stack
during the lifetime of the function or procedure.  So you can see where my
structures come from.

Most, if not all BASICS lose their variable values whenever the program
stops - Not so in BBasic - the program can be stopped, variables can be
changed and the program continued provided you are not in a loop or function
or procedure. - You can even change the program in certain circumstances.

If the program is saved from within the running program the program will
carry on the running state with all the variables intact when it is loaded.

Arrays can have any number of dimensions. There are Matrix operations
Addition, Subtraction, Multiplication, Transpose, Determinant and Inverse.
Built in search and sort routines.  These are versatile and VERY fast.

BBasic itself is only abo9ut 80K Bytes.

One of my users worked at the National Physics Laboratory preparing his
programs in BBasic with the very short cycle time and ease of debugging and
then translating it to Pascal.

I have been asked to make this BASIC available to Linux as there does not
appear to be any BASIC generally available.  It will be issued under GPL (if
I finish it)  (:-

 Cheers Dominic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/york/attachments/20080114/e0eeb3f2/attachment.html


More information about the York mailing list