@@ -37,8 +37,7 @@ files in ASCII (plain text) or in a _“tokenized”_ format where the
37
37
keywords — such as ` FOR ` , ` IF ` , ` PRINT ` , ` REM ` — are converted to a
38
38
single byte. The Model 100 automatically tokenizes an ASCII program
39
39
when it is ` LOAD ` ed so that it can be ` RUN ` or ` SAVE ` d. The tokenized
40
- format saves space and loads faster, but where it is tokenized can
41
- matter.
40
+ format saves space and loads faster.
42
41
43
42
### The problem
44
43
@@ -90,14 +89,14 @@ The primary two filename extensions are:
90
89
tokenizers like this, one was expected to know that ASCII BASIC
91
90
files had to be renamed to .DO before downloading to a Model 100.
92
91
93
-
94
92
BASIC programs that use ` PEEK ` , ` POKE ` , or ` CALL ` typically only work
95
93
on one specific model of portable computer, even when the BASIC
96
- language and tokenization is identical. The only two models which have
97
- the same memory map are the Model 100 and and Tandy 102. Using POKE or
98
- CALL on the wrong model can crash badly, possibly losing files. To
99
- avoid this, when sharing BASIC programs over the network, filename
100
- extensions can indicate which model a program will work on:
94
+ language and tokenization is identical. (The only two models which
95
+ have the same memory map are the Model 100 and and Tandy 102.) Using
96
+ POKE or CALL on the wrong model can crash badly, possibly losing
97
+ files. To avoid this, when sharing BASIC programs over the network,
98
+ filename extensions are sometimes used to indicate which model a
99
+ program will work on:
101
100
102
101
* ` .100 ` An ASCII BASIC file that includes POKEs or CALLs specific
103
102
to the Model 100 or Tandy 102.
@@ -198,6 +197,8 @@ $ tokenize PROG.DO
198
197
Tokenizing ' PROG.DO' into ' PROG.BA'
199
198
```
200
199
200
+ <details ><summary >Click to see more examples</summary ><ul >
201
+
201
202
#### Example 2: Overwrite or rename
202
203
203
204
``` bash
@@ -240,6 +241,7 @@ from, debug, and improve it._
240
241
241
242
</ul >
242
243
244
+ </ul ></details >
243
245
244
246
### Running m100-tokenize and friends manually
245
247
@@ -381,17 +383,21 @@ program (currently) works only for the former, not the latter.
381
383
382
384
The three Radio-Shack portables (Models 100, 102 and 200), the Kyocera
383
385
Kyotronic-85, and the Olivetti M10 all share the same tokenized BASIC.
384
- That means one .BA program _ might_ work for any of them, presuming the
385
- program do not rely on CALL, PEEK, or POKE. However, the NEC family of
386
- portables -- the PC-8201, PC-8201A, and PC-8300 -- run N82 BASIC which
387
- has a different tokenization format.
386
+ That means one tokenize .BA file _ might_ work for any of those,
387
+ presuming the program does not use CALL, PEEK, or POKE. However, the
388
+ NEC family of portables -- the PC-8201, PC-8201A, and PC-8300 -- run
389
+ N82 BASIC, which has a different tokenization format. A tokenized N82
390
+ BASIC file cannot run on an M100 computer and vice versa, even for
391
+ programs which share the same ASCII BASIC source code.
388
392
389
393
### Checksum differences are not a compatibility problem
390
394
391
395
The .BA files generated by ` tokenize ` aim to be exactly the same, byte
392
396
for byte, as the output from tokenizing on a Model 100 using ` LOAD `
393
- and ` SAVE ` . There are some bytes, however, which can and do change but
394
- do not matter.
397
+ and ` SAVE ` . There are some bytes, however, which can change and should
398
+ be ignored when testing if two tokenized programs are identical.
399
+
400
+ <details ><summary >Click to read details on line number pointers...</summary ><ul >
395
401
396
402
A peculiar artifact of the [ ` .BA ` file format] [ fileformat ] is that it
397
403
contains pointer locations offset by where the program happened to be
@@ -419,6 +425,8 @@ described below.
419
425
420
426
[ fileformat ] : http://fileformats.archiveteam.org/wiki/Tandy_200_BASIC_tokenized_file " Reverse engineered file format documentation "
421
427
428
+ </ul ></details > <!-- Line number pointers -->
429
+
422
430
## Why Lex?
423
431
424
432
This program is written in
0 commit comments