2018-07-12 18:30:35 +02:00
|
|
|
|
|
|
|
#if not(ZX_SPECTRUM)
|
|
|
|
#warn stdio_zxspectrum module should be only used on ZX Spectrum-compatible targets
|
|
|
|
#endif
|
|
|
|
|
2018-08-03 13:23:37 +02:00
|
|
|
#pragma zilog_syntax
|
|
|
|
|
2018-07-12 18:30:35 +02:00
|
|
|
import stdio
|
|
|
|
|
|
|
|
void putstr(pointer str, byte len) {
|
|
|
|
asm {
|
2018-07-30 18:16:50 +02:00
|
|
|
? LD DE,(str)
|
2018-07-12 18:30:35 +02:00
|
|
|
? LD A,(len)
|
|
|
|
? LD B, 0
|
|
|
|
? LD C, A
|
|
|
|
CALL 8252
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void putstrz(pointer str) {
|
2018-09-28 22:39:52 +02:00
|
|
|
word length
|
|
|
|
length = strzlen(str)
|
2018-07-12 18:30:35 +02:00
|
|
|
asm {
|
2018-07-30 18:16:50 +02:00
|
|
|
? LD DE,(str)
|
|
|
|
? LD BC,(length)
|
2018-07-12 18:30:35 +02:00
|
|
|
CALL 8252
|
|
|
|
}
|
|
|
|
}
|