diff --git a/stdio.asm b/stdio.asm index e499bb4..8127991 100644 --- a/stdio.asm +++ b/stdio.asm @@ -110,11 +110,10 @@ lb1 inc stdfile cl0 lla p,stderr+4 find the file record that points to this ldy #2 one -cl1 lda [p] - ora [p],Y - jeq rts - lda [p],Y +cl1 lda [p],Y tax + ora [p] + jeq rts lda [p] cmp stream bne cl2 diff --git a/stdlib.asm b/stdlib.asm index 8f8e5fc..f557559 100644 --- a/stdlib.asm +++ b/stdlib.asm @@ -1584,16 +1584,13 @@ cn3 cmp base branch if the digit is too big cn3a clc add in the new digit adc 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 + inc val+2 + bne cn4 + inc val+4 + bne cn4 + inc val+6 + bne cn4 stz rangeOK cn4 inc4 str next char bra cn1 diff --git a/string.asm b/string.asm index 5893846..e5cd5ae 100644 --- a/string.asm +++ b/string.asm @@ -244,8 +244,8 @@ lb3 lda [p1],Y scan until the end of memory is reached dex bne lb3 - ldx #0 memory matches - bra lb5 +; ldx #0 + bra lb5 memory matches lb4 blt less memory differs - set the result ldx #1 @@ -956,7 +956,7 @@ str equ 4 pointer to the string tcd ldy #0 advance s1 to point to the terminating - ldx #0 null + tyx null short M lb1 lda [str],Y beq lb2 @@ -1200,9 +1200,9 @@ lb3 long I,M increment s by Y and load the value clc adc s tay - lda s+2 - adc #0 - tax + ldx s+2 + bcc lb4 + inx lb4 lda rtl+1 remove the parameters sta set+2