mirror of
https://github.com/KarolS/millfork.git
synced 2024-12-29 02:31:45 +00:00
NEC PC-88: readline
This commit is contained in:
parent
e90483f381
commit
62575263c2
@ -23,8 +23,9 @@ The string is valid only until next read from the console.
|
||||
|
||||
Available for:
|
||||
ZX Spectrum,
|
||||
NEC PC-88,
|
||||
Commodore 64 with `c64_basic` module,
|
||||
Commodore 16 or Plus/4 with `c264_basic`.
|
||||
Commodore 16 or Plus/4 with `c264_basic` module.
|
||||
|
||||
#### `word readword()`
|
||||
|
||||
@ -32,8 +33,9 @@ Reads a 16-bit unsigned integer from the console.
|
||||
|
||||
Available for:
|
||||
ZX Spectrum,
|
||||
NEC PC-88,
|
||||
Commodore 64 with `c64_basic` module,
|
||||
Commodore 16 or Plus/4 with `c264_basic`.
|
||||
Commodore 16 or Plus/4 with `c264_basic` module.
|
||||
|
||||
#### `void bell()`
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
* [Echo](crossplatform/echo.mfk) (C64/C16/ZX Spectrum)– simple text input and output
|
||||
|
||||
* [Calculator](crossplatform/calculator.mfk) (C64/C16/ZX Spectrum) – simple numeric input and output
|
||||
* [Calculator](crossplatform/calculator.mfk) (C64/C16/ZX Spectrum/PC-88) – simple numeric input and output
|
||||
|
||||
* [Bell](crossplatform/bell.mfk) (Apple II/ZX Spectrum) – a program that goes \*ding!\*
|
||||
|
||||
|
@ -4,7 +4,7 @@ import stdio
|
||||
import c64_basic
|
||||
#elseif CBM_264
|
||||
import c264_basic
|
||||
#elseif ZX_SPECTRUM
|
||||
#elseif ZX_SPECTRUM || NEC_PC_88
|
||||
// no imports needed
|
||||
#else
|
||||
#error Unsupported platform
|
||||
|
@ -3,7 +3,7 @@
|
||||
[compilation]
|
||||
arch=z80
|
||||
encoding=jisx
|
||||
modules=default_panic,stdlib,pc88
|
||||
modules=default_panic,stdlib,pc88,default_readword
|
||||
|
||||
[allocation]
|
||||
; TODO: find a more optimal start address
|
||||
|
@ -1,3 +1,4 @@
|
||||
#pragma zilog_syntax
|
||||
|
||||
#if not(NEC_PC_88)
|
||||
#warn pc88 module should be only used on PC-88 targets
|
||||
@ -9,3 +10,10 @@ inline void new_line() {
|
||||
putchar(13)
|
||||
putchar(10)
|
||||
}
|
||||
|
||||
asm pointer readline() {
|
||||
call $5f92
|
||||
// TODO: if carry set, then STOP was pressed; should we care?
|
||||
? inc hl
|
||||
? ret
|
||||
}
|
||||
|
@ -16,6 +16,13 @@ void putstr(pointer str, byte len) {
|
||||
index += 1
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if NEC_PC_88
|
||||
asm void putstrz(pointer hl) @$5550 extern
|
||||
#endif
|
||||
|
||||
#if not(ZX_SPECTRUM) && not(NEC_PC_88)
|
||||
void putstrz(pointer str) {
|
||||
byte index
|
||||
index = 0
|
||||
|
Loading…
Reference in New Issue
Block a user