Skip to content

Commit 3ac41c5

Browse files
Shave a few more bytes with BIT skips
No functional changes
1 parent 542614c commit 3ac41c5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/desk.acc/control.panel.s

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ shortcut_table_addr_hi:
771771
and mask1,x
772772
beq :+
773773
lda #0
774-
beq @store ; always
774+
SKIP_NEXT_2_BYTE_INSTRUCTION
775775
: lda #$FF
776776
@store: sta flag
777777

@@ -1288,7 +1288,8 @@ yloop: copy #0, xpos
12881288
xloop: ror row
12891289
bcc zero
12901290
lda #MGTK::pencopy
1291-
bpl store ; always
1291+
SKIP_NEXT_2_BYTE_INSTRUCTION
1292+
.assert MGTK::notpencopy <> $C0, error, "Bad BIT skip"
12921293
zero: lda #MGTK::notpencopy
12931294
store: cmp mode
12941295
beq :+

src/toolkits/lbtk.s

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ repeat:
329329
cmp lbr_copy + LBTK::ListBoxRecord::num_rows
330330
bcs :+
331331
lda #0
332-
beq do ; always
332+
SKIP_NEXT_2_BYTE_INSTRUCTION
333+
.assert lbr_copy + LBTK::ListBoxRecord::num_rows <> $C0, error, "bad BIT skip"
333334
: sbc lbr_copy + LBTK::ListBoxRecord::num_rows
334335
do: jsr update
335336
lda #MGTK::Part::page_up

0 commit comments

Comments
 (0)