Anonymous

Project:Nanode/Tiny Basic: Difference between revisions

From London Hackspace Wiki
Line 9: Line 9:
==BASIC - WTF!==
==BASIC - WTF!==


As computers have got more powerful with more memory and processor resources, much of the early work done with simple basic has been forgotten - but for a whole generation of programmers - basic was their first introduction to real computer programming.
As computers have got more powerful with more memory and processor resources, much of the early work done with simple basic has been forgotten - but for a whole generation of programmers - Basic was their first introduction to real computer programming.


The simplest of programs can be entered from a serial terminal window - and can be executed immediately using the RUN command - for example:
The simplest of programs can be entered from a serial terminal window - and can be executed immediately using the RUN command - for example:
Line 17: Line 17:
20 GOTO 10
20 GOTO 10


Most programmers aged 30 or over were introduced to programming with a similar first program - it is the "Hello World" of  BASIC programming.  30 years ago - almost every home computer you could buy had some sort of Basic interpreter running in the background.   
Most programmers aged 30 or over were introduced to programming with a similar first program - it is the "Hello World" of  BASIC programming.   


[http://en.wikipedia.org/wiki/Tiny_BASIC Tiny Basic] hails from 1976, when members of the Homebrew Computer Club of Menlo Park - in Northern California's Silicon Valley were looking around for a simple and compact interpreted language that would run on their homemade Altair 8800 machines - and did not want to pay the young entrepreneur William Gates $150 for his version of 8080 Basic. So a challenge went out to the members to write their own - and several did, the most notable was Tom Pittman.
30 years ago - almost every home computer you could buy had some sort of Basic interpreter running in the background. 
 
==Origins of Tiny Basic==
 
BASIC stands for Beginners All Purpose Symbolic Instruction Code and was developed around 1963/64 at Dartmouth College. Over the next 10 years it was ported to most of the mini and mainframe computers.
 
In 1975 a very snot-nosed Bill Gates and Paul Allen developed a version of Basic to run on the new [http://en.wikipedia.org/wiki/Altair_8800 Altair 8800 home computer] This was the birth of Micro Soft and set Bill Gates out on his entrepreneurial career.  The genius however was Paul Allen, who simulated the whole program on a minicomputer - withoutever having touched an Intel 8080 microprocessor system - however the is a digression.
 
Our version of [http://en.wikipedia.org/wiki/Tiny_BASIC Tiny Basic] hails from 1976, when members of the Homebrew Computer Club of Menlo Park - in Northern California's Silicon Valley were looking around for a simple and compact interpreted language that would run on their homemade Altair 8800 machines - and did not want to pay the young entrepreneur William Gates $150 for his version of 8080 Basic. So a challenge went out to the members to write their own - and several did, the most notable was Tom Pittman.


http://www.ittybittycomputers.com/IttyBitty/TinyBasic/index.htm .
http://www.ittybittycomputers.com/IttyBitty/TinyBasic/index.htm .
Line 34: Line 42:


The first task was to find a program which can be used like an operating system - in order to tie all the various hardware functions and libraries together.
The first task was to find a program which can be used like an operating system - in order to tie all the various hardware functions and libraries together.


I recently was made aware of an assembly language version that compiled on an AVR (eg ATmega328) into under 4K - but modifying this code was going to be a little to intense for most people - so I was delighted to see that Mike Field had taken the generic C version and updated it so that it can run on an Arduino - or Nanode - without modification. Mike's working port of Tiny Basic - written in C, compiles into just under 7.8K on a standard Arduino. If you crank the baudrate up to 115200 - it is surprisingly quick at executing.
I recently was made aware of an assembly language version that compiled on an AVR (eg ATmega328) into under 4K - but modifying this code was going to be a little to intense for most people - so I was delighted to see that Mike Field had taken the generic C version and updated it so that it can run on an Arduino - or Nanode - without modification. Mike's working port of Tiny Basic - written in C, compiles into just under 7.8K on a standard Arduino. If you crank the baudrate up to 115200 - it is surprisingly quick at executing.
552

edits