fixed RSSTAT usage conflict
This commit is contained in:
1 parent
4f58088207
commit
58dc012831
10 files changed
+68
-42
No files matched your search
@@ -97,7 +97,7 @@ LOAD:
|
||||
// Get load address and store it if secondary address is zero
|
||||
jsr iec_rx_byte
|
||||
bcc !+
|
||||
jmp lvs_file_not_found_error // XXX deduplicate with other jumps in this routine
|
||||
jmp kernalerror_FILE_NOT_FOUND // XXX deduplicate with other jumps in this routine
|
||||
!:
|
||||
ldx SA
|
||||
beq !+
|
||||
@@ -105,7 +105,7 @@ LOAD:
|
||||
!:
|
||||
jsr iec_rx_byte
|
||||
bcc !+
|
||||
jmp lvs_file_not_found_error // XXX deduplicate with other jumps in this routine
|
||||
jmp kernalerror_FILE_NOT_FOUND // XXX deduplicate with other jumps in this routine
|
||||
!:
|
||||
ldx SA
|
||||
beq !+
|
||||
|
||||
@@ -164,8 +164,6 @@ lvs_illegal_device_number:
|
||||
jsr kernalstatus_DEVICE_NOT_FOUND
|
||||
jmp kernalerror_ILLEGAL_DEVICE_NUMBER
|
||||
|
||||
.label lvs_file_not_found_error = kernalerror_FILE_NOT_FOUND
|
||||
|
||||
lvs_load_verify_error:
|
||||
// XXX should we really return BASIC error code here?
|
||||
lda VERCKK
|
||||
|
||||
+2
-1
@@ -18,7 +18,8 @@ READST:
|
||||
|
||||
// This is RS-232 device - according to 'Compute's Mapping the Commodore 64' page 239
|
||||
// it reads status from RSSTAT
|
||||
lda RSSTAT
|
||||
// XXX 'lda RSSTAT' not possible due to extended scnkey, fix it!
|
||||
lda #$FF
|
||||
rts
|
||||
!:
|
||||
// According to 'Compute's Mapping the Commodore 64' page 239, it usually retrieves
|
||||
|
||||
@@ -46,25 +46,6 @@
|
||||
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
|
||||
// // ZERO PAGE Varibles
|
||||
// $250-$258 is the 81st - 88th characters in BASIC input, a carry over from VIC-20
|
||||
// and not used on C64, so safe for us to use, probably.
|
||||
// (Compute's Mapping the 64 p51)
|
||||
.label ScanResult = $250 // 8 bytes
|
||||
// Other variables are in RS232 ZP locations for now
|
||||
// (Carefully avoiding $A7 which is used by 64NET)
|
||||
.label BufferNew = $A9 // 3 bytes
|
||||
.label KeyQuantity = $A8 // 1 byte
|
||||
.label TempZP = $B6 // 1 byte
|
||||
|
||||
// Reuse RS232 variables, since they should not be used
|
||||
// by other things
|
||||
// These are initialised in cinit all to $FF
|
||||
.label BufferOld = $293 // 3 bytes
|
||||
.label Buffer = $297 // 4 bytes
|
||||
.label BufferQuantity = $B4 // 1 byte
|
||||
|
||||
|
||||
// Operational Variables
|
||||
.const MaxKeyRollover = 3
|
||||
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
|
||||
vector_real:
|
||||
|
||||
// Temporary storage location - checked on real C64 that this is the
|
||||
// Use MEMUSS as 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 = MEMUSS
|
||||
|
||||
// According to 'Compute's Mapping the Commodore 64' page 237,
|
||||
// the CBM implementation does not disable IRQs - yet, the
|
||||
@@ -17,20 +16,20 @@ vector_real:
|
||||
|
||||
// Prepare the user data pointer - strange order to reduce risk
|
||||
// of potential similarity to the original routine
|
||||
sty _caller_arr_ptr + 1
|
||||
stx _caller_arr_ptr + 0
|
||||
sty MEMUSS + 1
|
||||
stx MEMUSS + 0
|
||||
|
||||
// Select routine variant - store or restore vectors
|
||||
ldy #$1F
|
||||
bcc vector_restore
|
||||
|
||||
lda CINV, y
|
||||
sta (_caller_arr_ptr), y
|
||||
sta (MEMUSS), y
|
||||
|
||||
bcs vector_end_loop // branch always
|
||||
|
||||
vector_restore:
|
||||
lda (_caller_arr_ptr), y
|
||||
lda (MEMUSS), y
|
||||
sta CINV, y
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
Reference in new issue
Block a user