mirror of
https://github.com/KarolS/millfork.git
synced 2025-01-26 20:33:02 +00:00
Documentation improvements
This commit is contained in:
parent
3d056a7eee
commit
608958c1ed
@ -46,6 +46,8 @@ where `11111` is a sequential number and `xx` is the type:
|
||||
|
||||
* `to` – end of a `for-to` loop
|
||||
|
||||
* `ur` – a copy due to loop unrolling
|
||||
|
||||
* `wh` – beginning of a `while` statement
|
||||
|
||||
|
||||
|
@ -31,7 +31,7 @@ x64 hello_world.prg
|
||||
|
||||
The following options are crucial when compiling your sources:
|
||||
|
||||
* `-o FILENAME` – specifies the base name for your output file, an appropriate file extension will be appended (`prg` for Commodore, `xex` for Atari, `asm` for assembly output, `lbl` for label file)
|
||||
* `-o FILENAME` – specifies the base name for your output file, an appropriate file extension will be appended (`prg` for Commodore, `xex` for Atari, `a2` for Apple, `asm` for assembly output, `lbl` for label file)
|
||||
|
||||
* `-I DIR;DIR;DIR;...` – specifies the paths to directories with modules to include.
|
||||
|
||||
@ -41,7 +41,7 @@ You may be also interested in the following:
|
||||
|
||||
* `-O`, `-O2`, `-O3` – enable optimization (various levels)
|
||||
|
||||
* `--detailed-flow` – use more resource-consuming but more precise flow analysis engine for better optimization
|
||||
* `--inline` – automatically inline functions for better optimization
|
||||
|
||||
* `-s` – additionally generate assembly output
|
||||
|
||||
|
@ -34,8 +34,8 @@ Cartridge targets are not yet available.
|
||||
|
||||
### A note about Apple II
|
||||
|
||||
Apple II variants other than II+/IIe/Enhanced IIe (which means the original II, IIc and IIc+)
|
||||
and later compatible computers (Apple III and IIgs) are untested.
|
||||
Apple II variants other than II+/IIe/Enhanced IIe are untested;
|
||||
this includes the original II, IIc and IIc+, but also later compatible computers (Apple III and IIgs).
|
||||
They may or may not work.
|
||||
|
||||
The compiler output is a raw machine code file, which then has to be put on a disk.
|
||||
|
@ -15,11 +15,13 @@ Currently, `RMBx`/`SMBx`/`BBRx`/`BBSx` are not supported yet.
|
||||
|
||||
Undocumented instructions are supported using various opcodes
|
||||
|
||||
Labels have to be followed by a colon and they can optionally be on a separate line:
|
||||
Labels have to be followed by a colon and they can optionally be on a separate line.
|
||||
Indentation is not important:
|
||||
|
||||
first: INC x
|
||||
second:
|
||||
INC y
|
||||
INC z
|
||||
|
||||
|
||||
Label names have to start with a letter and can contain digits, underscores and letters.
|
||||
|
@ -1 +1,42 @@
|
||||
# Literals and initializers
|
||||
|
||||
## Numeric literals
|
||||
|
||||
Decimal: `1`, `10`
|
||||
|
||||
Binary: `%0101`, `0b101001`
|
||||
|
||||
Hexadecimal: `$D323`, `0x2a2`
|
||||
|
||||
## String literals
|
||||
|
||||
String literals are surrounded with double quotes and followed by the name of the encoding:
|
||||
|
||||
"this is a string" ascii
|
||||
|
||||
Characters between the quotes are interpreted literally,
|
||||
there are no ways to escape special characters or quotes.
|
||||
|
||||
Currently available encodings:
|
||||
|
||||
* `ascii` – standard ASCII
|
||||
|
||||
* `pet` or `petscii` – PETSCII (ASCII-like character set used by Commodore machines)
|
||||
|
||||
* `scr` – Commodore screencodes
|
||||
|
||||
When programming for Commodore,
|
||||
use `pet` for strings you're printing using standard I/O routines
|
||||
and `scr` for strings you're copying to screen memory directly.
|
||||
|
||||
|
||||
## Array initialisers
|
||||
|
||||
An array is initialized with either a string literal,
|
||||
or a list of byte literals and strings, surrounded by brackets:
|
||||
|
||||
array a = [1, 2]
|
||||
array b = "----" scr
|
||||
array c = ["hello world!" ascii, 13]
|
||||
|
||||
Trailing commas (`[1, 2,]`) are not allowed.
|
Loading…
x
Reference in New Issue
Block a user