From 7bf9616fcba2260b76ec230f3d0faa5d9c26abf0 Mon Sep 17 00:00:00 2001 From: Karol Stasiak Date: Mon, 24 Dec 2018 01:32:17 +0100 Subject: [PATCH] Fix/improve documentation --- docs/api/command-line.md | 6 +++--- docs/api/getting-started.md | 8 +++----- docs/lang/literals.md | 3 +-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/docs/api/command-line.md b/docs/api/command-line.md index b29cd2b8..7975a78b 100644 --- a/docs/api/command-line.md +++ b/docs/api/command-line.md @@ -47,9 +47,9 @@ Choose syntax for assembly output on 8080-like targets. * `--syntax=intel`, `--syntax=zilog` – sets both previous options at once -* `-fline-numbers`, `-fno-line-numbers` – Whether should show source line numbers in assembly output. +* `-fline-numbers`, `-fno-line-numbers` – Whether should show source line numbers in assembly output. Slightly slows down the compilation. Default: false. -* `-fline-numbers`, `-fno-line-numbers` – Whether should show the original source in assembly output. Implies `-fline-numbers` +* `-fsource-in-asm`, `-fno-source-in-asm` – Whether should show the original source in assembly output. Implies `-fline-numbers`. Default: false. ## Verbosity options @@ -140,7 +140,7 @@ Use a software stack for stack variables. * `-O9` – Optimize code using superoptimizer (experimental). Computationally expensive, decent results. -* `-finline`, `-fno-inline` – Whether should inline functions automatically (experimental). +* `-finline`, `-fno-inline` – Whether should inline functions automatically. See the [documentation about inlining](../abi/inlining.md). Computationally easy, can give decent gains. `.ini` equivalent: `inline`. diff --git a/docs/api/getting-started.md b/docs/api/getting-started.md index 44d8d6d8..f01fcd22 100644 --- a/docs/api/getting-started.md +++ b/docs/api/getting-started.md @@ -9,15 +9,13 @@ Save the following as `hello_world.mfk`: ``` import stdio -array hello_world = "hello world" petscii - void main(){ - putstr(hello_world, hello_world.length) + putstrz("hello world"z) while(true){} } ``` -Compile is using the following commandline: +Compile it using the following commandline: ``` java -jar millfork.jar hello_world.mfk -o hello_world -t c64 -I path_to_millfork\include @@ -33,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, `a2` for Apple, `asm` for assembly output, `lbl` for label file, `inf` for BBC file metadata) +* `-o FILENAME` – specifies the base name for your output file, an appropriate file extension will be appended (`prg` for Commodore, `xex` for Atari computers, `a2` for Apple, `asm` for assembly output, `lbl` for label file, `inf` for BBC file metadata, `dsk` for PC-88, `tap` for ZX Spectrum, `nes` for Famicom, `bin` for Atari 2600) * `-I DIR;DIR;DIR;...` – specifies the paths to directories with modules to include. diff --git a/docs/lang/literals.md b/docs/lang/literals.md index c1af814f..359afecc 100644 --- a/docs/lang/literals.md +++ b/docs/lang/literals.md @@ -40,7 +40,6 @@ Most characters between the quotes are interpreted literally. To allow characters that cannot be inserted normally, each encoding may define escape sequences. Every encoding is guaranteed to support at least -`{n}` for new line, `{q}` for double quote and `{apos}` for single quote/apostrophe. @@ -53,7 +52,7 @@ If the characters in the literal cannot be encoded in particular encoding, an er However, if the command-line option `-flenient-encoding` is used, then literals using `default` and `scr` encodings replace unsupported characters with supported ones, skip unsupported escape sequences, and a warning is issued. -For example, if `-flenient-encoding` is enabled, then a literal `"£¥↑ž©ß{lbrace}"` is equivalent to: +For example, if `-flenient-encoding` is enabled, then a literal `"£¥↑ž©ß"` is equivalent to: * `"£Y↑z(C)ss"` if the default encoding is `pet`