2017-12-06 23:23:30 +00:00
|
|
|
// Routines from Commodore PET KERNAL ROM
|
|
|
|
|
2018-07-12 16:30:35 +00:00
|
|
|
#if not(CBM_PET)
|
|
|
|
#warn pet_kernal module should be only used on PET 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 putchar(byte register(a) char) @$FFD2 extern
|
2018-12-30 17:54:45 +00:00
|
|
|
|
|
|
|
inline void new_line() {
|
|
|
|
putchar(13)
|
|
|
|
}
|
2020-03-31 15:59:50 +00:00
|
|
|
|
|
|
|
inline asm set_zero is_pet2000() {
|
|
|
|
? LDA #$CA
|
|
|
|
CMP $FFFB
|
|
|
|
? RTS
|
|
|
|
}
|
|
|
|
|
|
|
|
inline asm set_zero is_pet3000() {
|
|
|
|
? LDA #$FC
|
|
|
|
CMP $FFFB
|
|
|
|
? RTS
|
|
|
|
}
|
|
|
|
|
|
|
|
inline asm set_zero is_pet4000() {
|
|
|
|
? LDA #$FD
|
|
|
|
CMP $FFFB
|
|
|
|
? RTS
|
|
|
|
}
|