Small optimizations in library code.

There should be no functional differences.
This commit is contained in:
Stephen Heumann 2024-02-18 17:35:21 -06:00
parent ce87c0e008
commit bf3a4d7ceb
3 changed files with 15 additions and 19 deletions

View File

@ -110,11 +110,10 @@ lb1 inc stdfile
cl0 lla p,stderr+4 find the file record that points to this cl0 lla p,stderr+4 find the file record that points to this
ldy #2 one ldy #2 one
cl1 lda [p] cl1 lda [p],Y
ora [p],Y
jeq rts
lda [p],Y
tax tax
ora [p]
jeq rts
lda [p] lda [p]
cmp stream cmp stream
bne cl2 bne cl2

View File

@ -1584,16 +1584,13 @@ cn3 cmp base branch if the digit is too big
cn3a clc add in the new digit cn3a clc add in the new digit
adc val adc val
sta val sta val
lda val+2
adc #0
sta val+2
lda val+4
adc #0
sta val+4
lda val+6
adc #0
sta val+6
bcc cn4 bcc cn4
inc val+2
bne cn4
inc val+4
bne cn4
inc val+6
bne cn4
stz rangeOK stz rangeOK
cn4 inc4 str next char cn4 inc4 str next char
bra cn1 bra cn1

View File

@ -244,8 +244,8 @@ lb3 lda [p1],Y scan until the end of memory is reached
dex dex
bne lb3 bne lb3
ldx #0 memory matches ; ldx #0
bra lb5 bra lb5 memory matches
lb4 blt less memory differs - set the result lb4 blt less memory differs - set the result
ldx #1 ldx #1
@ -956,7 +956,7 @@ str equ 4 pointer to the string
tcd tcd
ldy #0 advance s1 to point to the terminating ldy #0 advance s1 to point to the terminating
ldx #0 null tyx null
short M short M
lb1 lda [str],Y lb1 lda [str],Y
beq lb2 beq lb2
@ -1200,9 +1200,9 @@ lb3 long I,M increment s by Y and load the value
clc clc
adc s adc s
tay tay
lda s+2 ldx s+2
adc #0 bcc lb4
tax inx
lb4 lda rtl+1 remove the parameters lb4 lda rtl+1 remove the parameters
sta set+2 sta set+2