Skip to content

Commit 9b65ada

Browse files
Reuse some RTS ops. Saves 4 bytes.
1 parent 4021f74 commit 9b65ada

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

intbasic.system.s

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,42 +1159,36 @@ ret: rts
11591159

11601160
;; Verify file is a directory
11611161
jsr GetFileInfo
1162-
beq :+
1163-
rts
1164-
:
1162+
bne ret1
1163+
11651164
lda gfi_file_type
11661165
cmp #FT_DIR
11671166
beq open
11681167
lda #ERR_INCOMPATIBLE_FILE_FORMAT
1169-
rts
1168+
ret1: rts
11701169

11711170
;; Use current prefix
11721171
use_prefix:
11731172
MLI_CALL GET_PREFIX, prefix_params
1174-
beq :+
1175-
rts
1176-
:
1173+
bne ret1
11771174

11781175
ENTRY_BUFFER := PATHBUF
11791176

11801177
open: jsr Open
1181-
beq :+
1182-
rts
1183-
:
1178+
bne ret1
1179+
11841180
COPY16 #ENTRY_BUFFER, rw_data_buffer
11851181

11861182
;; Skip block pointers
11871183
COPY16 #4, rw_request_count
11881184
jsr Read
1189-
beq :+
1190-
rts
1191-
:
1185+
bne ret1
1186+
11921187
;; Read header
11931188
COPY16 #FILE_ENTRY_SIZE, rw_request_count
11941189
jsr Read
1195-
beq :+
1196-
rts
1197-
:
1190+
bne ret1
1191+
11981192
jsr intbasic::MON_CROUT
11991193
lda ENTRY_BUFFER + $00 ; storage_type / name_length
12001194
and #$F0

0 commit comments

Comments
 (0)