Fix typos/grammar

This commit is contained in:
Karol Stasiak 2020-12-01 14:26:47 +01:00
parent 7962a1d083
commit 4a529b5ddc
23 changed files with 49 additions and 49 deletions

View File

@ -6,7 +6,7 @@
* Preliminary support for Robotron Z1013.
* Allowed to define entry points other than the start of the segment for Atari, ZX Spectrum, CoCo, Z1013 and TRS-80. (#78)
* Allowed defining entry points other than the start of the segment for Atari, ZX Spectrum, CoCo, Z1013 and TRS-80. (#78)
* Allowed the `:` operator in const-pure functions.
@ -42,7 +42,7 @@
* Even more new Atari examples (thanks to @zbyti).
* Build process sligtly changed.
* Build process slightly changed.
## 0.3.22 (2020-09-15)
@ -528,7 +528,7 @@ can no longer be read before an explicit call to `init_rw_memory`, either add th
* Added enumeration types.
* Added preprocessor.
* Added the preprocessor.
* Added `for` loops over enum types and in-place lists
@ -550,7 +550,7 @@ can no longer be read before an explicit call to `init_rw_memory`, either add th
* Extra `z` at the name of the encoding means that the string is zero-terminated.
* **Potentially breaking change!** No longer allowed to define things with names that are keywords or builtins.
* **Potentially breaking change!** It's no longer allowed to define things with names that are keywords or builtins.
* **Potentially breaking change!** Curly braces in text literals are now used for escape sequences.

View File

@ -13,7 +13,7 @@ If you want to contribute:
* make a pull request, explaining what you implemented if needed.
By making pull request, you agree for your changes to be distributed in perpetuity
under the applicable license (GPL-3 for the compiler, zlib for the stdlib, CC0 for documentation)
under the applicable license (GPL-3 for the compiler, zlib for the stdlib, CC0 for the documentation)
or any other compatible license.
You retain copyright to your contributions, you do not have to assign the copyright to anybody.

View File

@ -29,7 +29,7 @@
* on 65816: callee will preserve the emulation flag
(setting the emulation flag correctly is the responsibility of the initialization code)
* on 65816 in native mode:
* on 65816 in the native mode:
* callee expects the M and X flag to be set and will leave them set
(8-bit accumulator and index registers by default)
@ -45,11 +45,11 @@
* if the function has one parameter of size two bytes, it is passed via the HL register pair
* if the function has one parameter of size three bytes,
its least significant two bytes are passed via the HL register pair
its least significant two bytes are passed via the HL register pair,
and the most significant byte is passed via the E register
* if the function has one parameter of size four bytes,
its least significant word is passed via the HL register pair
its least significant word is passed via the HL register pair,
and the most significant word is passed via the DE register pair
* otherwise, all parameters are passed via static locations
@ -61,11 +61,11 @@ and the most significant word is passed via the DE register pair
* two-byte return values are passed via the HL register pair
* in case of three-byte return values,
its least significant two bytes are passed via the HL register pair
its least significant two bytes are passed via the HL register pair,
and the most significant byte is passed via the E register
* in case of four-byte return values,
its least significant word is passed via the HL register pair
its least significant word is passed via the HL register pair,
and the most significant word is passed via the DE register pair
* otherwise, the return value is passed via a static location
@ -89,11 +89,11 @@ The DI register is not used.
* if the function has one parameter of size two bytes, it is passed via the BX register
* if the function has one parameter of size three bytes,
its least significant two bytes are passed via the BX register
its least significant two bytes are passed via the BX register,
and the most significant byte is passed via the DL register
* if the function has one parameter of size four bytes,
its least significant word is passed via the BX register
its least significant word is passed via the BX register,
and the most significant word is passed via the DX register
* otherwise, all parameters are passed via static locations
@ -105,11 +105,11 @@ and the most significant word is passed via the DX register
* two-byte return values are passed via the BX register
* in case of three-byte return values,
its least significant two bytes are passed via the BX register
its least significant two bytes are passed via the BX register,
and the most significant byte is passed via the DL register
* in case of four-byte return values,
its least significant word is passed via the BX register
its least significant word is passed via the BX register,
and the most significant word is passed via the DX register
* otherwise, the return value is passed via a static location

View File

@ -125,7 +125,7 @@ calls with non-constant arguments are subject to the regular rules.
* functions declared with the `noinline` keyword will never be inlined
* the remaining functions may be inlined only if the `-finline` command-line option is enabled
* the remaining functions may be inlined only if the `-finline` command-line option is enabled,
and the compiler decides the function is worth doing
## Automatic subroutine extraction

View File

@ -11,7 +11,7 @@ You can do it using [CiderPress](http://a2ciderpress.com/),
[AppleCommander](https://applecommander.github.io/),
or some other tool.
The file has to be loaded from $0C00. An example how to put such file onto a disk using AppleCommander:
The file has to be loaded from $0C00. An example how to put such a file onto a disk using AppleCommander:
java -jar AppleCommander-1.3.5.jar -p disk_image.dsk FILENAME B 0xc00 < compiler_output.a2

View File

@ -31,7 +31,7 @@ no extension for BBC micro program file,
Default: If compiling one file with `.mfk` extension, the same name as the input file. Otherwise, `a`.
* `-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`.
* `-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`.
* `-g` Generate also the label file. The label file contains labels with their addresses, with duplicates removed.
It can be loaded into the monitor of the emulator for debugging purposes.
@ -59,7 +59,7 @@ Those directories are searched for modules and platform definitions.
When searching for modules, the directory containing the file currently being compiled is also searched.
When searching for platform definitions, the current working directory is also searched.
If not given, the compiler will try to detect the default include directory.
If given, then the compiler will NOT try to detect the default include directory and you will have to add it to the list yourself.
If given, then the compiler will NOT try to detect the default include directory, and you will have to add it to the list yourself.
* `-i <dir>` Add a directory to the include directories.
Unlike `-I`, this does not replace the default include directory and allows using directories with semicolons in their names.

View File

@ -8,7 +8,7 @@ You can do it using [CPCDiskXP](http://www.cpcwiki.eu/index.php/CPCDiskXP),
[iDSK](http://www.cpcwiki.eu/index.php/IDSK),
or some other tool.
The file has to be loaded from $0400. An example how to put such file onto a disk using CPCDiskXP:
The file has to be loaded from $0400. An example how to put such a file onto a disk using CPCDiskXP:
CPCDiskXP -File FILENAME -AddAmsdosHeader 0400 -AddToNewDsk disk_image.dsk

View File

@ -36,7 +36,7 @@ The minimal Famicom program thus looks like this:
To use a mapper of your choice, create a new `.ini` file with the definitions you need.
The most important ones are `[output]format` and `[allocation]segments`.
Currently, its a bit inconvenient to create programs using mappers that change the bank containing the interrupt vectors.
Currently, it's a bit inconvenient to create programs using mappers that change the bank containing the interrupt vectors.
Therefore, it's recommended to stick to mappers that have a fixed bank at the end of the address space.
Mappers that should be fine: NROM (0), CNROM (1), UxROM(2), MMC2 (9), MMC3 (4), MMC4 (10), MMC6 (4).

View File

@ -33,6 +33,6 @@ Millfork is © by Karol Stasiak, and is released under the GNU Public License ve
Millfork standard include files are © by Karol Stasiak, and are released under the zlib License.
Millfork documentation is realeased under the [CC0 1.0 Universal (CC0 1.0) Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/).
Millfork documentation is released under the [CC0 1.0 Universal (CC0 1.0) Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/).
This means you are allowed to develop Millfork programs, both free and proprietary, open- and closed-source, without any extra obligations or requirements.

View File

@ -39,7 +39,7 @@ Currently, some extra 65CE02/65816 instructions 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
@ -70,7 +70,7 @@ but you need to be careful with using absolute vs immediate addressing:
}
Any assembly opcode can be prefixed with `?`, which allows the optimizer change it or elide it if needed.
Opcodes without that prefix will be always compiled as written.
Opcodes without that prefix will always be compiled as written.
The '!' prefix marks the statement as volatile, which means it will be a subject to certain, but not all optimizations,
in order to preserve its semantics.
@ -113,7 +113,7 @@ the return type can be any valid return type, like for Millfork functions.
If the size of the return type is one byte,
then the result is passed via the accumulator.
If the size of the return type is two bytes,
then the low byte of the result is passed via the accumulator
then the low byte of the result is passed via the accumulator,
and the high byte of the result is passed via the X register.
@ -220,7 +220,7 @@ it should abide to the following rules:
* explicitly use 16-bit immediate operands when appropriate; the assembler doesn't track flags and assumes 8-bit immediates by default (TODO: actually implement the 16-bit inline assembly correctly)
* use far jumps unless you're sure that the called function returns with an `RTS`
* use far jumps unless you are sure the called function returns with an `RTS`
* on 65CE02:

View File

@ -14,7 +14,7 @@ There are two ways to include raw assembly code in your Millfork programs:
Millfork inline assembly uses the same three-letter opcodes as most other 6809 assemblers.
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 a
@ -52,7 +52,7 @@ You can use `>` do signify the absolute addressing mode, but it is never necessa
This option exists only for compatibility with other assemblers.
Any assembly opcode can be prefixed with `?`, which allows the optimizer change it or elide it if needed.
Opcodes without that prefix will be always compiled as written.
Opcodes without that prefix will always be compiled as written.
The '!' prefix marks the statement as volatile, which means it will be a subject to certain, but not all optimizations,
in order to preserve its semantics.

View File

@ -32,7 +32,7 @@ It does not support instructions that are unavailable on the Z80 or other undocu
Not all ZX Spectrum Next instructions are supported. `JP (C)`, `BSLA` and similar instructions are not supported.
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:
// Zilog syntax
@ -75,7 +75,7 @@ but you need to be careful with using absolute vs immediate addressing:
}
Any assembly opcode can be prefixed with `?`, which allows the optimizer change it or elide it if needed.
Opcodes without that prefix will be always compiled as written.
Opcodes without that prefix will always be compiled as written.
The '!' prefix marks the statement as volatile, which means it will be a subject to certain, but not all optimizations,
in order to preserve its semantics.

View File

@ -78,7 +78,7 @@ Such functions should be marked as written in assembly and should have their par
* `<expression>` is an expression. It is equivalent to a function body of form `{ return <expression> }`.
The address of an non-macro function `f` is a constant `f.addr`.
The address of a non-macro function `f` is a constant `f.addr`.
Non-macro, non-interrupt functions which have max one parameter of size max 2 bytes
and return `void` or a value of size max 2 bytes,

View File

@ -63,7 +63,7 @@ The byte constant `nullchar` is defined to be equal to the string terminator in
and the byte constant `nullchar_scr` is defined to be equal to the string terminator in the `scr` encoding (`'{nullchar}'scr`).
You can override the values for `nullchar` and `nullchar_scr`
by defining preprocesor features `NULLCHAR` and `NULLCHAR_SCR` respectively.
by defining preprocessor features `NULLCHAR` and `NULLCHAR_SCR` respectively.
Warning: If you define UTF-16 to be you default or screen encoding, you will encounter several problems:

View File

@ -88,7 +88,7 @@ TODO
## Binary arithmetic operators
* `+`, `-`:
* `+`, `-`: addition and subtraction
`byte + byte`
`constant word + constant word`
`constant long + constant long`
@ -136,18 +136,18 @@ These operators work using the decimal arithmetic (packed BCD).
On Ricoh-based targets (e.g. Famicom) they require the zeropage register to have size at least 4
* `+'`, `-'`: decimal addition/subtraction
`$+`, `$-` (since Millfork 0.3.22)
`$+`, `$-`: (since Millfork 0.3.22)
`byte +' byte`
`constant word +' constant word`
`constant long +' constant long`
`word +' word` (zpreg)
* `*'`: decimal multiplication
`$*` (since Millfork 0.3.22)
`$*`: (since Millfork 0.3.22)
`constant *' constant`
* `<<'`, `>>'`: decimal multiplication/division by power of two
`$<<`, `$>>` (since Millfork 0.3.22)
`$<<`, `$>>`: (since Millfork 0.3.22)
`byte <<' constant byte`
## Comparison operators

View File

@ -63,7 +63,7 @@ Examples:
* `volatile` means that the variable is volatile.
The optimizer shouldn't remove or reorder accesses to volatile variables.
Volatile variables (unline non-volatile ones) will not be removed or inlined by the optimizer.
Volatile variables (unlike non-volatile ones) will not be removed or inlined by the optimizer.
Volatile variables cannot be declared as `register` or `stack`.
* `<storage>` can be only specified for local variables. It can be either `stack`, `static`, `register` or nothing.

View File

@ -31,11 +31,11 @@ Executes a CBM DOS command on the given drive.
#### void delete_file(byte device, pointer name)
Deletes given file in the given drive. (`S0:`)
Deletes the given file in the given drive. (`S0:`)
#### void rename_file(byte device, pointer old_name, pointer new_name)
Renames given file in the given drive. (`R0:`)
Renames the given file in the given drive. (`R0:`)
#### void copy_file(byte device, pointer old_name, pointer new_name)

View File

@ -85,7 +85,7 @@ Available only on 6502-based platforms.
#### byte atascii_to_atasciiscr(byte)
Converts a byte from ATASCII to a Atari screencode.
Converts a byte from ATASCII to an Atari screencode.
Control characters <$80 are converted to the graphical characters that share the ATASCII code.
Control characters ≥$80 are not supported.
@ -93,7 +93,7 @@ Available only on 6502-based platforms.
#### byte atasciiscr_to_atascii(byte)
Converts a byte from a Atari screencode to ATASCII.
Converts a byte from an Atari screencode to ATASCII.
Characters that share their ATASCII code with control characters are supported,
but they require to be escaped with $1B to be printed.
Reverse characters are interpreted as non-reverse characters.

View File

@ -47,6 +47,6 @@ or `word` if the screen is more that 256 pixels tall.
## null_mouse_default
This module set the default mouse to null mouse.
The null mouse has no button pressed and the cursos is fixed at coordinates (0,0).
The null mouse has no button pressed and the cursor is fixed at coordinates (0,0).
#### `void read_mouse()`

View File

@ -103,19 +103,19 @@ Provides an interface for reading joypads that is compatible with the [`joy` mod
#### `alias input_a = input_btn`
1 if A button pressed, 0 id not pressed.
1 if A button pressed, 0 if not pressed.
#### `byte input_b`
1 if B button pressed, 0 id not pressed.
1 if B button pressed, 0 if not pressed.
#### `byte input_select`
1 if Select button pressed, 0 id not pressed.
1 if Select button pressed, 0 if not pressed.
#### `byte input_start`
1 if Start button pressed, 0 id not pressed.
1 if Start button pressed, 0 if not pressed.
#### `void read_joy1()`

View File

@ -19,7 +19,7 @@ Raw addresses are acquired using the `.addr` suffix.
The numeric values of the pointer and of the raw address may differ.
* Operator precedence works differently.
Bitwise and bitshift operators have the same precedence as arithmetic operators,
Bitwise and bit-shifting operators have the same precedence as arithmetic operators,
and mixing different operators with the same precedence is usually forbidden.
This prevents most ambiguities in bit-twiddling code, but requires care when porting code from or to C.

View File

@ -10,7 +10,7 @@ mostly game developers, who have little use for advanced features of C, but don'
### What was the inspiration?
The main inspirations was Atalan, but also Quetzalcoatl, Batari BASIC and NESHLA.
Sadly, Atalan has been abandoned and the compiler has been left in a non-working state.
Sadly, Atalan has been abandoned, and the compiler has been left in a non-working state.
The goal of Millfork is to succeed where Atalan failed.
### What platforms are supported?

View File

@ -1,6 +1,6 @@
# Examples
The examples showcased here are designed to compile with a compiler built from newest sources.
The examples showcased here are designed to compile with a compiler built from the newest sources.
If you are using a release version of the compiler, consider browsing the older versions of the examples:
* [for version 0.3.22](https://github.com/KarolS/millfork/tree/v0.3.22/examples)
@ -21,7 +21,7 @@ If you are using a release version of the compiler, consider browsing the older
* [Fizzbuzz](crossplatform/fizzbuzz.mfk) (C64/C16/PET/VIC-20/PET/Atari/Apple II/BBC Micro/ZX Spectrum/PC-88/Armstrad CPC/MSX/X16) everyone's favourite programming task
* [Fizzbuzz 2](crossplatform/fizzbuzz2.mfk) (C64/C16/PET/VIC-20/PET/Atari/Apple II/BBC Micro/ZX Spectrum/PC-88/Armstrad CPC/MSX/CoCo) an alternative, more extensible implemententation of fizzbuzz
* [Fizzbuzz 2](crossplatform/fizzbuzz2.mfk) (C64/C16/PET/VIC-20/PET/Atari/Apple II/BBC Micro/ZX Spectrum/PC-88/Armstrad CPC/MSX/CoCo) an alternative, more extensible implementation of fizzbuzz
* [Fizzbuzz JP](crossplatform/fizzbuzz_jp.mfk) (PC-88/Japanese C64) Fizzbuzz, but in Japanese