mirror of
https://github.com/KarolS/millfork.git
synced 2026-04-20 18:16:35 +00:00
Documentation updates
This commit is contained in:
+18
-1
@@ -11,8 +11,12 @@
|
||||
|
||||
* [Target platform reference](api/target-platforms.md)
|
||||
|
||||
* [Defining a custom platform](api/custom-platform.md)
|
||||
|
||||
## Language reference
|
||||
|
||||
* [Preprocessor](lang/preprocessor.md)
|
||||
|
||||
* [Syntax](lang/syntax.md)
|
||||
|
||||
* [Types](lang/types.md)
|
||||
@@ -21,15 +25,28 @@
|
||||
|
||||
* [Functions](lang/functions.md)
|
||||
|
||||
* [Inline assembly syntax](lang/assembly.md)
|
||||
* [Inline 6502 assembly syntax](lang/assembly.md)
|
||||
|
||||
* [Inline Z80 assembly syntax](lang/assemblyz80.md)
|
||||
|
||||
* [Important guidelines regarding reentrancy](lang/reentrancy.md)
|
||||
|
||||
## Library reference
|
||||
|
||||
* [`stdlib` module](stdlib/stdlib.md)
|
||||
|
||||
* [Other cross-platform modules](stdlib/other.md)
|
||||
|
||||
* [C64-only modules](stdlib/c64.md)
|
||||
|
||||
* [NES-only modules](stdlib/nes.md)
|
||||
|
||||
## Implementation details
|
||||
|
||||
* [Variable storage](abi/variable-storage.md)
|
||||
|
||||
* [Calling convention](abi/calling-convention.md)
|
||||
|
||||
* [Undefined behaviour](abi/undefined-behaviour.md)
|
||||
|
||||
* [Undocumented instruction support](abi/undocumented.md)
|
||||
|
||||
@@ -24,7 +24,7 @@ Every platform is defined in an `.ini` file with an appropriate name.
|
||||
|
||||
* `65816` (WDC 65816/65802; experimental; currently only programs that use only 16-bit addressing are supported)
|
||||
|
||||
* `z80` (Zilog Z80; experimental and very incomplete)
|
||||
* `z80` (Zilog Z80; experimental and slightly incomplete)
|
||||
|
||||
* `encoding` – default encoding for console I/O, one of
|
||||
`ascii`, `pet`/`petscii`, `petscr`/`cbmscr`, `atascii`, `bbc`, `jis`/`jisx`, `apple2`,
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
# Target platforms
|
||||
|
||||
Currently, Millfork supports creating disk- or tape-based programs for Commodore, Apple, BBC and Atari 8-bit computers
|
||||
Currently, Millfork supports creating disk- or tape-based programs
|
||||
for Commodore, Apple, BBC and Atari 8-bit computers, NEC PC-88, ZX Spectrum 48k,
|
||||
and cartridge-based programs for Famicom/NES and Atari 2600,
|
||||
but it may be expanded to support other 6502-based and Z80-based platforms in the future.
|
||||
|
||||
@@ -54,9 +55,9 @@ Read [the BBC Micro programming guide](./bbcmicro-programming-guide.md) for more
|
||||
The compiler only emits raw binaries, not disk images.
|
||||
Read [the Apple 2 programming guide](./apple2-programming-guide.md) for more info.
|
||||
|
||||
* `pc88` – NEC PC-88 (very incomplete and not usable for anything yet)
|
||||
* `pc88` – NEC PC-88 (no ROM routines are mapped yet)
|
||||
|
||||
* `zxspectrum` – Sinclair ZX Spectrum 48k (very incomplete and not usable for anything yet)
|
||||
* `zxspectrum` – Sinclair ZX Spectrum 48k
|
||||
|
||||
The primary and most tested platform is Commodore 64.
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
[< back to index](../index.md)
|
||||
|
||||
# Using Z80 assembly within Millfork programs
|
||||
|
||||
The compiler supports Z80 assembly only partially. This will be remedied in the future.
|
||||
# Using Intel8080/Z80 assembly within Millfork programs
|
||||
|
||||
There are two ways to include raw assembly code in your Millfork programs:
|
||||
|
||||
@@ -12,12 +10,11 @@ There are two ways to include raw assembly code in your Millfork programs:
|
||||
|
||||
## Assembly syntax
|
||||
|
||||
Millfork inline assembly uses the same three-letter opcodes as most other 6502 assemblers.
|
||||
Indexing syntax is also the same. Only instructions available on the current CPU architecture are available.
|
||||
|
||||
**Work in progress**:
|
||||
Currently, `RES/SET/BIT` and some few more instructions are not supported yet.
|
||||
Millfork uses Zilog syntax for Intel 8080 and Z80 assembly. Intel syntax is not supported.
|
||||
|
||||
Indexing via the IX/IY register uses the following syntax: `IX(1)`
|
||||
|
||||
Only instructions available on the current CPU architecture are available.
|
||||
Undocumented instructions are not supported, except for `SLL`.
|
||||
|
||||
Labels have to be followed by a colon and they can optionally be on a separate line.
|
||||
@@ -138,6 +135,9 @@ it should abide to the following rules:
|
||||
|
||||
* don't change the IX register
|
||||
|
||||
* don't change the IY register if the target platform doesn't allow it
|
||||
(for example: ZX Spectrum in interrupt mode 1)
|
||||
|
||||
* don't jump between functions if either of functions has stack variables
|
||||
|
||||
* don't do `RET`, `RETI` or `RETN` if the function has stack variables
|
||||
|
||||
Reference in New Issue
Block a user