Skip to content

Commit

Permalink
Document auto echo flag
Browse files Browse the repository at this point in the history
  • Loading branch information
TollyH committed May 29, 2024
1 parent 20e7155 commit c49f412
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Documentation/ReferenceManual/ReferenceManual.md
Original file line number Diff line number Diff line change
Expand Up @@ -539,14 +539,15 @@ Currently, the **lowest 5** bits of the 64-bit value have a special use — the
The 5 bits currently in use are:

```text
0b00...00000OSFCZ
0b00...0000AOSFCZ
... = 52 omitted bits
Z = Zero flag
C = Carry flag
F = File end flag
S = Sign flag
O = Overflow flag
A = Auto Echo flag
```

Each bit of this number can be considered as a `true` (`1`) or `false` (`0`) value as to whether the flag is "set" or not.
Expand Down Expand Up @@ -2924,6 +2925,8 @@ Be aware that if the user types a character that requires multiple bytes to repr

Note that the user does not need to press enter after inputting a character, execution will resume immediately after a single character is typed. If you wish to wait for the user to press enter, compare the inputted character to the newline character. The example program `input.ext.asm` contains a subroutine which does this. The user pressing the enter key will always give a single `10`/`0xA` newline byte, regardless of platform.

By default, `RCC` will not show the character typed by the user on the console. To change this, the `TERM_AEE` instruction can be used. This instruction sets the *Auto Echo flag* in the `rsf` register, which instructs `RCC` to automatically output the inputted byte. Alternatively, you can use the `WCC` instruction immediately after using `RCC` to mimic this behaviour by passing the same register to `WCC` as was given to `RCC`. You can unset the Auto Echo flag with the `TERM_AED` instruction to restore the default behaviour.

## File Handling

As well as interfacing with the console, AssEmbly also has native support for handling files.
Expand Down

0 comments on commit c49f412

Please sign in to comment.