Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Tiny BASIC
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Basic concepts=== {{See also|BASIC interpreter#Compilers vs. interpreters|l1=BASIC interpreters}} Tiny BASIC was designed to use as little memory as possible, and this is reflected in the paucity of features as well as details of its [[BASIC interpreter|interpreter system]]. Early microcomputers lacked the RAM and [[secondary storage]] for a BASIC [[compiler]], which was more typical of timesharing systems. Like most BASICs of the era, Tiny Basic was interactive with the user typing statements into a command line. As microcomputers of the era were often used with teletype machines or "dumb" terminals, direct editing of existing text was not possible and the editor instead used takeout characters, often the backslash, to indicate where the user backed up to edit existing text. If the user typed a statement into the command line the system examined it to see if it started with a number. If it did not, the line was immediately parsed and operated on, potentially generating output via {{code|PRINT}}. This was known as "direct mode". If the line was entered with a leading number, the number was converted from decimal format, like "50", and converted to a 8-bit value, in this case, {{code|$32}} [[hexadecimal]]. This number was used as an index into an [[array]]-like storage area where the rest of the line was stored in exactly the format it was typed. When the user typed {{code|LIST}} into the command line the system would loop over the array, convert the line number back to decimal format, and then print out the rest of the text in the line. When a program was present in memory and the user types in the {{code|RUN}} command, the system enters "indirect mode". In this mode, a pointer is set to point to the first line of the program, for instance, 10 ({{mono|{{#invoke:BaseConvert|10to16|10|width=2|prefix=$|suffix={{sub|hex}}}}}}). The original text for that line is then retrieved from the store and run as if the user had just typed it in direct mode. The pointer then advances to the next line and the process continues.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Tiny BASIC
(section)
Add topic