Introduce simple character literal
This commit is contained in:
@@ -23,7 +23,9 @@ afterwards can be a bit cryptic as to where it originated.
|
||||
|
||||
- `[operation][number type]`, e.g. `divi` for divide (div) integer
|
||||
- `%[register]` for addressing registers
|
||||
- `$[value]` for using literals/immediate values
|
||||
- `$[value]` for using immediate (literal) integer values
|
||||
- `'a'` for using immediate character values (currently only supports non
|
||||
escaped characters)
|
||||
- `;` for end of statement (mandatory)
|
||||
- `[label]:` for labels
|
||||
- `#[text]` for comments: any text is ignored till a newline (`\n`) is found
|
||||
@@ -63,7 +65,8 @@ The following whitespace characters are used to separate symbols:
|
||||
- newline (`\n`)
|
||||
|
||||
The following characters are used as identifiers:
|
||||
- dollar (`$`) for immediate (literal) values
|
||||
- dollar (`$`) for immediate (literal) integer values
|
||||
- single quote (`'`) for immediate character values
|
||||
- percentage (`%`) for register identifiers
|
||||
- colon (`:`) for jump labels
|
||||
- semicolon (`;`) for statement termination
|
||||
@@ -86,7 +89,7 @@ second byte of location `$900`).
|
||||
All symbols are reserved keywords and can therefore NOT be used as labels.
|
||||
There is currently no strict checking, so be careful.
|
||||
|
||||
## Preprocessor
|
||||
### Preprocessor
|
||||
|
||||
All preprocessor directives are prefixed by a `#`. Ill formed preprocessor
|
||||
directives do not halt compilation, they are merely reported and then ignored.
|
||||
|
||||
Reference in New Issue
Block a user