You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,13 @@ Run this once after unpacking, and macOS will stop treating the binary as “fro
68
68
-**`DEF FN`**: define simple user functions, e.g. `DEF FNY(X) = SIN(X)`.
69
69
-**`POKE`**: accepted as a no‑op (for compatibility with old listings; it does not touch real memory).
70
70
-**`CLR`**: resets all variables to 0/empty, clears GOSUB/FOR stacks and DATA pointer; DEF FN definitions are kept.
71
+
-**File I/O (CBM-style)**:
72
+
-**`OPEN lfn, device, secondary, "filename"`** — open a file (device 1 = disk/file; secondary 0 = read, 1 = write, 2 = append). Filename is a path in the current directory.
73
+
-**`PRINT# lfn, expr [,|; expr ...]`** — write to the open file (like `PRINT` to file).
74
+
-**`INPUT# lfn, var [, var ...]`** — read from the open file into variables (one token per variable; comma/newline separated).
75
+
-**`GET# lfn, stringvar`** — read one character from the file into a string variable.
76
+
-**`CLOSE [lfn [, lfn ...]]`** — close file(s); `CLOSE` with no arguments closes all.
77
+
-**`ST`** — system variable set after `INPUT#`/`GET#`: 0 = success, 64 = end of file, 1 = error / file not open. Use e.g. `IF ST <> 0 THEN GOTO done`.
71
78
-**Variables**
72
79
-**Numeric variables**: `A`, `B1`, `AB`, `ATAKFLAG`, etc. Names may be longer than two characters; CBM-style **first two characters** identify the variable (e.g. `ATAKFLAG` and `ATA` refer to the same variable).
73
80
-**String variables**: names ending in `$`, e.g. `A$`, `NAME$`.
@@ -212,6 +219,10 @@ The **`examples`** folder (included in release archives) contains:
212
219
-**`chr.bas`**: PETSCII/ANSI color and control-code test (run with `-petscii`).
213
220
-**`examples/testdef.bas`**, **`tests/read_data.bas`**: small regressions for `DEF FN` and `READ`/`DATA`.
214
221
-**`test_dim2d.bas`**, **`test_get.bas`**: multi-dimensional arrays and `GET` Enter handling.
0 commit comments