Skip to content

Commit 24184a0

Browse files
committed
update readme
1 parent ec796ea commit 24184a0

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,12 @@ basic.exe hello.bas # Windows
173173

174174
- **`-petscii` / `--petscii`**: enable PETSCII/ANSI mode so that certain `CHR$` control codes
175175
(cursor movement, clear screen, colors, etc.) are translated to ANSI escape sequences.
176-
- **`-palette ansi|c64`**: choose how PETSCII colors are mapped:
176+
Printable and graphics PETSCII codes are mapped to Unicode (e.g. £ ↑ ←, box-drawing, card suits).
177+
- **`-petscii-plain` / `--petscii-plain`**: PETSCII mode **without** ANSI: control and color codes
178+
output nothing (invisible, like on a real C64), and only printable/graphics bytes produce
179+
visible characters. Use this when you need strict one-character-per-column alignment (e.g.
180+
viewing .seq files or pasting output into a fixed-width editor).
181+
- **`-palette ansi|c64`**: choose how PETSCII colors are mapped (only in `-petscii` mode):
177182
- **`ansi`** (default): map colors to standard 16-color ANSI SGR codes.
178183
- **`c64`** or **`c64-8bit`**: use 8‑bit (`38;5;N`) color indices chosen to approximate
179184
the classic C64 palette. This is most consistent on terminals that support 256 colors.
@@ -215,7 +220,7 @@ In `-petscii` mode, `CHR$` behaves in a C64-like way: control and color codes ar
215220
If you do not pass a file name, the interpreter will print usage information:
216221

217222
```text
218-
Usage: basic [-petscii] [-palette ansi|c64] <program.bas>
223+
Usage: basic [-petscii] [-petscii-plain] [-palette ansi|c64] <program.bas>
219224
```
220225

221226
### Source normalization (compact CBM style)
@@ -235,6 +240,15 @@ The **`examples`** folder (included in release archives) contains:
235240
- **`examples/fileio_basics.bas`**: write and read a file (OPEN, PRINT#, INPUT#, CLOSE) with step-by-step comments.
236241
- **`examples/fileio_loop.bas`**: read until end of file using the ST status variable (ST=0/64/1).
237242
- **`examples/fileio_get.bas`**: read one character at a time with GET#.
243+
- **`examples/colaburger_viewer.bas`** and **`examples/colaburger.seq`**: PETSCII .seq file viewer.
244+
- **.seq files** are sequential dumps of PETSCII screen codes (e.g. from BBS logs or PETSCII art).
245+
- The viewer reads the file byte-by-byte with `GET#`, prints each byte via `CHR$`, and wraps after
246+
**40 visible columns** (only printable/graphics bytes advance the cursor; control/color codes do not).
247+
- Run with **`-petscii-plain`** so control and color codes output nothing and alignment matches a real
248+
C64 screen:
249+
`./basic -petscii-plain examples/colaburger_viewer.bas`
250+
- With **`-petscii`** you get ANSI colors and cursor codes; with **`-petscii-plain`** you get
251+
strict character alignment and no escape sequences, ideal for art and fixed-width paste.
238252
- **`guess.bas`**, **`adventure.bas`**, **`printx.bas`**, and others for various features.
239253

240254
### Notes on the BASIC dialect

0 commit comments

Comments
 (0)