aliases for Kernal jump table entries

This commit is contained in:
FeralChild64 committed 2019-07-12 20:08:40 +02:00
1 parent ee6e7bc9d5
commit a846d74895
56 files changed
+120 -38

No files matched your search

+41
View File
@@ -168,6 +168,47 @@
.alias ILOAD $0330
.alias ISAVE $0331
;; Kernal jump table
.alias JCINT $FF81
.alias JIOINIT $FF84
.alias JRAMTAS $FF87
.alias JRESTOR $FF8A
.alias JVECTOR $FF8D
.alias JSETMSG $FF90
.alias JSECOND $FF93
.alias JTKSA $FF96
.alias JMEMTOP $FF99
.alias JMEMBOT $FF9C
.alias JSCNKEY $FF9F
.alias JSETTMO $FFA2
.alias JACPTR $FFA5
.alias JCIOUT $FFA8
.alias JUNTLK $FFAB
.alias JUNLSN $FFAE
.alias JLISTEN $FFB1
.alias JTALK $FFB4
.alias JREADST $FFB7
.alias JSETFLS $FFBA
.alias JSETNAM $FFBD
.alias JOPEN $FFC0
.alias JCLOSE $FFC3
.alias JCHKIN $FFC6
.alias JCHKOUT $FFC9
.alias JCLRCHN $FFCC
.alias JCHRIN $FFCF
.alias JCHROUT $FFD2
.alias JLOAD $FFD5
.alias JSAVE $FFD8
.alias JSETTIM $FFDB
.alias JRDTIM $FFDE
.alias JSTOP $FFE1
.alias JGETIN $FFE4
.alias JCLALL $FFE7
.alias JUDTIM $FFEA
.alias JSCREEN $FFED
.alias JPLOT $FFF0
.alias JIOBASE $FFF3
;; BASIC uses some extra bytes for memory access under ROMs located at $2A7 onwards
;; IRQs are disabled when doing such accesses, and a default NMI handler only increments
;; a counter, so that if an NMI occurs, it doesn't crash the machine, but can be captured.
+1 -1
View File
@@ -20,7 +20,7 @@ print_string_loop:
lda (temp_string_ptr),y
beq print_string_end
jsr $FFD2 ; KERNAL CHROUT
jsr JCHROUT
txa
tay
+1 -1
View File
@@ -64,7 +64,7 @@ startup_banner:
jsr print_integer
lda #$20
jsr $ffd2
jsr JCHROUT
;; Print the rest of the start up message
ldx #34
+5 -5
View File
@@ -7,9 +7,9 @@ basic_do_error:
;; Print ? at start
lda #$0d
jsr $ffd2
jsr JCHROUT
lda #$3f
jsr $ffd2
jsr JCHROUT
;; Print main part of error message
pla
@@ -18,7 +18,7 @@ basic_do_error:
;; Print ERROR at end
lda #$20
jsr $ffd2
jsr JCHROUT
ldx #33
jsr print_packed_message
@@ -27,9 +27,9 @@ basic_do_error:
;; XXX print line number if not in direct mode
lda #$0d
jsr $ffd2
jsr JCHROUT
lda #$0d
jsr $ffd2
jsr JCHROUT
;; Reset stack, and go back to main loop
ldx #$fe
+1 -1
View File
@@ -52,7 +52,7 @@ rsl_l1: lda $0200,x
*
;; Do printing of the new line
lda #$0d
jsr $ffd2
jsr JCHROUT
;; Ignore empty lines
lda tokenise_work1
+1 -1
View File
@@ -17,7 +17,7 @@ basic_do_break:
*
lda #$0d
jsr $ffd2
jsr JCHROUT
cmd_end:
jmp basic_main_loop
+4 -4
View File
@@ -36,7 +36,7 @@ list_more_lines:
pla
jsr print_integer
lda #$20
jsr $ffd2
jsr JCHROUT
;; Iterate through printing out the line
;; contents
@@ -105,17 +105,17 @@ list_not_rem:
bne list_print_loop
list_is_literal:
jsr $ffd2
jsr JCHROUT
iny
bne list_print_loop
list_end_of_line:
;; Clear reverse flag
lda #$92
jsr $ffd2
jsr JCHROUT
;; Print end of line
lda #$0d
jsr $ffd2
jsr JCHROUT
;; Now link to the next line
jsr basic_find_next_line
+2 -2
View File
@@ -18,7 +18,7 @@ cmd_load:
beq +
lda #$00 ; direct mode - don't display anything
*
jsr $FF90 ; SETMSG
jsr JSETMSG
;; XXX temporary, to set valid device number
lda #$08
@@ -69,7 +69,7 @@ got_filename:
ldx #<$0801 ; LOAD address = $0801
ldy #>$0801
jsr $ffd5
jsr JLOAD
bcc +
;; A = KERNAL error code, which also almost match
+1 -1
View File
@@ -41,7 +41,7 @@ basic_do_new:
;; (same story), expression value cache?
sec ; Read, not write value
jsr $ff99 ; KERNAL MEMTOP routine
jsr JMEMTOP
cpx #$80
beq +
lda #>$f7ff
+2 -2
View File
@@ -58,7 +58,7 @@ hi_loop:
pha
ldx #4
clc
hi_add_loop:
hi_add_loop:
lda $0100,x
adc number_table_hi,y
sta $0100,x
@@ -115,7 +115,7 @@ found_start_of_number:
;; Print digits
* lda $0100,y
ora #$30
jsr $ffd2
jsr JCHROUT
iny
cpy #5
bne -
+6 -6
View File
@@ -38,7 +38,7 @@ found_message_in_token_stream:
beq +
jsr print_packed_word
lda #$20
jsr $ffd2
jsr JCHROUT
pla
tay
iny
@@ -47,7 +47,7 @@ found_message_in_token_stream:
pla
;; Rub out space at the end
lda #$14
jsr $ffd2
jsr JCHROUT
rts
print_packed_word:
@@ -138,13 +138,13 @@ next_packed_word_char:
lsr
tax
;; Save Y so it doesn't get clobbered by $FFD2
;; Save Y so it doesn't get clobbered by CHROUT
tya
pha
;; X=1-14 = first 14 chars, so subtract one
lda packed_message_chars-1,x
jsr $FFD2
jsr JCHROUT
;; See if there is a char in the low nybl to print
pla
@@ -171,7 +171,7 @@ has_nybl:
;; X=1-14 = first 14 chars, so subtract one
lda packed_message_chars-1,x
jsr $FFD2
jsr JCHROUT
*
pla
tay
@@ -207,7 +207,7 @@ unpack_literal_char:
tya
pha
lda (temp_string_ptr),y
jsr $ffd2
jsr JCHROUT
pla
tay
rts
+3 -3
View File
@@ -112,7 +112,7 @@ not_hexword:
not_pointer:
;; Print character
jsr $ffd2
jsr JCHROUT
printf_nextchar:
jsr printf_advance
@@ -148,11 +148,11 @@ printf_printhexbyte:
cmp #$3A
bcc +
adc #6
* jsr $ffd2
* jsr JCHROUT
pla
and #$0f
ora #$30
cmp #$3A
bcc +
adc #6
* jmp $ffd2
* jmp JCHROUT
+1 -1
View File
@@ -17,7 +17,7 @@ wedge_dos:
;; Set remaining file parameters; channel 15 is a typical one for commands
lda #$0F
ldy #$0F
jsr $FFBA ; SETLFS
jsr JSETFLS
;; Now we have to check what the user wants us to do
+41
View File
@@ -108,6 +108,47 @@
.alias ILOAD $0330
.alias ISAVE $0331
;; Kernal jump table
.alias JCINT $FF81
.alias JIOINIT $FF84
.alias JRAMTAS $FF87
.alias JRESTOR $FF8A
.alias JVECTOR $FF8D
.alias JSETMSG $FF90
.alias JSECOND $FF93
.alias JTKSA $FF96
.alias JMEMTOP $FF99
.alias JMEMBOT $FF9C
.alias JSCNKEY $FF9F
.alias JSETTMO $FFA2
.alias JACPTR $FFA5
.alias JCIOUT $FFA8
.alias JUNTLK $FFAB
.alias JUNLSN $FFAE
.alias JLISTEN $FFB1
.alias JTALK $FFB4
.alias JREADST $FFB7
.alias JSETFLS $FFBA
.alias JSETNAM $FFBD
.alias JOPEN $FFC0
.alias JCLOSE $FFC3
.alias JCHKIN $FFC6
.alias JCHKOUT $FFC9
.alias JCLRCHN $FFCC
.alias JCHRIN $FFCF
.alias JCHROUT $FFD2
.alias JLOAD $FFD5
.alias JSAVE $FFD8
.alias JSETTIM $FFDB
.alias JRDTIM $FFDE
.alias JSTOP $FFE1
.alias JGETIN $FFE4
.alias JCLALL $FFE7
.alias JUDTIM $FFEA
.alias JSCREEN $FFED
.alias JPLOT $FFF0
.alias JIOBASE $FFF3
;; Under-ROM routines
;; (BASIC also includes them. XXX - We should de-duplicate them in a safe manner)
.alias missed_nmi_flag $2A7
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,3 +1,3 @@
; Set logical, first and second addresses
; C64 Programmer's Reference Guide Page 273
jmp setlfs
jmp setfls
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -3,7 +3,7 @@
; (http://codebase64.org/doku.php?id=base:kernalreference)
;
; As there is nothing between here and $FFFA, we can just hard code this in place.
LDY #$DC
LDX #$00
RTS
ldy #$DC
ldx #$00
rts
+2 -2
View File
@@ -44,12 +44,12 @@ print_filename_loop:
beq +
ldx #<current_filename_ptr
jsr peek_under_roms
jsr $ffd2
jsr JCHROUT
iny
jmp print_filename_loop
*
lda #$0d
jsr $ffd2
jsr JCHROUT
;; XXX - Use default device number
;; http://www.zimmers.net/anonftp/pub/cbm/programming/serial-bus.pdf
+3 -3
View File
@@ -112,7 +112,7 @@ not_hexword:
not_pointer:
;; Print character
jsr $ffd2
jsr JCHROUT
printf_nextchar:
jsr printf_advance
@@ -148,11 +148,11 @@ printf_printhexbyte:
cmp #$3A
bcc +
adc #6
* jsr $ffd2
* jsr JCHROUT
pla
and #$0f
ora #$30
cmp #$3A
bcc +
adc #6
* jmp $ffd2
* jmp JCHROUT
+1 -1
View File
@@ -1,6 +1,6 @@
; Function defined on pp272-273 of C64 Programmers Reference Guide
setlfs:
setfls:
;; There are 6 sane ways to implement this routine,
;; I hope this one won't cause similarity to CBM code