Kernal size optimizations

This commit is contained in:
FeralChild64 committed 2020-01-28 19:45:02 +01:00
1 parent 1b49724c50
commit dff590c979
7 files changed
+161 -72

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * KERNAL_0 #TAKE
// #LAYOUT# * * #IGNORE
// Kernal status codes are described in 'Commodore 64 Programmers Reference Guide', page 292
kernalstatus_reset:
lda #$00
beq kernalstatus_end // branch always
// The following two statuses are currently not implemented - and most likely not really needed
// kernalstatus_TIMEOUT_WRITE:
//
// lda IOSTATUS
// ora #K_STS_TIMEOUT_WRITE
// bne kernalstatus_end // branch always
// kernalstatus_TIMEOUT_READ:
//
// lda IOSTATUS
// ora #K_STS_TIMEOUT_READ
// bne kernalstatus_end // branch always
kernalstatus_EOI:
lda IOSTATUS
ora #K_STS_EOI
bne kernalstatus_end // branch always
kernalstatus_DEVICE_NOT_FOUND:
lda IOSTATUS
ora #K_STS_DEVICE_NOT_FOUND
// FALLTROUGH
kernalstatus_end:
sta IOSTATUS
rts