mirror of
https://github.com/KarolS/millfork.git
synced 2026-04-25 19:17:54 +00:00
Add readkey for C64 & ZXS. Fix putchar('{q}') on C64.
This commit is contained in:
+27
-8
@@ -8,16 +8,34 @@ However, as they are not the part of the standard library, they might not be ava
|
||||
|
||||
Prints a single character.
|
||||
|
||||
Available for: all computer targets.
|
||||
Available for: all computer targets.
|
||||
Uses ROM routines, so requires the appropriate ROM to be enabled if applicable.
|
||||
|
||||
Note that this function obeys typical platform idiosyncrasies,
|
||||
for example on CBM targets the quote character will toggle the quotation mode.
|
||||
Note that this function may obey typical platform idiosyncrasies, for example:
|
||||
|
||||
* on CBM targets other than C64 the quote character toggles the quotation mode
|
||||
|
||||
* printing past the end of line might insert a blank line below the current one
|
||||
|
||||
* printing past the end of the screen might ask the user to confirm scrolling
|
||||
|
||||
The exact behaviour is platform-dependent.
|
||||
Future library versions will strive to eliminate those issues.
|
||||
|
||||
#### `void new_line()`
|
||||
|
||||
Moves the cursor to the next line.
|
||||
|
||||
Available for: all computer targets.
|
||||
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.
|
||||
|
||||
Available for:
|
||||
Commodore 64 (requires KERNAL),
|
||||
ZX Spectrum.
|
||||
|
||||
#### `pointer readline()`
|
||||
|
||||
@@ -28,8 +46,8 @@ Available for:
|
||||
ZX Spectrum,
|
||||
NEC PC-88,
|
||||
MSX,
|
||||
Commodore 64 with `c64_basic` module,
|
||||
Commodore 16 or Plus/4 with `c264_basic` module.
|
||||
Commodore 64 with `c64_basic` module (requires KERNAL and BASIC),
|
||||
Commodore 16 or Plus/4 with `c264_basic` module (requires KERNAL and BASIC).
|
||||
|
||||
#### `word readword()`
|
||||
|
||||
@@ -39,14 +57,15 @@ Available for:
|
||||
ZX Spectrum,
|
||||
NEC PC-88,
|
||||
MSX,
|
||||
Commodore 64 with `c64_basic` module,
|
||||
Commodore 16 or Plus/4 with `c264_basic` module.
|
||||
Commodore 64 with `c64_basic` module (requires KERNAL and BASIC),
|
||||
Commodore 16 or Plus/4 with `c264_basic` module (requires KERNAL and BASIC).
|
||||
|
||||
#### `void bell()`
|
||||
|
||||
Beeps.
|
||||
|
||||
Available for: Apple 2, ZX Spectrum.
|
||||
Uses ROM routines, so requires the appropriate ROM to be enabled if applicable.
|
||||
|
||||
#### `void set_bg_color(byte color)`
|
||||
|
||||
|
||||
@@ -4,14 +4,12 @@
|
||||
|
||||
The `stdio` module automatically imports the `string` and `err` modules.
|
||||
It requires an implementation of `void putchar(byte a)` and therefore works only on targets with console output.
|
||||
On targets with idiosyncratic behaviour of `putchar`, functions in this module inherit that behaviour.
|
||||
|
||||
#### `void putstr(pointer str, byte len)`
|
||||
|
||||
Prints a string of length `len` located at address `str`.
|
||||
|
||||
Note that both this function and `putstrz` obey typical platform idiosyncrasies,
|
||||
for example on CBM targets the quote character will toggle the quotation mode. This may be subject to change.
|
||||
|
||||
#### `void putstrz(pointer str)`
|
||||
|
||||
Prints a null-terminated string located at address `str`.
|
||||
|
||||
Reference in New Issue
Block a user