implement $EA7E entry point and fix $EA31 entry point. Issue #20
This commit is contained in:
1 parent
1d850ad7c3
commit
ccf4dbe5da
5 files changed
+24
-9
No files matched your search
@@ -0,0 +1,7 @@
|
||||
default_irq_handler:
|
||||
|
||||
jsr blink_cursor
|
||||
jsr scan_keyboard
|
||||
|
||||
;; Acknowledge CIA interrupt and return
|
||||
jmp clear_cia1_interrupt_flag_and_return_from_interrupt:
|
||||
@@ -0,0 +1,11 @@
|
||||
;; https://csdb.dk/forums/index.php?roomid=11&topicid=5776
|
||||
;; Clear the CIA1 interrupt flag, and then fall through to
|
||||
;; the return from interrupt routine
|
||||
|
||||
clear_cia1_interrupt_flag_and_return_from_interrupt:
|
||||
|
||||
;; We have free choice of LDA, LDX or LDY to achieve this goal
|
||||
;; in 3 bytes and minimum cycles. Thus we randomly choose LDY.
|
||||
LDY $DC0D
|
||||
|
||||
;; FALL THROUGH to $EA81
|
||||
@@ -15,6 +15,11 @@ ioinit:
|
||||
sta $D020
|
||||
sta $D021
|
||||
|
||||
;; Turn off sprites
|
||||
;; (observed hanging around after running programs and resetting)
|
||||
lda #$00
|
||||
sta $D015
|
||||
|
||||
;; Enable CIA1 IRQ and ~50Hz timer
|
||||
;; (https://csdb.dk/forums/?roomid=11&topicid=69037)
|
||||
lda #$7f
|
||||
|
||||
@@ -15,18 +15,9 @@ irq_handler:
|
||||
tya
|
||||
pha
|
||||
|
||||
;; Acknowledge CIA interrupt
|
||||
lda $dc0d
|
||||
|
||||
;; Call interrupt routine
|
||||
;; (but only if initialised)
|
||||
lda $0314
|
||||
ora $0315
|
||||
beq default_irq_handler
|
||||
jmp ($0314)
|
||||
default_irq_handler:
|
||||
|
||||
jsr blink_cursor
|
||||
jsr scan_keyboard
|
||||
|
||||
jmp return_from_interrupt
|
||||
@@ -119,6 +119,7 @@ int main(int argc,char **argv)
|
||||
if (sscanf(source_files[i].file,"%x.%[^.]",&addr,funcname)==2) {
|
||||
// Function must appear at specific address
|
||||
source_files[i].address=addr;
|
||||
printf("function '%s' should be placed at $%04X\n",funcname,addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user