1
0
mirror of https://github.com/KarolS/millfork.git synced 2026-04-21 09:16:34 +00:00

Documentation fixes

This commit is contained in:
Karol Stasiak
2019-06-05 18:34:32 +02:00
parent 9164e78a2d
commit 326e9d0585
10 changed files with 76 additions and 36 deletions
+29 -23
View File
@@ -22,6 +22,7 @@ Extension will be added automatically,
no extension for BBC micro program file,
`.inf` for BBC Micro metadata,
`.d88` for PC-88 disk images,
`.com` for CP/M executables,
`.rom` for MSX cartridge images,
`.tap` for ZX-Spectrum tape images.
@@ -65,14 +66,32 @@ Choose syntax for assembly output on 8080-like targets.
## Code generation options
* `-fcmos-ops`, `-fno-cmos-ops` Whether should emit CMOS opcodes.
`.ini` equivalent: `emit_cmos`.
Default: yes if targeting a 65C02-compatible architecture, no otherwise.
#### For all targets
* `-fillegals`, `-fno-illegals` Whether should emit illegal (undocumented) NMOS opcodes.
* `-fvariable-overlap`, `-fno-variable-overlap` Whether variables should overlap if their scopes do not intersect.
Default: yes.
* `-fbounds-checking`, `-fno-bounds-checking` Whether should insert bounds checking on array access.
Default: no.
* `-fcompact-dispatch-params`, `-fno-compact-dispatch-params`
Whether parameter values in return dispatch statements may overlap other objects.
This may cause problems if the parameter table is stored next to a hardware register that has side effects when reading.
`.ini` equivalent: `compact_dispatch_params`. Default: yes.
* `-flenient-encoding`, `-fno-lenient-encoding`
Whether the compiler should allow for invalid characters in string/character literals that use the default encodings and replace them with alternatives.
`.ini` equivalent: `lenient_encoding`. Default: yes on Apple II, no otherwise.
* `-fillegals`, `-fno-illegals` Whether should emit illegal (undocumented) NMOS or Z80 opcodes.
`.ini` equivalent: `emit_illegals`.
Default: no.
#### 6502-related
* `-fcmos-ops`, `-fno-cmos-ops` Whether should emit CMOS opcodes.
`.ini` equivalent: `emit_cmos`.
Default: yes if targeting a 65C02-compatible architecture, no otherwise.
* `-f65ce02-ops`, `-fno-65ce02-ops` Whether should emit 65CE02 opcodes.
`.ini` equivalent: `emit_65ce026`.
Default: yes if targeting 65CE02, no otherwise.
@@ -103,20 +122,11 @@ If disabled, a sofware decimal mode will be used.
`.ini` equivalent: `decimal_mode`.
Default: no if targeting Ricoh, yes otherwise.
* `-fvariable-overlap`, `-fno-variable-overlap` Whether variables should overlap if their scopes do not intersect.
Default: yes.
* `-fsoftware-stack`, `-fno-software-stack`
Use a software stack for stack variables.
`.ini` equivalent: `software_stack`. Default: no.
* `-fbounds-checking`, `-fno-bounds-checking` Whether should insert bounds checking on array access.
Default: no.
* `-fcompact-dispatch-params`, `-fno-compact-dispatch-params`
Whether parameter values in return dispatch statements may overlap other objects.
This may cause problems if the parameter table is stored next to a hardware register that has side effects when reading.
`.ini` equivalent: `compact_dispatch_params`. Default: yes.
* `-flenient-encoding`, `-fno-lenient-encoding`
Whether the compiler should allow for invalid characters in string/character literals that use the default encodings and replace them with alternatives.
`.ini` equivalent: `lenient_encoding`. Default: yes on Apple II, no otherwise.
#### 8080/Z80-related
* `-fshadow-irq`, `-fno-shadow-irq`
Whether the interrupt routines should make use of Z80 shadow registers.
@@ -124,7 +134,7 @@ Whether the interrupt routines should make use of Z80 shadow registers.
* `-fuse-ix-for-stack`, `-fuse-iy-for-stack`, `-fno-use-index-for-stack`
Which of Z80 index registers should be used for accessing stack variables, if any.
`.ini` equivalent: `ix_stack` and `iy_stack`. Default: IX on Z80, no otherwise.
`.ini` equivalent: `ix_stack` and `iy_stack`. Default: IX on Z80 and 8086, no otherwise.
* `-fuse-ix-for-scratch`, `-fno-use-ix-for-scratch`
Allow using the IX register for other purposes.
@@ -134,10 +144,6 @@ Allow using the IX register for other purposes.
Allow using the IY register for other purposes.
`.ini` equivalent: `iy_scratch`. Default: no.
* `-fsoftware-stack`, `-fno-software-stack`
Use a software stack for stack variables.
`.ini` equivalent: `software_stack`. Default: no.
## Optimization options
* `-O0` Disable all optimizations except unused global symbol removal.
@@ -181,7 +187,7 @@ Whether identical fragments of functions should be extracted into subroutines.
Default: no.
* `-Os`, `--size` Optimize for size, sacrificing some speed (experimental).
Also enables `-fcode-deduplication`.
Also enables `-fsubroutine-extraction`.
* `-Of`, `--fast` Optimize for speed, even if it increases the size a bit (experimental).
Also enables `-finline`.
+4 -4
View File
@@ -58,7 +58,7 @@ Default: the same as `encoding`.
* `decimal_mode` whether the compiler should emit decimal instructions, default is `false` on `ricoh` and `strictricoh` and `true` elsewhere;
if disabled, a software decimal mode will be used
* `ro_arrays` whether the compiler should warn upon array writes, default is `false`
* `ro_arrays` (deprecated) whether the compiler should warn upon array writes, default is `false`
* `prevent_jmp_indirect_bug` whether the compiler should try to avoid the indirect JMP bug,
default is `false` on 65C02-compatible or non-6502 processors and `true` elsewhere
@@ -86,7 +86,7 @@ Default: the same as `encoding`.
* `use_shadow_registers_for_irq` use Z80 shadow registers in interrupt routines, default is `true` for Z80 and `false` otherwise
* `ix_stack` use the IX register to access stack variables, default is `true` for Z80 and `false` otherwise
* `ix_stack` use the IX register to access stack variables, default is `true` for Z80 and 8086, `false` otherwise
* `iy_stack` use the IY register to access stack variables, default is `false`
@@ -94,7 +94,7 @@ Default: the same as `encoding`.
* `iy_scratch` allow using the IY register for other purposes, default is `false`
* `software_stach` use software stack for stack variables, default is `false`
* `software_stack` use software stack for stack variables, default is `false`. Applicable only to 6502-based targets.
* `output_intel_syntax` use Intel syntax instead of Zilog syntax, default is `true` for Intel 8080/8085 and `false` otherwise
@@ -120,7 +120,7 @@ Note that the default segment for uninitialized arrays and variables is always `
Default: `default`
* `segment_NAME_start` the first address used for automatic allocation in the segment.
Note that the `default` segment shouldn't start before $200, as the $0-$1FF range is reserved for the zeropage and the stack.
Note that on 6502-like targets, the `default` segment shouldn't start before $200, as the $0-$1FF range is reserved for the zeropage and the stack.
The `main` function will be placed as close to the beginning of its segment as possible, but not necessarily at `segment_NAME_start`
* `segment_NAME_end` the last address in the segment
+16 -2
View File
@@ -31,9 +31,23 @@ x64 hello_world.prg
The following options are obligatory when compiling your sources:
* `-o FILENAME` specifies the base name for your output file, an appropriate file extension will be appended (`prg` for Commodore, `xex` for Atari computers, `a2` for Apple, `asm` for assembly output, `lbl` for label file, `inf` for BBC file metadata, `dsk` for PC-88, `tap` for ZX Spectrum, `nes` for Famicom, `bin` for Atari 2600)
* `-o FILENAME` specifies the base name for your output file, an appropriate file extension will be appended
(`prg` for Commodore,
`xex` for Atari computers,
`a2` for Apple,
`asm` for assembly output,
`lbl` for label file,
`inf` for BBC file metadata,
`dsk` for PC-88,
`tap` for ZX Spectrum,
`rom` for MSX cartridges,
`com` for CP/M,
`nes` for Famicom,
`bin` for Atari 2600)
* `-t PLATFORM` specifies the target platform. Each platform is defined in an `.ini` file in the include directory. For the list of supported platforms, see [Supported platforms](target-platforms.md)
* `-t PLATFORM` specifies the target platform.
Each platform is defined in an `.ini` file in the include directory.
For the list of supported platforms, see [Supported platforms](target-platforms.md)
You may be also interested in the following: