Some insights into the differences between BASIC dialects and their implications for program portability.
Colour represents the CPU. Faded cells are keywords that no other machine listed has.
Across all supported dialects there are distinct spellings and that appear on every machine:
A fourteen-line program run through each machine's tokenizer (same program, not translated). About 68% between the lightest and heaviest machine and dialect.
Sinclair has a 5-byte binary form stored after every numeric literal; the CPC has additional line overhead. ZX80's 141 has no floating point to encode which saves space. This is why a program fit check can't simply reuse the source machines byte count, it has to re-tokenize for each target.
The three Commodores and the TRS-80 have no graphics, colour, error or sound keywords at all.
Note the CPC: the highest ceiling of any machine at 65,535.
Visual overview of control code distribution across machines. Important note: This is a general guide, not exact. These are codes understood and supported by Basically, there may be undocumented or missing ones.
Arranged by documented address region. Again this can be generalised, some machines have more complex memory layouts. CPC uses a non-linear line stepping structure for screen memory for example.
The Sinclair layouts have no screen region — the display file lives inside program RAM and moves as the program grows.
Rows are the source machine (porting from), columns are target. Darker is more work. Tap any cell for a breakdown.
Risky constructs that don't break but can lead to unexpected behavior when porting between dialects.
Correlation between diff cost and structural risk count is 0.58. 36 of the 182 pairs carry no structural risk at all; 20 carry 4 or more. The 5 worst all target the ZX80, which the matrix scores as low as 46.
When a variable name is reused across different machines, it can lead to unexpected behavior.
69 pairs collide plain names, another 27 collide only marked ones — the class my earlier reading missed entirely. The Atom and ZX80 use single-letter for everything.
Shows whether the target expresses each class fully, partially, or not at all. (Note: This is a general guide, not exact)
Variables or keywords that have the same name but different meanings across dialects. The table below shows where machines share the same function under different names.
Summary of least/most difficult to port programs, based on what's known to the Basically IDE so far.