1
0
mirror of https://github.com/KarolS/millfork.git synced 2026-04-19 10:42:10 +00:00

Move readkey to a separate module

This commit is contained in:
Karol Stasiak
2019-06-26 15:51:09 +02:00
parent c9a65d5971
commit 32476f2a4e
15 changed files with 141 additions and 81 deletions
-20
View File
@@ -29,26 +29,6 @@ Moves the cursor to the next line.
Available for: all computer targets.
Uses ROM routines, so requires the appropriate ROM to be enabled if applicable.
#### `byte readkey()`
Waits for and reads a single keypress.
The returning values may vary between platforms:
* letters may be uppercase or lowercase
* modifier keys may be applied or ignored
Available for:
Commodore 64 (requires KERNAL),
Commodore 16 or Plus/4 (requires KERNAL),
Commodore 128 (requires KERNAL),
VIC 20 (requires KERNAL),
Atari,
Amstrad CPC,
ZX Spectrum,
NEC PC-88.
#### `pointer readline()`
Reads a line from the console and returns a pointer to a null-terminated string.
+29
View File
@@ -1,5 +1,34 @@
[< back to index](../index.md)
## keyboard
The `keyboard` module provides support for reading keypresses from the keyboard.
Not supported on all targets.
#### `byte readkey()`
Waits for and reads a single keypress.
The returning values may vary between platforms:
* letters may be uppercase or lowercase
* modifier keys may be applied or ignored
Available for:
Commodore 64 (requires KERNAL),
Commodore 16 or Plus/4 (requires KERNAL),
Commodore 128 (requires KERNAL),
VIC 20 (requires KERNAL),
Atari,
Amstrad CPC,
ZX Spectrum,
NEC PC-88.
#### `const byte KEY_ENTER`
Key code for the Enter/Return key. Usually 13, but not always.
## err
#### `enum error_number`