one more cleanup in aliases

This commit is contained in:
FeralChild64 committed 2019-09-09 17:00:42 +02:00
1 parent b9e3cb89bf
commit 8de99f2b14
18 files changed
+40 -45

No files matched your search

+13 -13
View File
@@ -39,7 +39,7 @@
.label STREND = $31 // $31-$32 -- NOT IMPLEMENTED --
.label FRETOP = $33 // $33-$34 -- NOT IMPLEMENTED --
.label FRESPC = $35 // $35-$36 [!] our implementation might be different XXX give more details
// .label MEMSIZ = $37 // $37-$38 -- NOT IMPLEMENTED -- highest address of BASIC memory XXX remove name conflict
.label MEMSIZ = $37 // $37-$38 -- NOT IMPLEMENTED -- highest address of BASIC memory
.label CURLIN = $39 // $39-$3A current BASIC line number
.label OLDLIN = $3B // $3B-$3C previous BASIC line number
.label OLDTXT = $3D // $3D-$3E current BASIC line pointer
@@ -75,7 +75,7 @@
.label IOSTATUS = $90
.label STKEY = $91 // Keys down clears bits. STOP - bit 7, C= - bit 6, SPACE - bit 4, CTRL - bit 2
.label SVXT = $92 // -- NOT IMPLEMENTED --
.label VERCK = $93 // 0 = LOAD, 1 = VERIFY XXX rename to VERCKK
.label VERCKK = $93 // 0 = LOAD, 1 = VERIFY
.label C3PO = $94 // flag - is BSOUR content valid
.label BSOUR = $95 // serial bus buffered output byte
.label SYNO = $96 // -- NOT IMPLEMENTED --
@@ -88,9 +88,9 @@
.label MSGFLG = $9D // bit 6 = error messages, bit 7 = control message
.label PTR1 = $9E // -- NOT IMPLEMENTED --
.label PTR2 = $9F // -- NOT IMPLEMENTED --
.label TIME = $A0 // $A0-$A2, jiffy clock
.label IEC_TMP1 = $A3 // temporary variable for tape and IEC, [!] our usage probably differs in details XXX rename to TSFCNT
.label IEC_TMP2 = $A4 // temporary variable for tape and IEC, [!] our usage probably differs in details XXX rename to TBTCNT
.label TIME = $A0 // $A0-$A2 jiffy clock
.label TSFCNT = $A3 // temporary variable for tape and IEC, [!] our usage probably differs in details
.label TBTCNT = $A4 // temporary variable for tape and IEC, [!] our usage probably differs in details
.label CNTDN = $A5 // -- NOT IMPLEMENTED --
.label BUFPNT = $A6 // -- NOT IMPLEMENTED --
.label INBIT = $A7 // -- NOT IMPLEMENTED --
@@ -100,7 +100,7 @@
.label RIPRTY = $AB // -- NOT IMPLEMENTED --
.label SAL = $AC // $AC-$AD -- NOT IMPLEMENTED -- (implemented screen part)
.label EAL = $AE // $AE-$AF -- NOT IMPLEMENTED -- [!] used also byy screen editor
.label CMP0 = $B0 // $B0-$B1, temporary tape storage, [!] here used for BRK instruction address
.label CMP0 = $B0 // $B0-$B1 temporary tape storage, [!] here used for BRK instruction address
.label TAPE1 = $B2 // $B2-$B3 tape buffer pointer
.label BITTS = $B4 // -- NOT IMPLEMENTED --
.label NXTBIT = $B5 // -- NOT IMPLEMENTED --
@@ -109,13 +109,13 @@
.label LA = $B8 // current logical_file number
.label SA = $B9 // current secondary address
.label FA = $BA // current device number
.label FNADDR = $BB // $BB-$BC, current file name pointer
.label FNADDR = $BB // $BB-$BC current file name pointer
.label ROPRTY = $BD // -- NOT IMPLEMENTED --
.label FSBLK = $BE // -- NOT IMPLEMENTED --
.label MYCH = $BF // -- NOT IMPLEMENTED --
.label CAS1 = $C0 // -- NOT IMPLEMENTED --
.label STAL = $C1 // $C1-$C2, LOAD/SAVE start address
.label MEMUS = $C3 // $C3-$C4, temporary address for tape LOAD/SAVE XXX rename to MEMUSS
.label STAL = $C1 // $C1-$C2 LOAD/SAVE start address
.label MEMUSS = $C3 // $C3-$C4 temporary address for tape LOAD/SAVE
.label LSTX = $C5 // last keyy matrix position [!] our usage probably differs in details
.label NDX = $C6 // number of chars in keyboard buffer
.label RVS = $C7 // flag, whether to print reversed characters
@@ -157,9 +157,9 @@
.label LAT = $259 // $259-$262, logical file numbers (table, 10 bytes)
.label FAT = $263 // $263-$26C, device numbers (table, 10 bytes)
.label SAT = $26D // $26D-$276, secondary addresses (table, 10 bytes)
.label KEYD = $277 // $277-$280 keyboard buffer
.label MEMSTR = $281 // $281-$282 XXX rename to LORAM
.label MEMSIZ = $283 // $283-$284, NOTE: Mapping the 64 erroneously has the hex as $282, while the DEC is correct XXX rename to HIRAM
.label KEYD = $277 // $277-$280, keyboard buffer
.label MEMSTR = $281 // $281-$282, start of BASIC memory
.label MEMEND = $283 // $283-$284, NOTE: Mapping the 64 erroneously has the hex as $282 (DEC is correct), name seems to be mistaken too
.label TIMOUT = $285 // IEEE-488 timeout
.label COLOR = $286 // current text foreground color
.label GDCOL = $287 // color of character under cursor
@@ -189,7 +189,7 @@
.label TRDTMP = $2A3 // -- NOT IMPLEMENTED --
.label TD1IRQ = $2A4 // -- NOT IMPLEMENTED --
.label TLNIDX = $2A5 // -- NOT IMPLEMENTED --
.label PALNTSC = $2A6 // 0 = NTSC, 1 = PAL XXX rename to TVSFLG
.label TVSFLG = $2A6 // 0 = NTSC, 1 = PAL
// [!] XXX document $2A7-$2FF usage
// BASIC vectors
-2
View File
@@ -90,8 +90,6 @@
.label screen_line_link_table = $D9
.label current_screen_line_colour_ptr = $F3
.label keyboard_decoding_table_ptr = $F5
.label rs232_rx_buffer_ptr = $F7
.label rs232_tx_buffer_ptr = $F9
.label basic_input_buffer = BUF
+1 -1
View File
@@ -19,7 +19,7 @@ startup_banner:
// Print PAL/NTSC
ldx #30 // NTSC
lda PALNTSC
lda TVSFLG
beq !+
ldx #31 // PAL
!:
-2
View File
@@ -41,8 +41,6 @@
.label screen_line_link_table = $D9
.label current_screen_line_colour_ptr = $F3
.label keyboard_decoding_table_ptr = $F5
.label rs232_rx_buffer_ptr = $F7
.label rs232_tx_buffer_ptr = $F9
// "Compute's Mapping the 64" book
.label keyboard_buffer = $0277
+1 -1
View File
@@ -54,7 +54,7 @@ cint_pal:
lda #$01
!:
sta PALNTSC
sta TVSFLG
cint_brk: // entry for BRK and STOP+RESTORE - XXX, where should it start?
+1 -1
View File
@@ -13,7 +13,7 @@ close_load:
jsr LISTEN
lda #$E0 // CLOSE command
sta IEC_TMP2
sta TBTCNT
jsr iec_tx_command
jsr iec_tx_command_finalize
+1 -1
View File
@@ -34,7 +34,7 @@ CLOSE:
jmp close_remove_from_table
!:
ora $E0 // CLOSE command
sta IEC_TMP2
sta TBTCNT
jsr iec_tx_command
bcs close_remove_from_table
jsr iec_tx_command_finalize
+2 -3
View File
@@ -1,4 +1,3 @@
//
// Official Kernal routine, described in:
//
@@ -23,7 +22,7 @@
LOAD:
// Are we loading or verifying?
sta VERCK
sta VERCKK
// Store start address of LOAD
stx STAL+0
@@ -82,7 +81,7 @@ LOAD:
jmp lvs_load_verify_error // XXX deduplicate with other jumps in this routine
!:
lda #$60 // open channel / data (p3) , required according to p13
sta IEC_TMP2
sta TBTCNT
jsr iec_tx_command
bcc !+
jmp lvs_load_verify_error // XXX deduplicate with other jumps in this routine
+1 -1
View File
@@ -21,7 +21,7 @@ VECTOR:
// Temporary storage location - checked on real C64 that this is the
// address originally used; after calling VECTOR and checking zero page
// area afterwards, the address could be found there
.label _caller_arr_ptr = MEMUS
.label _caller_arr_ptr = MEMUSS
// According to 'Compute's Mapping the Commodore 64' page 237,
// the CBM implementation does not disable IRQs - yet, the
+1 -1
View File
@@ -18,7 +18,7 @@ iec_cmd_open: // similar to TKSA, but without turnaround
common_open_close_unlsn_second: // common part of several commands
sta IEC_TMP2
sta TBTCNT
jsr iec_tx_command
bcs !+ // branch if error
jmp iec_tx_command_finalize
+2 -2
View File
@@ -135,12 +135,12 @@ iec_rx_clk_wait2:
plp
// Restore registers
sta IEC_TMP2 // $A4 is a byte buffer according to http://sta.c64.org/cbm64mem.html
sta TBTCNT // $A4 is a byte buffer according to http://sta.c64.org/cbm64mem.html
pla
tay
pla
tax
lda IEC_TMP2
lda TBTCNT
clc
rts
+3 -3
View File
@@ -1,7 +1,7 @@
// Implemented based on https://www.pagetable.com/?p=1135, https://github.com/mist64/cbmbus_doc
// Expects byte to send in IEC_TMP2 ($A4 is a byte buffer according to http://sta.c64.org/cbm64mem.html)
// Expects byte to send in TBTCNT ($A4 is a byte buffer according to http://sta.c64.org/cbm64mem.html)
// Carry flag set = signal EOI
//
// Preserves .X and .Y registers
@@ -53,9 +53,9 @@ iec_tx_common:
iec_tx_common_sendbit:
// Is next bit 0 or 1?
lda IEC_TMP2
lda TBTCNT
lsr
sta IEC_TMP2
sta TBTCNT
bcs !+
// Bit is 0
+1 -1
View File
@@ -1,7 +1,7 @@
// Implemented based on https://www.pagetable.com/?p=1135, https://github.com/mist64/cbmbus_doc
// Expects byte to send in IEC_TMP2 ($A4 is a byte buffer according to http://sta.c64.org/cbm64mem.html)
// Expects byte to send in TBTCNT ($A4 is a byte buffer according to http://sta.c64.org/cbm64mem.html)
// Carry flag set = signal EOI
//
// Preserves .X and .Y registers
+3 -3
View File
@@ -18,7 +18,7 @@ lvs_send_file_name_loop:
sec
!:
// Transmit one character
sta IEC_TMP2
sta TBTCNT
jsr iec_tx_byte
jmp lvs_send_file_name_loop
lvs_send_file_name_done:
@@ -86,7 +86,7 @@ lvs_display_loading_verifying:
// Display LOADING / VERIFYING and start address
lda MSGFLG
bpl lvs_display_end
lda VERCK
lda VERCKK
beq !+
jsr printf // XXX don't use printf, use packed message
.byte $0D
@@ -156,7 +156,7 @@ lvs_illegal_device_number:
lvs_load_verify_error:
// XXX should we really return BASIC error code here?
lda VERCK
lda VERCKK
bne lvs_verify_error
lda #B_ERR_LOAD
bne lvs_error_end
+4 -4
View File
@@ -12,13 +12,13 @@ MEMTOP:
bcc memtop_set
ldy MEMSIZ+1
ldx MEMSIZ+0
ldy MEMEND+1
ldx MEMEND+0
rts
memtop_set:
sty MEMSIZ+1
stx MEMSIZ+0
sty MEMEND+1
stx MEMEND+0
rts
+4 -4
View File
@@ -61,14 +61,14 @@ ramtas_l2:
ldx #>$0400
stx HIBASE
// Work out RAM size and put in MEMSTR and MEMSIZ
// Work out RAM size and put in MEMSTR and MEMEND
// "Compute's Mapping the 64", p54
// http://unusedino.de/ec64/technical/project64/mapping_c64.html
ldx #>$0800
stx MEMSTR+1
ldx #$00
stx MEMSTR+0
stx MEMSIZ+0
stx MEMEND+0
// Try to modify $8000, if it fails then RAM ends at $7FFF, else $9FFF
lda $8000
eor #$FF
@@ -79,12 +79,12 @@ ramtas_l2:
beq ramtas_32K_RAM
sta $8000
ldx #$A0
stx MEMSIZ+1
stx MEMEND+1
jmp ramtas_RAM_sized
ramtas_32K_RAM:
sta $8000 // in case RAM is hiding beneath a ROM
ldx #$80
stx MEMSIZ+1
stx MEMEND+1
// Fall through
ramtas_RAM_sized:
+1 -1
View File
@@ -26,7 +26,7 @@ TALK:
common_talk_listen: // common part of TALK and LISTEN
sta IEC_TMP2
sta TBTCNT
jmp iec_tx_command
+1 -1
View File
@@ -21,7 +21,7 @@ UNTLK:
common_untlk_tksa: // common part of UNTLK and TKSA
sta IEC_TMP2
sta TBTCNT
jsr iec_tx_command
bcs !+ // branch if error
// XXX - for TKSA, is it really the right place to do a turnaround? I've got some doubts