removed 'branch out of range' warnings

This commit is contained in:
FeralChild64 committed 2019-09-02 20:56:37 +02:00
1 parent a4114dd0d1
commit e0bbee443b
8 files changed
+76 -43

No files matched your search

+3 -2
View File
@@ -448,8 +448,9 @@ screen_grow_logical_line:
ldy current_screen_y
;; Don't grow line if it is already grown
lda screen_line_link_table,y
bmi done_grow_line
bpl +
jmp done_grow_line
*
lda #$80
sta screen_line_link_table,y
+36 -22
View File
@@ -41,8 +41,9 @@ load:
;; Check whether we support the requested device
lda current_device_number
and #$FC
beq lvs_illegal_device_number ; device number below 4, not an IEC device
bne +
jmp lvs_illegal_device_number ; device number below 4, not an IEC device
*
;; Device numbers above 30 are also illegal (see https://www.pagetable.com/?p=1031),
;; as the protocol combines device number with command code int one byte,
;; above 30 it is no longer possible (UNLISTEN and UNTALK codes prevent using
@@ -60,41 +61,51 @@ load:
;; Call device to LISTEN (p16)
lda current_device_number
jsr listen
bcs lvs_device_not_found_error
bcc +
jmp lvs_device_not_found_error ; XXX deduplicate with other jumps in this routine
*
;; Open channel 0 (reserved for file reading)
lda #$00
jsr iec_cmd_open
bcs lvs_device_not_found_error
bcc +
jmp lvs_device_not_found_error ; XXX deduplicate with other jumps in this routine
*
;; Send file name
jsr lvs_send_file_name
bcs lvs_load_verify_error
bcc +
jmp lvs_load_verify_error ; XXX deduplicate with other jumps in this routine
*
;; Now command device to talk (p16)
lda current_device_number
jsr talk
bcs lvs_load_verify_error
bcc +
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
jsr iec_tx_command
bcs lvs_load_verify_error
bcc +
jmp lvs_load_verify_error ; XXX deduplicate with other jumps in this routine
*
;; We are currently talker, so do the IEC turn around so that we
;; are the listener (p16)
jsr iec_turnaround_to_listen
bcs lvs_load_verify_error
bcc +
jmp lvs_load_verify_error ; XXX deduplicate with other jumps in this routine
*
;; Get load address and store it if secondary address is zero
jsr iec_rx_byte
bcs lvs_file_not_found_error
bcc +
jmp lvs_file_not_found_error ; XXX deduplicate with other jumps in this routine
*
ldx current_secondary_address
beq +
sta STAL+0
*
jsr iec_rx_byte
bcs lvs_file_not_found_error
bcc +
jmp lvs_file_not_found_error ; XXX deduplicate with other jumps in this routine
*
ldx current_secondary_address
beq +
sta STAL+1
@@ -105,16 +116,19 @@ load:
load_loop:
;; We are now ready to receive bytes
jsr iec_rx_byte
bcs lvs_load_verify_error
bcc +
jmp lvs_load_verify_error ; XXX deduplicate with other jumps in this routine
*
;; Handle the byte (store in memory / verify)
jsr lvs_handle_byte_load_verify
bcs lvs_load_verify_error
bcc +
jmp lvs_load_verify_error ; XXX deduplicate with other jumps in this routine
*
;; Advance pointer to data
jsr lvs_advance_pointer
bcs lvs_wrap_around_error
bcc +
jmp lvs_wrap_around_error
*
;; Check for EOI - if so, this was the last byte
lda IOSTATUS
and #K_STS_EOI
+3 -2
View File
@@ -22,8 +22,9 @@ iec_tx_command:
;; Give devices time to respond (response is mandatory!) by pulling DATA
jsr iec_wait1ms
lda CIA2_PRA ; pulled DATA = highest bit 0 = 'plus'
bmi iec_return_DEVICE_NOT_FOUND
bpl +
jmp iec_return_DEVICE_NOT_FOUND
*
;; At least one device responded, but they are still allowed to stall
;; (can be busy processing something), we have to wait till they are all
;; ready (or bored with DOS attack...)
+5 -2
View File
@@ -51,10 +51,13 @@ lvs_handle_byte_load_verify:
lvs_advance_pointer:
;; Advance pointer
inc STAL
bne lvs_success_end
beq +
jmp lvs_success_end
*
inc STAL+1
;; If we wrap around to $0000, then this is bad.
beq lvs_error_end
bne +
jmp lvs_error_end
*
clc
rts
+6 -3
View File
@@ -322,8 +322,9 @@ next_row:
stx $dc00 ;// Disconnect all Keyboard Rows
cpx $dc01 ;// Only Control Port activity will be detected
bne ReturnNoKeys
beq +
jmp ReturnNoKeys
*
;; Make X = $00, assumed below
inx
@@ -462,7 +463,9 @@ RecordKeypress:
;; // New Key Detected
ldy BufferQuantity
cpy #MaxKeyRollover
bcs TooManyNewKeys
bcc +
jmp TooManyNewKeys
*
AcceptKeyEvent:
sta Buffer,y
iny