Millfork: a middle-level programming language targeting 6502- and Z80-based microcomputers and home consoles
This project is maintained by KarolS
Getting started
Command-line option reference
Target platform reference
Defining a custom platform
Preprocessor
Modules
Syntax
Types
Literals
Predefined constants
List of magic suffixes
List of text encodings and escape sequences
Defining custom encodings
Operators reference
Functions
Inline 6502 assembly syntax
Inline 8080/LR35902/Z80 assembly syntax
Inline 6809 assembly syntax
Important guidelines regarding reentrancy
Optimization hints
List of keywords
stdlib module
stdlib
string, scrstring and pstring modules
string
scrstring
pstring
stdio module
stdio
Reading input devices:
joy module
joy
keyboard module
keyboard
mouse module
mouse
encconv module
encconv
Other cross-platform modules (err, random)
err
random
Platform-specific modules:
Definitions available on only some platforms
C64-only modules
VIC-20-only modules
PET-only modules
cbm_file module
cbm_file
Apple II-only modules
NES-only modules
Atari Lynx-only modules
Game Boy–only modules
X16–only modules
Differences from C
Differences from other assemblers
Optimization guide
Variable storage
Calling convention
Undefined behaviour
Undocumented instruction support
Reference for labels in generated assembly code
Example programs
Millfork wiki
Benchmarks
Downloads
Source code