Coleco ADAM SmartBASIC tokenized file
The Coleco Adam was a home computer system of the mid-1980s. It was released when its manufacturer, Coleco (whose name stands for Connecticut Leather Company) had recently made a lot of money selling Cabbage Patch Kids dolls, which were a big craze for a while in the early '80s. Now they were looking to dominate the video game and home computer fields, with the Colecovision game console and a computer that was based on it. The Adam could be purchased as a standalone computer, or as an expansion unit for an existing Colecovision console to turn it into a computer.
While it acquired a number of fans (some of whom kept supporting the Adam long after its demise; in fact, there are still Adam conventions even now), its mass market never took off, in part due to some reliability issues in early machines. By 1985, the computer was discontinued and its manufacturer was heading for bankruptcy.
Some quirky aspects of the Adam included the fact that its printer was an integral part of the computer, required for its operation (the power supply for the computer was contained in the printer), and the storage medium was a slightly-modified cassette which was treated similarly to a disk (using Coleco's EOS file system). (Disk drives were also available, using either the EOS file system or the CP/M file system.)
Reportedly, every time you saved a Coleco BASIC program, the size of each line containing a REM or DATA statement grew by one byte as an extra space was added after the keyword. To keep the program from growing uncontrollably and eventually exceeding memory space, the programmer had to keep manually deleting the extra spaces.
The Adam's BASIC was claimed to be compatible with Applesoft BASIC, which was a bit of an exaggeration; it was an imitation of Applesoft in many ways, but was not 100% compatible with it, especially programs using system-level PEEKs, POKEs, and CALLS (which are commonplace in both Applesoft and Adam BASIC), which were entirely different due to the different system architecture of the Adam vs. the Apple. The token storage also appears to be different.
Tokens
These token values were listed in a user group newsletter from 1986. It is not entirely clear exactly how these were used in the storage of a program.
Hex | Dec | Token meaning |
---|---|---|
02 | 2 | GOSUB |
03 | 3 | GOTO |
04 | 4 | INPUT |
05 | 5 | LET |
06 | 6 | NEXT |
07 | 7 | |
08 | 8 | READ |
09 | 9 | REM |
0A | 10 | FOR |
0B | 11 | IF |
0C | 12 | DATA |
0D | 13 | DIM |
0E | 14 | ON |
0F | 15 | ONERR |
10 | 16 | STOP |
11 | 17 | RETURN |
12 | 18 | END |
13 | 19 | DEF |
14 | 20 | CLEAR |
15 | 21 | RESUME |
16 | 22 | NEW |
17 | 23 | POP |
18 | 24 | RUN |
19 | 25 | LIST |
1A | 26 | TRACE |
1B | 27 | NOTRACE |
1C | 28 | DEL |
1D | 29 | CALL |
1E | 30 | CONT |
1F | 31 | CLRERR |
20 | 32 | GET |
21 | 33 | POKE |
22 | 34 | RESTORE |
23 | 35 | HOME |
24 | 36 | DRAW |
25 | 37 | XDRAW |
26 | 38 | FLASH |
27 | 39 | INVERSE |
28 | 40 | NORMAL |
29 | 41 | TEXT |
2A | 42 | GR |
2B | 43 | HGR |
2C | 44 | HGR2 |
2D | 45 | HLIN |
2E | 46 | VLIN |
2F | 47 | HPLOT |
30 | 48 | PLOT |
31 | 49 | HTAB |
32 | 50 | VTAB |
33 | 51 | SHLOAD |
34 | 52 | RECALL |
35 | 53 | STORE |
36 | 54 | WAIT |
37 | 55 | SPEED |
38 | 56 | ROT |
39 | 57 | SCALE |
3A | 58 | COLOR |
3B | 59 | HCOLOR |
3C | 60 | IN |
3D | 61 | PR |
3E | 62 | HIMEM |
3F | 63 | LOMEM |
40 | 64 | BREAK |
41 | 65 | NOBREAK |
42 | 66 | & |