mirror of
https://github.com/KarolS/millfork.git
synced 2026-04-21 09:16:34 +00:00
Many big important things:
– Add support for undocumented 8085 instructions – Convert undocumented 8085 instructions to 8086 – Add new CPU types and categorize CPU types correctly – Fix macro expansion in some situations – Improve 8080 optimizations – Improve documentation – Other improvements
This commit is contained in:
@@ -83,15 +83,16 @@ This may cause problems if the parameter table is stored next to a hardware regi
|
||||
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.
|
||||
* `-fillegals`, `-fno-illegals` – Whether should emit illegal (undocumented) NMOS 6502, Intel 8085 or Z80 opcodes.
|
||||
`.ini` equivalent: `emit_illegals`.
|
||||
Default: no.
|
||||
|
||||
#### 6502-related
|
||||
|
||||
* `-fcmos-ops`, `-fno-cmos-ops` – Whether should emit CMOS opcodes.
|
||||
* `-fcmos-ops`, `-fno-cmos-ops` – Whether should emit 65C02 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.
|
||||
@@ -128,13 +129,21 @@ Use a software stack for stack variables.
|
||||
|
||||
#### 8080/Z80-related
|
||||
|
||||
* `-f8085-ops`, `-fno-8085-ops` – Whether should emit Intel 8085 opcodes.
|
||||
`.ini` equivalent: `emit_8085`.
|
||||
Default: yes if targeting Intel 8085 architecture, no otherwise.
|
||||
|
||||
* `-fz80-ops`, `-fno-z80-ops` – Whether should emit Z80 opcodes.
|
||||
`.ini` equivalents: `emit_z80` and `emit_x80`.
|
||||
Default: yes if targeting a Z80-compatible architecture, no otherwise.
|
||||
|
||||
* `-fshadow-irq`, `-fno-shadow-irq` –
|
||||
Whether the interrupt routines should make use of Z80 shadow registers.
|
||||
`.ini` equivalent: `use_shadow_registers_for_irq`. Default: yes on Z80, no otherwise.
|
||||
|
||||
* `-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 and 8086, no otherwise.
|
||||
`.ini` equivalent: `ix_stack` and `iy_stack`. Default: IX on Z80, no otherwise.
|
||||
|
||||
* `-fuse-ix-for-scratch`, `-fno-use-ix-for-scratch` –
|
||||
Allow using the IX register for other purposes.
|
||||
@@ -144,6 +153,11 @@ Allow using the IX register for other purposes.
|
||||
Allow using the IY register for other purposes.
|
||||
`.ini` equivalent: `iy_scratch`. Default: no.
|
||||
|
||||
#### 8086-related
|
||||
|
||||
Compiling to 8086 is based on translating from a mix of 8085 and Z80 instructions to 8086.
|
||||
See [the 8086 support disclaimer](./../lang/x86disclaimer.md).
|
||||
|
||||
## Optimization options
|
||||
|
||||
* `-O0` – Disable all optimizations except unused global symbol removal.
|
||||
|
||||
@@ -29,18 +29,21 @@ if a line ends with a backslash character, the value continues to the next line.
|
||||
|
||||
* `z80` (Zilog Z80)
|
||||
|
||||
* `strictz80` (Z80 without illegal instructions)
|
||||
|
||||
* `i8080` (Intel 8080)
|
||||
|
||||
* `i8085` (Intel 8085)
|
||||
|
||||
* `strict8085` (Intel 8085 without illegal instructions)
|
||||
|
||||
* `gameboy` (Sharp LR35902; experimental)
|
||||
|
||||
* `i8086` (Intel 8086; very experimental, very buggy and very, very incomplete –
|
||||
see the [8086 support disclaimer](../lang/x86disclaimer.md))
|
||||
|
||||
* `encoding` – default encoding for console I/O, one of
|
||||
`ascii`, `pet`/`petscii`, `petscr`/`cbmscr`, `atascii`, `bbc`, `jis`/`jisx`, `apple2`,
|
||||
`iso_de`, `iso_no`/`iso_dk`, `iso_se`/`iso_fi`, `iso_yu`. Default: `ascii`
|
||||
* `encoding` – default encoding for console I/O. Default: `ascii`.
|
||||
See [the list of available encodings](../lang/text.md).
|
||||
|
||||
* `screen_encoding` – default encoding for screencodes (literals with encoding specified as `scr`).
|
||||
Default: the same as `encoding`.
|
||||
@@ -51,12 +54,18 @@ Default: the same as `encoding`.
|
||||
|
||||
* `emit_illegals` – whether the compiler should emit illegal instructions, default `false`
|
||||
|
||||
* `emit_cmos` – whether the compiler should emit CMOS instructions, default is `true` on compatible processors and `false` elsewhere
|
||||
* `emit_cmos` – whether the compiler should emit 65C02 instructions, default is `true` on compatible processors and `false` elsewhere
|
||||
|
||||
* `emit_65816` – which 65816 instructions should the compiler emit, either `no`, `emulation` or `native`
|
||||
|
||||
* `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
|
||||
|
||||
* `emit_8085` – whether the compiler should emit Intel 8085 instructions, default is `true` on compatible processors and `false` elsewhere
|
||||
|
||||
* `emit_x80` – whether the compiler should emit instructions present on Sharp LR35902 and Z80, but absent on Intel 8080, default is `true` on compatible processors and `false` elsewhere
|
||||
|
||||
* `emit_z80` – whether the compiler should emit Zilog Z80 instructions not covered by `emit_x80`, default is `true` on compatible processors and `false` elsewhere
|
||||
|
||||
* `ro_arrays` – (deprecated) whether the compiler should warn upon array writes, default is `false`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user