2017-12-06 23:23:30 +00:00
|
|
|
// Routines from C64 BASIC ROM
|
|
|
|
|
2018-07-12 16:30:35 +00:00
|
|
|
#if not(CBM_64)
|
|
|
|
#warn c64_basic module should be only used on C64-compatible targets
|
|
|
|
#endif
|
|
|
|
|
2017-12-06 23:23:30 +00:00
|
|
|
import c64_kernal
|
2018-12-19 18:01:53 +00:00
|
|
|
import err
|
2017-12-06 23:23:30 +00:00
|
|
|
|
|
|
|
// print a 16-bit number on the standard output
|
2018-12-19 18:01:53 +00:00
|
|
|
asm void putword_basic(word xa) @$BDCD extern
|
|
|
|
|
2018-12-19 21:26:10 +00:00
|
|
|
alias putword = putword_basic!
|
2018-12-19 18:01:53 +00:00
|
|
|
|
|
|
|
asm void __readline_basic() @$A560 extern
|
|
|
|
|
|
|
|
pointer readline_basic() {
|
|
|
|
__readline_basic()
|
|
|
|
return readline_out
|
|
|
|
}
|
|
|
|
|
|
|
|
alias readline = readline_basic!
|
|
|
|
|
2018-01-20 21:03:56 +00:00
|
|
|
const pointer readline_out = $200
|
|
|
|
|
2018-12-19 18:01:53 +00:00
|
|
|
inline word readword_basic() {
|
|
|
|
return strz2word(readline_basic())
|
2018-01-20 21:03:56 +00:00
|
|
|
}
|
2018-12-19 18:01:53 +00:00
|
|
|
|
|
|
|
alias readword = readword_basic!
|