1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-12-26 12:29:26 +00:00
millfork/examples/crossplatform/echo.mfk

25 lines
454 B
Plaintext
Raw Normal View History

2018-12-19 21:32:55 +00:00
#if CBM_64
import c64_basic
#elseif CBM_264
import c264_basic
#elseif ZX_SPECTRUM || NEC_PC_88
2018-12-19 21:32:55 +00:00
// no imports needed
#else
#error Unsupported platform
#endif
import stdio
2018-12-19 21:32:55 +00:00
void main() {
pointer line
while true {
line = readline()
// empty line is read as a single space on C64
if line[0] == 32 && line[1] == 0 { return }
if line[0] == 0 { return }
putstrz(line)
new_line()
}
}