From 52c5a10e6e6417550978e5792e28d35f74c3f07a Mon Sep 17 00:00:00 2001 From: Karol Stasiak Date: Mon, 15 Jul 2019 13:52:05 +0200 Subject: [PATCH] Documentation overhaul --- README.md | 13 +---- docs/README.md | 18 +++++- docs/abi/calling-convention.md | 2 +- docs/abi/generated-labels.md | 2 +- docs/abi/inlining.md | 2 +- docs/abi/undefined-behaviour.md | 2 +- docs/abi/undocumented.md | 2 +- docs/abi/variable-storage.md | 2 +- docs/api/apple2-programming-guide.md | 2 +- docs/api/bbcmicro-programming-guide.md | 2 +- docs/api/command-line.md | 21 ++++--- docs/api/commodore-programming-guide.md | 2 +- docs/api/cpc-programming-guide.md | 2 +- docs/api/custom-platform.md | 2 +- docs/api/famicom-programming-guide.md | 2 +- docs/api/gb-programming-guide.md | 2 +- docs/api/getting-started.md | 23 +++----- docs/api/lunix-programming-guide.md | 2 +- docs/api/rom-vs-ram.md | 2 +- docs/api/target-platforms.md | 2 +- docs/index.md | 71 ++++++------------------ docs/lang/assembly.md | 2 +- docs/lang/assemblyz80.md | 2 +- docs/lang/functions.md | 2 +- docs/lang/interfacing.md | 2 +- docs/lang/literals.md | 2 +- docs/lang/operators.md | 2 +- docs/lang/preprocessor.md | 2 +- docs/lang/reentrancy.md | 2 +- docs/lang/syntax.md | 2 +- docs/lang/text.md | 2 +- docs/lang/types.md | 2 +- docs/lang/x86disclaimer.md | 2 +- docs/logo_transparent.png | Bin 0 -> 690 bytes docs/stdlib/c64.md | 2 +- docs/stdlib/cbm_file.md | 2 +- docs/stdlib/frequent.md | 2 +- docs/stdlib/gb.md | 2 +- docs/stdlib/input.md | 6 +- docs/stdlib/nes.md | 2 +- docs/stdlib/other.md | 2 +- docs/stdlib/stdio.md | 2 +- docs/stdlib/stdlib.md | 2 +- docs/stdlib/string.md | 2 +- docs/{ => various}/faq.md | 10 ++-- examples/README.md | 2 + mkdocs.yml | 55 ++++++++++++++++++ 47 files changed, 157 insertions(+), 136 deletions(-) create mode 100644 docs/logo_transparent.png rename docs/{ => various}/faq.md (93%) create mode 100644 mkdocs.yml diff --git a/README.md b/README.md index 4078a206..13c9a9c9 100644 --- a/README.md +++ b/README.md @@ -59,18 +59,7 @@ Therefore, no attribution is needed if you are developing and distributing Millf ## More info -* [Documentation](docs/index.md) +* [Documentation](docs/README.md) (external version: [https://millfork.readthedocs.io](https://millfork.readthedocs.io)) * [Example programs](examples/README.md) -## Planned features - -* stdlib improvements - -* more 6502 targets: Oric computers, PC-Engine/Turbografx-16, Atari Lynx - -* more Z80 targets: TI-83, Sega Master System - -* better support for 65816, Sharp LR35902 and eZ80 - -* support for SuperFamicom/SNES and Apple IIgs diff --git a/docs/README.md b/docs/README.md index b7628a76..a1f854d8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,7 +1,6 @@ -# Documentation - - **★ WORK IN PROGRESS ★** +# Documentation index +* [Home page](index.md) ## Compiler usage @@ -68,3 +67,16 @@ * [Undocumented instruction support](abi/undocumented.md) * [Reference for labels in generated assembly code](abi/generated-labels.md) + +## External links + +* [Example programs](https://github.com/KarolS/millfork/tree/master/examples) + +* [Millfork wiki](https://github.com/KarolS/millfork/wiki) + +* [Benchmarks](https://github.com/KarolS/millfork-benchmarks) + +* [Downloads](https://github.com/KarolS/millfork/releases/) + +* [Source code](https://github.com/KarolS/millfork) + diff --git a/docs/abi/calling-convention.md b/docs/abi/calling-convention.md index 4dd21b07..0a17bd86 100644 --- a/docs/abi/calling-convention.md +++ b/docs/abi/calling-convention.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Millfork calling convention diff --git a/docs/abi/generated-labels.md b/docs/abi/generated-labels.md index bc7b0e38..e7978228 100644 --- a/docs/abi/generated-labels.md +++ b/docs/abi/generated-labels.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Guide to generated label names diff --git a/docs/abi/inlining.md b/docs/abi/inlining.md index 330a54a6..73986c46 100644 --- a/docs/abi/inlining.md +++ b/docs/abi/inlining.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Macros and inlining diff --git a/docs/abi/undefined-behaviour.md b/docs/abi/undefined-behaviour.md index 8961d939..31faddf9 100644 --- a/docs/abi/undefined-behaviour.md +++ b/docs/abi/undefined-behaviour.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Undefined behaviour diff --git a/docs/abi/undocumented.md b/docs/abi/undocumented.md index 7c4afa97..55428ebb 100644 --- a/docs/abi/undocumented.md +++ b/docs/abi/undocumented.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Undocumented opcodes diff --git a/docs/abi/variable-storage.md b/docs/abi/variable-storage.md index 0ee4e47c..431e6029 100644 --- a/docs/abi/variable-storage.md +++ b/docs/abi/variable-storage.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Variable storage diff --git a/docs/api/apple2-programming-guide.md b/docs/api/apple2-programming-guide.md index dfc3b2ad..17d72f0f 100644 --- a/docs/api/apple2-programming-guide.md +++ b/docs/api/apple2-programming-guide.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) ### A note about Apple II diff --git a/docs/api/bbcmicro-programming-guide.md b/docs/api/bbcmicro-programming-guide.md index a7c2b7d4..98049d08 100644 --- a/docs/api/bbcmicro-programming-guide.md +++ b/docs/api/bbcmicro-programming-guide.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) ### A note about BBC Micro diff --git a/docs/api/command-line.md b/docs/api/command-line.md index f87b6b51..c2235b01 100644 --- a/docs/api/command-line.md +++ b/docs/api/command-line.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Command-line options @@ -15,16 +15,19 @@ * `-o ` – Output filename, without extension. Extension will be added automatically, `.prg` for Commodore (including LUnix/LNG), -`.a2` for Apple, +`.crt` for Commodore cartridges, `.xex` for Atari computers, -`.bin` for Atari VCS, -`.nes` for NES, -no extension for BBC micro program file, -`.inf` for BBC Micro metadata, -`.d88` for PC-88 disk images, -`.com` for CP/M executables, +`.a2` for Apple, +`.dsk` for PC-88 disk images, +`.tap` for ZX-Spectrum tape images, `.rom` for MSX cartridge images, -`.tap` for ZX-Spectrum tape images. +`.com` for CP/M executables, +`.nes` for NES/Famicom, +`.bin` for Atari 2600, +no extension for BBC micro program file, +`.inf` for BBC Micro file metadata, +`.asm` for assembly output, +`.lbl`, `.nl`, `.fns`, or `.sym` for label file. * `-s` – Generate also the assembly output. It is not compatible with any assembler, but it serves purely informational purpose. The file has the same nam as the output file and the extension is `.asm`. diff --git a/docs/api/commodore-programming-guide.md b/docs/api/commodore-programming-guide.md index 372f3cfb..cee05882 100644 --- a/docs/api/commodore-programming-guide.md +++ b/docs/api/commodore-programming-guide.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) ### A note about Commodore 64 diff --git a/docs/api/cpc-programming-guide.md b/docs/api/cpc-programming-guide.md index 6ceafb95..8bad9432 100644 --- a/docs/api/cpc-programming-guide.md +++ b/docs/api/cpc-programming-guide.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) ### A note about Amstrad CPC diff --git a/docs/api/custom-platform.md b/docs/api/custom-platform.md index 96153488..1c6d4f8a 100644 --- a/docs/api/custom-platform.md +++ b/docs/api/custom-platform.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) ## Adding a custom platform diff --git a/docs/api/famicom-programming-guide.md b/docs/api/famicom-programming-guide.md index 53e1f61b..ffd99941 100644 --- a/docs/api/famicom-programming-guide.md +++ b/docs/api/famicom-programming-guide.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Famicom/NES programming guide diff --git a/docs/api/gb-programming-guide.md b/docs/api/gb-programming-guide.md index f263e02e..d673ccaf 100644 --- a/docs/api/gb-programming-guide.md +++ b/docs/api/gb-programming-guide.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Game Boy programming guide diff --git a/docs/api/getting-started.md b/docs/api/getting-started.md index f61ad078..2e292112 100644 --- a/docs/api/getting-started.md +++ b/docs/api/getting-started.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Getting started @@ -21,6 +21,12 @@ Compile it using the following commandline: java -jar millfork.jar hello_world.mfk -o hello_world -t c64 ``` +or if you're using a Windows native build: + +``` +millfork hello_world.mfk -o hello_world -t c64 +``` + Run the output executable (here using the VICE emulator): ``` @@ -31,20 +37,7 @@ 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; -`crt` for Commodore cartridges; -`xex` for Atari computers; -`a2` for Apple; -`dsk` for PC-88; -`tap` for ZX Spectrum; -`rom` for MSX cartridges; -`com` for CP/M; -`nes` for Famicom; -`bin` for Atari 2600; -`inf` for BBC file metadata; -`asm` for assembly output; -`lbl`, `nl`, `fns`, or `sym` for label file +* `-o FILENAME` – specifies the base name for your output file, an appropriate file extension will be appended. * `-t PLATFORM` – specifies the target platform. Each platform is defined in an `.ini` file in the include directory. diff --git a/docs/api/lunix-programming-guide.md b/docs/api/lunix-programming-guide.md index 3d5537e2..2f18c16a 100644 --- a/docs/api/lunix-programming-guide.md +++ b/docs/api/lunix-programming-guide.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) ### A note about LUnix diff --git a/docs/api/rom-vs-ram.md b/docs/api/rom-vs-ram.md index 1a23cd6f..8857476a 100644 --- a/docs/api/rom-vs-ram.md +++ b/docs/api/rom-vs-ram.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) ### ROM vs RAM targets diff --git a/docs/api/target-platforms.md b/docs/api/target-platforms.md index a8e2a62b..1fdff3f6 100644 --- a/docs/api/target-platforms.md +++ b/docs/api/target-platforms.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Target platforms diff --git a/docs/index.md b/docs/index.md index b7628a76..818a1f53 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,70 +1,35 @@ -# Documentation +![](./logo_transparent.png) - **★ WORK IN PROGRESS ★** +**Millfork** is a middle-level programming language for 8-bit microprocessors. +Millfork focuses on performance, compactness, simplicity and readability. -## Compiler usage +* [**Documentation index**](README.md) -* [Getting started](api/getting-started.md) +* [**Getting started**](api/getting-started.md) -* [Command-line option reference](api/command-line.md) +* [**List of supported platforms**](api/target-platforms.md) -* [Target platform reference](api/target-platforms.md) +* [**Example programs**](https://github.com/KarolS/millfork/tree/master/examples) -* [Defining a custom platform](api/custom-platform.md) +* [**Millfork wiki**](https://github.com/KarolS/millfork/wiki) -## Language reference +* [**Benchmarks**](https://github.com/KarolS/millfork-benchmarks) -* [Preprocessor](lang/preprocessor.md) +* [**FAQ**](various/faq.md) -* [Syntax](lang/syntax.md) +* [**Downloads**](https://github.com/KarolS/millfork/releases/) -* [Types](lang/types.md) +* [**Source code**](https://github.com/KarolS/millfork) -* [Literals](lang/literals.md) +#### Contact -* [List of text encodings and escape sequences](lang/text.md) +Send issues, questions, feature requests and patches to https://github.com/KarolS/millfork/issues/ -* [Operators reference](lang/operators.md) +#### License -* [Functions](lang/functions.md) +Millfork is © by Karol Stasiak, and is released under the GNU Public License version 3. -* [Inline 6502 assembly syntax](lang/assembly.md) +Millfork standard include files are © by Karol Stasiak, and are released under the zlib License. -* [Inline 8080/LR35902/Z80 assembly syntax](lang/assemblyz80.md) - -* [Important guidelines regarding reentrancy](lang/reentrancy.md) - -## Library reference - -* [`stdlib` module](stdlib/stdlib.md) - -* [`string` module](stdlib/string.md) - -* [`stdio` module](stdlib/stdio.md) - -* [Modules for reading input devices](stdlib/input.md) - -* [Other cross-platform modules (`keyboard`, `err`, `random`)](stdlib/other.md) - -* [Definitions available on only some platforms](stdlib/frequent.md) - -* [C64-only modules](stdlib/c64.md) - -* [`cbm_file` module](stdlib/cbm_file.md) - -* [NES-only modules](stdlib/nes.md) - -* [Game Boy–only modules](stdlib/gb.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) - -* [Reference for labels in generated assembly code](abi/generated-labels.md) +This means you are allowed to develop Millfork programs, both free and proprietary, open- and closed-source, without any extra obligations or requirements. diff --git a/docs/lang/assembly.md b/docs/lang/assembly.md index 7c057727..37bf63b3 100644 --- a/docs/lang/assembly.md +++ b/docs/lang/assembly.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Using 6502 assembly within Millfork programs diff --git a/docs/lang/assemblyz80.md b/docs/lang/assemblyz80.md index d6ace425..86aa43f5 100644 --- a/docs/lang/assemblyz80.md +++ b/docs/lang/assemblyz80.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Using 8080/LR35902/Z80 assembly within Millfork programs diff --git a/docs/lang/functions.md b/docs/lang/functions.md index 1aadc3b0..e8229130 100644 --- a/docs/lang/functions.md +++ b/docs/lang/functions.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Function definitions diff --git a/docs/lang/interfacing.md b/docs/lang/interfacing.md index a26fe24b..e408ae17 100644 --- a/docs/lang/interfacing.md +++ b/docs/lang/interfacing.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Interfacing with external code diff --git a/docs/lang/literals.md b/docs/lang/literals.md index 11e55edd..8269f1a1 100644 --- a/docs/lang/literals.md +++ b/docs/lang/literals.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Literals and initializers diff --git a/docs/lang/operators.md b/docs/lang/operators.md index b915ebad..cb2c0abb 100644 --- a/docs/lang/operators.md +++ b/docs/lang/operators.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Operators diff --git a/docs/lang/preprocessor.md b/docs/lang/preprocessor.md index 8e334640..e0e5d266 100644 --- a/docs/lang/preprocessor.md +++ b/docs/lang/preprocessor.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Preprocessor diff --git a/docs/lang/reentrancy.md b/docs/lang/reentrancy.md index 980f2323..d0b272fd 100644 --- a/docs/lang/reentrancy.md +++ b/docs/lang/reentrancy.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Reentrancy diff --git a/docs/lang/syntax.md b/docs/lang/syntax.md index 3794220e..c453f29a 100644 --- a/docs/lang/syntax.md +++ b/docs/lang/syntax.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Syntax diff --git a/docs/lang/text.md b/docs/lang/text.md index d97b14a4..cba362b9 100644 --- a/docs/lang/text.md +++ b/docs/lang/text.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Text encodings ans escape sequences diff --git a/docs/lang/types.md b/docs/lang/types.md index 4b839417..1210e86a 100644 --- a/docs/lang/types.md +++ b/docs/lang/types.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Types diff --git a/docs/lang/x86disclaimer.md b/docs/lang/x86disclaimer.md index e724787a..05f0d3d8 100644 --- a/docs/lang/x86disclaimer.md +++ b/docs/lang/x86disclaimer.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # 8086 support disclaimer diff --git a/docs/logo_transparent.png b/docs/logo_transparent.png new file mode 100644 index 0000000000000000000000000000000000000000..6f95def31cf339be2269d5b5711eda7c53f896a9 GIT binary patch literal 690 zcmeAS@N?(olHy`uVBq!ia0y~yU`ztCGdb9RB*Pm`ULeVq|H(?D8gCb z5n0T@z;_6Q8AUa`8i0cAC7!;n?2i~l8N>}|E|QwTz`$hh>EaktaqI2fz@WnlA`XEC zyM(VV?!NkUhuEKKg)NnSpRKD0kNekuHeuHHUfrMm;`Q+^i3CNk!_&Fv3SK|oWBpdL@GH-%d6ur{ zZ-mWioSX4gvhwe*YhQ2u{@!m__x^LLE6)Z)MWFi|HkSf57$??s?Rzis(pE{_(ylTle|>Q_pV)dleX9!Z-UX6soO% z?3r0!x9IyOV6apqLELhB>6hK5TTADE$onn0{@a;dFTP9v{nsa7{paHP`L(sT`z07a zPGG3J`ql1H6mdKI;Vst0M7Ug^Z)<= literal 0 HcmV?d00001 diff --git a/docs/stdlib/c64.md b/docs/stdlib/c64.md index 2772fffb..b13ab5da 100644 --- a/docs/stdlib/c64.md +++ b/docs/stdlib/c64.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Commodore 64-oriented modules diff --git a/docs/stdlib/cbm_file.md b/docs/stdlib/cbm_file.md index bd772b4e..a3562905 100644 --- a/docs/stdlib/cbm_file.md +++ b/docs/stdlib/cbm_file.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) ## cbm_file diff --git a/docs/stdlib/frequent.md b/docs/stdlib/frequent.md index 851c7ceb..bd97d19d 100644 --- a/docs/stdlib/frequent.md +++ b/docs/stdlib/frequent.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) Definitions on the following list are frequently provided by the default automatically-imported modules. diff --git a/docs/stdlib/gb.md b/docs/stdlib/gb.md index f6e97ee7..7320e541 100644 --- a/docs/stdlib/gb.md +++ b/docs/stdlib/gb.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # Game Boy–oriented modules diff --git a/docs/stdlib/input.md b/docs/stdlib/input.md index 436e2f70..5f3c51c3 100644 --- a/docs/stdlib/input.md +++ b/docs/stdlib/input.md @@ -1,10 +1,12 @@ -[< back to index](../index.md) +[< back to index](../README.md) ## joy The module contains global variables representing the state of the one-button joystick. If the program is not using any joystick driver, the state of these variables is undefined. +To actually use this module, an appropriate joystick module must be used, such as `c64_joy`, `nes_joy` or `gb_joy`. + #### `sbyte input_dx` Horizontal joystick movement. 1 if right, -1 if left, 0 if neither. @@ -36,6 +38,8 @@ The `mouse` module automatically imports the `x_coord` module. The module contains global variables representing the state of the mouse. If the program is not using any mouse driver, the state of these variables is undefined. +To actually use this module, an appropriate mouse module must be used, such as `c1531`. + #### `x_coord mouse_x` Mouse X position. diff --git a/docs/stdlib/nes.md b/docs/stdlib/nes.md index 15a26d92..8eabaef1 100644 --- a/docs/stdlib/nes.md +++ b/docs/stdlib/nes.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) # NES/Famicom-oriented modules diff --git a/docs/stdlib/other.md b/docs/stdlib/other.md index 4513ba16..478cd8e8 100644 --- a/docs/stdlib/other.md +++ b/docs/stdlib/other.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) ## keyboard diff --git a/docs/stdlib/stdio.md b/docs/stdlib/stdio.md index 0eedf2f5..ffb51c25 100644 --- a/docs/stdlib/stdio.md +++ b/docs/stdlib/stdio.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) ## stdio diff --git a/docs/stdlib/stdlib.md b/docs/stdlib/stdlib.md index 2ebf8269..bd5484c0 100644 --- a/docs/stdlib/stdlib.md +++ b/docs/stdlib/stdlib.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) ## stdlib diff --git a/docs/stdlib/string.md b/docs/stdlib/string.md index 07c9c957..d748ff79 100644 --- a/docs/stdlib/string.md +++ b/docs/stdlib/string.md @@ -1,4 +1,4 @@ -[< back to index](../index.md) +[< back to index](../README.md) ## string diff --git a/docs/faq.md b/docs/various/faq.md similarity index 93% rename from docs/faq.md rename to docs/various/faq.md index 3a5a0f59..7504e4c3 100644 --- a/docs/faq.md +++ b/docs/various/faq.md @@ -1,4 +1,4 @@ -[< back to index](index.md) +[< back to index](../README.md) # Frequently Asked Questions @@ -20,7 +20,7 @@ Large programs in Millfork have been developed for Commodore 64. Millfork was also tested (via emulators) to run trivial programs on other 8-bit Commodore computers, Atari 8-bit computers, Apple II, BBC Micro, ZX Spectrum 48k, NEC PC-88, MSX, CP/M, NES, Game Boy, Atari 2600 and MS-DOS. -Support for other devices using supported processors can be easily added, usually without even modifying the compiler. +Support for other devices using supported processors can be easily added, usually without modifying the compiler. ### What microprocessors are supported? @@ -68,11 +68,9 @@ Unfortunately not: * Floating point math support is absent. -* There are no complex datatypes yet. +* Pointer arithmetic is very limited. -* There are no arrays other than byte arrays. - -* There are no pointers other than byte pointers. +* Millfork preprocessor is less powerful than C preprocessor. * There is no support for linking with external libraries not written in Millfork. You either need to rewrite foreign assembly into Millfork assembly syntax, diff --git a/examples/README.md b/examples/README.md index 4f2f88fc..9fbe2aca 100644 --- a/examples/README.md +++ b/examples/README.md @@ -30,6 +30,8 @@ * [Galencia starfield](c64/galencia.mfk) – a port of the starfield effect from the game *Galencia* +* [Space Poker \[external link\]](https://github.com/KarolS/spacepoker) – a game made for the 2018 Reset C64 Craptastic 4KB Game Competition + ### Other examples * Multifile ([source code](c64/multifile.mfk), [platform definition](c64/multifile.ini)) – diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 00000000..c907079f --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,55 @@ +site_name: Millfork documentation +theme: readthedocs +nav: + - Home: index.md + - Index: README.md + - FAQ: various/faq.md + - User guide: + - Getting started: api/getting-started.md + - Command-line option reference: api/command-line.md + - Target platform reference: api/target-platforms.md + - Defining a custom platform: api/custom-platform.md + - Differences between ROM and RAM targets: api/rom-vs-ram.md + - Platform-specific guides: + - Apple 2: api/apple2-programming-guide.md + - Amstrad CPC: api/cpc-programming-guide.md + - Commodore 64: api/commodore-programming-guide.md + - C64 with LUnix: api/lunix-programming-guide.md + - BBC Micro: api/bbcmicro-programming-guide.md + - Game Boy: api/gb-programming-guide.md + - NES/Famicom: api/famicom-programming-guide.md + - Language reference: + - Preprocessor: lang/preprocessor.md + - Syntax: lang/syntax.md + - Types: lang/types.md + - Literals: lang/literals.md + - Text encodings: lang/text.md + - Operators: lang/operators.md + - Functions: lang/functions.md + - Inline 6502 assembly: lang/assembly.md + - Inline 8080/LR35902/Z80 assembly: lang/assemblyz80.md + - Reentrancy guidelines: lang/reentrancy.md + - Library reference: + - stdlib module: stdlib/stdlib.md + - string module: stdlib/string.md + - stdio module: stdlib/stdio.md + - keyboard, err, random: stdlib/other.md + - joy, mouse, x_coord: stdlib/input.md + - Platform-dependent modules: stdlib/frequent.md + - cbm_file module: stdlib/cbm_file.md + - C64-only modules: stdlib/c64.md + - NES-only modules: stdlib/nes.md + - Game Boy–only modules: stdlib/gb.md + - Implementation details: + - Calling convention: abi/calling-convention.md + - Generated labels: abi/generated-labels.md + - Inlining: abi/inlining.md + - Undefined behaviour: abi/undefined-behaviour.md + - Undocumented instruction support: abi/undocumented.md + - Variable storage: abi/variable-storage.md + - External links: + - Downloads: https://github.com/KarolS/millfork/releases/ + - Source code: https://github.com/KarolS/millfork + - Example programs: https://github.com/KarolS/millfork/tree/master/examples + - Millfork wiki: https://github.com/KarolS/millfork/wiki + - Benchmarks: https://github.com/KarolS/millfork-benchmarks