Skip to content

Commit 474bdc5

Browse files
committed
Clarity
1 parent 67d91c0 commit 474bdc5

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

README.md

+22-14
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ files in ASCII (plain text) or in a _“tokenized”_ format where the
3737
keywords — such as `FOR`, `IF`, `PRINT`, `REM` — are converted to a
3838
single byte. The Model 100 automatically tokenizes an ASCII program
3939
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.
4241

4342
### The problem
4443

@@ -90,14 +89,14 @@ The primary two filename extensions are:
9089
tokenizers like this, one was expected to know that ASCII BASIC
9190
files had to be renamed to .DO before downloading to a Model 100.
9291

93-
9492
BASIC programs that use `PEEK`, `POKE`, or `CALL` typically only work
9593
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:
101100

102101
* `.100` An ASCII BASIC file that includes POKEs or CALLs specific
103102
to the Model 100 or Tandy 102.
@@ -198,6 +197,8 @@ $ tokenize PROG.DO
198197
Tokenizing 'PROG.DO' into 'PROG.BA'
199198
```
200199

200+
<details><summary>Click to see more examples</summary><ul>
201+
201202
#### Example 2: Overwrite or rename
202203

203204
``` bash
@@ -240,6 +241,7 @@ from, debug, and improve it._
240241

241242
</ul>
242243

244+
</ul></details>
243245

244246
### Running m100-tokenize and friends manually
245247

@@ -381,17 +383,21 @@ program (currently) works only for the former, not the latter.
381383

382384
The three Radio-Shack portables (Models 100, 102 and 200), the Kyocera
383385
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.
388392

389393
### Checksum differences are not a compatibility problem
390394

391395
The .BA files generated by `tokenize` aim to be exactly the same, byte
392396
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>
395401

396402
A peculiar artifact of the [`.BA` file format][fileformat] is that it
397403
contains pointer locations offset by where the program happened to be
@@ -419,6 +425,8 @@ described below.
419425

420426
[fileformat]: http://fileformats.archiveteam.org/wiki/Tandy_200_BASIC_tokenized_file "Reverse engineered file format documentation"
421427

428+
</ul></details> <!-- Line number pointers -->
429+
422430
## Why Lex?
423431

424432
This program is written in

0 commit comments

Comments
 (0)