1
0
mirror of https://github.com/KarolS/millfork.git synced 2026-04-20 18:16:35 +00:00

Almost full LR35902 opcode space coverage

This commit is contained in:
Karol Stasiak
2018-07-27 19:07:12 +02:00
parent 27de426a38
commit 7ea2fe6a4e
11 changed files with 100 additions and 19 deletions
+7 -2
View File
@@ -1,6 +1,6 @@
[< back to index](../index.md)
# Using Intel8080/Z80 assembly within Millfork programs
# Using 8080/LR35902/Z80 assembly within Millfork programs
There are two ways to include raw assembly code in your Millfork programs:
@@ -10,13 +10,18 @@ There are two ways to include raw assembly code in your Millfork programs:
## Assembly syntax
Millfork uses Zilog syntax for Intel 8080 and Z80 assembly. Intel syntax is not supported.
Millfork uses Zilog syntax for Intel 8080, Z80 and LR35902 assembly. Intel syntax is not supported.
Indexing via the IX/IY register uses the following syntax: `IX(1)`
LR35902 instructions that load/store the accumulator indirectly via HL and then increment/decrement HL are written
`LD A,(HLI)`, `LD, A,(HLD)`, `LD (HLI),A` and `LD (HLD),A`
Only instructions available on the current CPU architecture are available.
Undocumented instructions are not supported, except for `SLL`.
LR35902 instructions for faster access to the $FFxx addresses are not available yet.
Labels have to be followed by a colon and they can optionally be on a separate line.
Indentation is not important:
+1 -1
View File
@@ -28,7 +28,7 @@ For more details about how to pass parameters to `asm` functions, see:
* for 6502: [Using 6502 assembly within Millfork programs#Assembly functions](./assembly.md#assembly-functions).
* for Z80: [Using Z80 assembly within Millfork programs#Assembly functions](./assembly.md#assembly-functions).
* for Z80: [Using Z80 assembly within Millfork programs#Assembly functions](./assemblyz80.md#assembly-functions).
## Calling external functions at a dynamic address