Skip to content

Commit 023c80a

Browse files
MrKOSMOSboriel
authored andcommitted
Update zxb.md
Updated output of -h with that of the latest version, changed indentation for easier comparison with the old text
1 parent 5a0094b commit 023c80a

1 file changed

Lines changed: 56 additions & 38 deletions

File tree

docs/zxb.md

Lines changed: 56 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -53,64 +53,82 @@ You can change the default origin using the -S command line parameter.
5353
ZXB provides several (and useful) command line options. To see them, just type **_zxb.py -h_**, which outputs:
5454

5555
```
56-
usage: zxb [-h] [-d] [-O OPTIMIZE] [-o OUTPUT_FILE] [-T] [-t] [-B] [-a] [-A]
56+
usage: zxbc.py [-h] [-d] [-O OPTIMIZE] [-o OUTPUT_FILE]
57+
[-T | -t | -A | -E | --parse-only | -f {asm,bin,ir,sna,tap,tzx,z80}] [-B] [-a]
5758
[-S ORG] [-e STDERR] [--array-base ARRAY_BASE]
58-
[--string-base STRING_BASE] [-Z] [-H HEAP_SIZE] [--debug-memory]
59-
[--debug-array] [--strict-bool] [--enable-break] [-E] [--explicit]
60-
[-D DEFINES] [-M MEMORY_MAP] [-i] [-I INCLUDE_PATH] [--strict]
59+
[--string-base STRING_BASE] [-Z] [-H HEAP_SIZE] [--heap-address HEAP_ADDRESS] [--debug-memory]
60+
[--debug-array] [--strict-bool] [--enable-break] [--explicit]
61+
[-D DEFINES] [-M MEMORY_MAP] [-i] [-I INCLUDE_PATH] [--strict] [--headerless]
6162
[--version]
63+
[--append-binary APPEND_BINARY] [--append-headless-binary APPEND_HEADLESS_BINARY]
64+
[-N] [--arch ARCH]
65+
[--expect-warnings EXPECT_WARNINGS] [-W DISABLE_WARNING] [+W ENABLE_WARNING] [--hide-warning-codes]
66+
[-F CONFIG_FILE] [--save-config SAVE_CONFIG] [--opt-strategy {size,speed,auto}]
6267
PROGRAM
6368
6469
positional arguments:
6570
PROGRAM BASIC program file
6671
67-
optional arguments:
72+
options:
6873
-h, --help show this help message and exit
69-
-d, --debug Enable verbosity/debugging output. Additional -d
70-
increase verbosity/debug level
71-
-O OPTIMIZE, --optimize OPTIMIZE
72-
Sets optimization level. 0 = None (default level is 2)
73-
-o OUTPUT_FILE, --output OUTPUT_FILE
74-
Sets output file. Default is input filename with .bin
75-
extension
76-
-T, --tzx Sets output format to tzx (default is .bin)
77-
-t, --tap Sets output format to tap (default is .bin)
78-
-B, --BASIC Creates a BASIC loader which loads the rest of the
79-
CODE. Requires -T or -t
74+
-d, --debug Enable verbosity/debugging output. Additional -d increase verbosity/debug level
75+
-O, --optimize OPTIMIZE
76+
Sets optimization level. 0 = None (default level is 2
77+
-o, --output OUTPUT_FILE
78+
Sets output file. Default is input filename with .bin extension
79+
-T, --tzx Sets output format to .tzx (default is .bin).
80+
-t, --tap Sets output format to .tap (default is .bin).
81+
-A, --asm Sets output format to .asm. DEPRECATED. Use -f
82+
-E, --emit-backend Emits backend code (IR) instead of ASM or binary.
83+
--parse-only Only parses to check for syntax and semantic errors
84+
-f, --output-format {asm,bin,ir,sna,tap,tzx,z80}
85+
Output format
86+
-B, --BASIC Creates a BASIC loader which loads the rest of the CODE. Requires -T ot -t
8087
-a, --autorun Sets the program to be run once loaded
81-
-A, --asm Sets output format to asm
82-
-S ORG, --org ORG Start of machine code. By default 32768
83-
-e STDERR, --errmsg STDERR
84-
Error messages file (standard error console by
85-
default)
88+
-S, --org ORG Start of machine code. By default 32768
89+
-e, --errmsg STDERR Error messages file (standard error console by default)
8690
--array-base ARRAY_BASE
8791
Default lower index for arrays (0 by default)
8892
--string-base STRING_BASE
8993
Default lower index for strings (0 by default)
90-
-Z, --sinclair Enable by default some more original ZX Spectrum
91-
Sinclair BASIC features: ATTR, SCREEN$, POINT
92-
-H HEAP_SIZE, --heap-size HEAP_SIZE
94+
-Z, --sinclair Enable by default some more original ZX Spectrum Sinclair BASIC features: ATTR, SCREEN$, POINT
95+
-H, --heap-size HEAP_SIZE
9396
Sets heap size in bytes (default 4768 bytes)
94-
--heap-size HEAP_ADDRESS
95-
Sets the start address of the heap
97+
--heap-address HEAP_ADDRESS
98+
Sets the heap address.
9699
--debug-memory Enables out-of-memory debug
97100
--debug-array Enables array boundary checking
98-
--strict-bool Enforce boolean values to be 0 or 1
101+
--strict-bool Enforce boolean values to be 0 or 1 (Deprecated)
99102
--enable-break Enables program execution BREAK detection
100-
-E, --emit-backend Emits backend code instead of ASM or binary
101-
--explicit Requires all variables and functions to be declared
102-
before used
103-
-D DEFINES, --define DEFINES
104-
Defines de given macro. Eg. -D MYDEBUG or -D
105-
NAME=Value
106-
-M MEMORY_MAP, --mmap MEMORY_MAP
103+
--explicit Requires all variables and functions to be declared before used
104+
-D, --define DEFINES Defines de given macro. Eg. -D MYDEBUG or -D NAME=Value
105+
-M, --mmap MEMORY_MAP
107106
Generate label memory map
108-
-i, --ignore-case Ignore case. Makes variable names are case insensitive
109-
-I INCLUDE_PATH, --include-path INCLUDE_PATH
110-
Add colon separated list of directories to add to
111-
include path. e.g. -I dir1:dir2
107+
-i, --ignore-case Ignore case. Makes variable and function names insensitive
108+
-I, --include-path INCLUDE_PATH
109+
Add colon separated list of directories to add to include path. e.g. -I dir1:dir2
112110
--strict Enables strict mode. Force explicit type declaration
111+
--headerless Header-less mode: omit asm prologue and epilogue
113112
--version show program's version number and exit
113+
--append-binary APPEND_BINARY
114+
Appends binary to tape file (only works with -t or -T)
115+
--append-headless-binary APPEND_HEADLESS_BINARY
116+
Appends binary to tape file (only works with -t or -T)
117+
-N, --zxnext Enables ZX Next asm extended opcodes
118+
--arch ARCH Target architecture (defaults is'zx48k'). Available architectures: zx48k,zxnext
119+
--expect-warnings EXPECT_WARNINGS
120+
Expects N warnings: first N warnings will be silenced
121+
-W, --disable-warning DISABLE_WARNING
122+
Disables warning WXXX (i.e. -W100 disables warning with code W100)
123+
+W, --enable-warning ENABLE_WARNING
124+
Enables warning WXXX (i.e. -W100 disables warning with code W100)
125+
--hide-warning-codes Hides WXXX codes
126+
-F, --config-file CONFIG_FILE
127+
Loads config from config file
128+
--save-config SAVE_CONFIG
129+
Save options into a config file
130+
--opt-strategy {size,speed,auto}
131+
Optimization strategy (optimize for speed or size). Default: auto
114132
```
115133

116134
Some options (-h, --version) are quite obvious. Let's focus on the rest:

0 commit comments

Comments
 (0)