1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-11-01 05:05:32 +00:00
millfork/include/c64_basic.mfk
Karol Stasiak 63ff28e94e Changes to macros and parameter list syntax:
* non-asm macros can now take `const` and `call` parameters
* register parameters to asm functions and macros can be given names if annotated explicitly
2020-03-30 19:23:48 +02:00

31 lines
591 B
Plaintext

// Routines from C64 BASIC ROM
#if not(CBM_64)
#warn c64_basic module should be only used on C64-compatible targets
#endif
import c64_kernal
import err
// print a 16-bit number on the standard output
asm void putword_basic(word register(xa) num) @$BDCD extern
alias putword = putword_basic!
asm void __readline_basic() @$A560 extern
pointer readline_basic() {
__readline_basic()
return readline_out
}
alias readline = readline_basic!
const pointer readline_out = $200
inline word readword_basic() {
return strz2word(readline_basic())
}
alias readword = readword_basic!