mirror of
https://github.com/a2-4am/4cade.git
synced 2025-03-02 19:29:40 +00:00
shave some bytes
This commit is contained in:
parent
8ed18022b2
commit
32eaba3605
@ -19,8 +19,7 @@ DrawPageInternal
|
||||
; clobbers PTR
|
||||
; clobbers $FF
|
||||
; clobbers A/X/Y
|
||||
; preserves all flags
|
||||
php
|
||||
; preserves C, other flags clobbered
|
||||
stx $FF
|
||||
ldx #0
|
||||
stx VTAB
|
||||
@ -30,8 +29,7 @@ DrawPageInternal
|
||||
sta HTAB
|
||||
ldy #0
|
||||
lda (PTR), y ; A = length of line, or #$FF
|
||||
bmi PLP_AND_RTS ; if #$FF then we're done
|
||||
plp
|
||||
bmi drawLineDone ; if #$FF then we're done
|
||||
php ; C = whatever was passed in
|
||||
pha ; save length
|
||||
jsr DrawStringSuperInternal
|
||||
@ -41,10 +39,10 @@ DrawPageInternal
|
||||
sta PTR
|
||||
bcc +
|
||||
inc PTR+1
|
||||
+ inc VTAB ; this will print 255 lines if you give
|
||||
+ plp
|
||||
inc VTAB ; this will print 255 lines if you give
|
||||
bne @drawLine ; it 255 lines, because this is assembly
|
||||
PLP_AND_RTS
|
||||
plp
|
||||
drawLineDone
|
||||
rts
|
||||
|
||||
Draw40CharsInternal
|
||||
@ -116,9 +114,9 @@ DrawBufferInternal
|
||||
; VTAB is NOT incremented
|
||||
; clobbers A/X/Y
|
||||
+ST16 DBISrc+1
|
||||
php
|
||||
dex
|
||||
bmi PLP_AND_RTS ; empty string
|
||||
bmi drawLineDone ; empty string
|
||||
php
|
||||
lda VTAB
|
||||
asl
|
||||
asl
|
||||
@ -162,7 +160,6 @@ DrawBufferInternal
|
||||
adc #$04
|
||||
sta DBIRow7+2
|
||||
@hgrlo lda #$FD
|
||||
clc
|
||||
adc HTAB
|
||||
sta DBIRow0+1
|
||||
sta DBIRow1+1
|
||||
|
Loading…
x
Reference in New Issue
Block a user