1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-09-13 15:56:42 +00:00
millfork/include/c128_kernal.mfk
2019-06-26 13:00:55 +02:00

29 lines
541 B
Plaintext

// Routines from Commodore 128 KERNAL ROM
#if not(CBM_128)
#warn c128_kernal module should be only used on C128-compatible targets
#endif
// CHROUT. Write byte to default output. (If not screen, must call OPEN and CHKOUT beforehands.)
// Input: A = Byte to write.
asm void chrout(byte a) @$FFD2 extern
asm void putchar(byte a) {
JSR chrout
LDA #0
STA $F4
? RTS
}
noinline asm byte readkey() {
__read_key__start:
LDA $D0
BEQ __read_key__start
LDX #0
JMP $C244
}
inline void new_line() {
putchar(13)
}