2017-12-06 23:23:30 +00:00
|
|
|
// Routines from C16 and Plus/4 KERNAL ROM
|
|
|
|
|
2018-07-12 16:30:35 +00:00
|
|
|
#if not(CBM_VIC)
|
|
|
|
#warn vic20_kernal module should be only used on VIC-20 targets
|
|
|
|
#endif
|
|
|
|
|
2017-12-06 23:23:30 +00:00
|
|
|
// CHROUT. Write byte to default output. (If not screen, must call OPEN and CHKOUT beforehands.)
|
|
|
|
// Input: A = Byte to write.
|
2020-03-30 17:23:48 +00:00
|
|
|
asm void chrout(byte register(a) char) @$FFD2 extern
|
2019-06-26 10:59:55 +00:00
|
|
|
|
2020-03-30 17:23:48 +00:00
|
|
|
asm void putchar(byte register(a) char) {
|
2019-06-26 10:59:55 +00:00
|
|
|
JSR chrout
|
|
|
|
LDA #0
|
|
|
|
STA $D4
|
|
|
|
? RTS
|
|
|
|
}
|
|
|
|
|
2018-12-17 16:18:29 +00:00
|
|
|
inline void new_line() {
|
|
|
|
putchar(13)
|
|
|
|
}
|