3 ms·
Line numbered BASICS were not hard to implement. They fit into small ROM images, complete with floating-point routines and graphics primitives. Those dialects d
by kazinator 3y ago
Line numbered BASICS were not hard to implement. They fit into small ROM images, complete with floating-point routines and graphics primitives. Those dialects do not have a fully blown nested syntax. Expressions nest, but statements do not. In each line of code, the parser has to deal with just one kind of phrase structure: like a GOTO, IF, or assignment.
BASIC interpreters tokenized the lines of the program into a compact representation, using just one byte for keywords and such. This was homoiconic: lines of code could be recovered back to text via listing them, and edited.
BASICs executed relatively fast, given the processors they were running on, and had predictable performance characteristics. Only string manipulation hit garbage collection pauses.