# HG changeset patch # User William Astle # Date 1694409497 21600 # Node ID df86e6d64ce252edbdf025849678e1b8ead60fb8 # Parent 718f9b7381b39d389c8499c8df8355db5946830f Flag handling fix and tweaking in number handling diff -r 718f9b7381b3 -r df86e6d64ce2 src/number.s --- a/src/number.s Sun Sep 10 20:05:47 2023 -0600 +++ b/src/number.s Sun Sep 10 23:18:17 2023 -0600 @@ -189,7 +189,7 @@ fp_add2 cmpb #32 ; are we shifting more than 32 bits? blo fp_add0 ; brif so - we're effectively adding zero so bail out fp_add3 cmpb #8 ; have 8 bits to move? - bhs fp_add5 ; brif not + blo fp_add5 ; brif not lda val.fpmant+2,x ; shift 8 bits right sta val.fpmant+3,x lda val.fpmant+1,x @@ -218,7 +218,7 @@ adcb val.fpmant+1,x adca val.fpmant,x std val.fpmant,y - clrb ; clear extra precision bits + ldb #0 ; clear extra precision bits (preserve carry) bcc fp_add7 ; brif no carry ror val.fpmant,y ; shift carry into mantissa ror val.fpmant+1,y @@ -226,7 +226,7 @@ ror val.fpmant+3,y rorb ; keep bits for founding inc val.fpexp,y ; bump exponent to account for shift - lbeq OVERROR ; brif it overflowed + beq OVERROR2 ; brif it overflowed fp_add7 leax ,y ; point to result jmp fp_normalize ; go normalize the result fp_add8 ldd val.fpmant+2,u ; subtract operands