Skip to content

Commit

Permalink
Documentation overhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
KarolS committed Jul 15, 2019
1 parent f3dcfc7 commit 52c5a10
Show file tree
Hide file tree
Showing 47 changed files with 157 additions and 136 deletions.
13 changes: 1 addition & 12 deletions README.md
Expand Up @@ -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
18 changes: 15 additions & 3 deletions docs/README.md
@@ -1,7 +1,6 @@
# Documentation

**★ WORK IN PROGRESS ★**
# Documentation index

* [Home page](index.md)

## Compiler usage

Expand Down Expand Up @@ -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)

2 changes: 1 addition & 1 deletion docs/abi/calling-convention.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Millfork calling convention

Expand Down
2 changes: 1 addition & 1 deletion docs/abi/generated-labels.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Guide to generated label names

Expand Down
2 changes: 1 addition & 1 deletion docs/abi/inlining.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Macros and inlining

Expand Down
2 changes: 1 addition & 1 deletion docs/abi/undefined-behaviour.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Undefined behaviour

Expand Down
2 changes: 1 addition & 1 deletion docs/abi/undocumented.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Undocumented opcodes

Expand Down
2 changes: 1 addition & 1 deletion docs/abi/variable-storage.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Variable storage

Expand Down
2 changes: 1 addition & 1 deletion 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

Expand Down
2 changes: 1 addition & 1 deletion 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

Expand Down
21 changes: 12 additions & 9 deletions docs/api/command-line.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Command-line options

Expand All @@ -15,16 +15,19 @@
* `-o <file>` – 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`.

Expand Down
2 changes: 1 addition & 1 deletion 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

Expand Down
2 changes: 1 addition & 1 deletion 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

Expand Down
2 changes: 1 addition & 1 deletion docs/api/custom-platform.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

## Adding a custom platform

Expand Down
2 changes: 1 addition & 1 deletion docs/api/famicom-programming-guide.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Famicom/NES programming guide

Expand Down
2 changes: 1 addition & 1 deletion docs/api/gb-programming-guide.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Game Boy programming guide

Expand Down
23 changes: 8 additions & 15 deletions docs/api/getting-started.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Getting started

Expand All @@ -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):

```
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/lunix-programming-guide.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

### A note about LUnix

Expand Down
2 changes: 1 addition & 1 deletion docs/api/rom-vs-ram.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

### ROM vs RAM targets

Expand Down
2 changes: 1 addition & 1 deletion docs/api/target-platforms.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Target platforms

Expand Down
71 changes: 18 additions & 53 deletions 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.
2 changes: 1 addition & 1 deletion docs/lang/assembly.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Using 6502 assembly within Millfork programs

Expand Down
2 changes: 1 addition & 1 deletion 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

Expand Down
2 changes: 1 addition & 1 deletion docs/lang/functions.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Function definitions

Expand Down
2 changes: 1 addition & 1 deletion docs/lang/interfacing.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Interfacing with external code

Expand Down
2 changes: 1 addition & 1 deletion docs/lang/literals.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Literals and initializers

Expand Down
2 changes: 1 addition & 1 deletion docs/lang/operators.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Operators

Expand Down
2 changes: 1 addition & 1 deletion docs/lang/preprocessor.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Preprocessor

Expand Down
2 changes: 1 addition & 1 deletion docs/lang/reentrancy.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Reentrancy

Expand Down
2 changes: 1 addition & 1 deletion docs/lang/syntax.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Syntax

Expand Down
2 changes: 1 addition & 1 deletion docs/lang/text.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Text encodings ans escape sequences

Expand Down
2 changes: 1 addition & 1 deletion docs/lang/types.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Types

Expand Down
2 changes: 1 addition & 1 deletion docs/lang/x86disclaimer.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# 8086 support disclaimer

Expand Down
Binary file added docs/logo_transparent.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/stdlib/c64.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

# Commodore 64-oriented modules

Expand Down
2 changes: 1 addition & 1 deletion docs/stdlib/cbm_file.md
@@ -1,4 +1,4 @@
[< back to index](../index.md)
[< back to index](../README.md)

## cbm_file

Expand Down
2 changes: 1 addition & 1 deletion 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.

Expand Down

0 comments on commit 52c5a10

Please sign in to comment.