Mercurial > hg > index.cgi
comparison src/lwbasic.s @ 69:a3c4183f28e0
Clean up some more formatting
author | William Astle <lost@l-w.ca> |
---|---|
date | Sat, 10 Jun 2023 12:27:50 -0600 |
parents | 8ac1aafb9ecb |
children | eb7c96671f5b |
comparison
equal
deleted
inserted
replaced
68:8ac1aafb9ecb | 69:a3c4183f28e0 |
---|---|
1718 stx val0+4 | 1718 stx val0+4 |
1719 bra eval_number1 ; go do the parsing | 1719 bra eval_number1 ; go do the parsing |
1720 eval_number0 jsr nextchar ; fetch next input | 1720 eval_number0 jsr nextchar ; fetch next input |
1721 beq eval_numberr ; brif end of expression - bail | 1721 beq eval_numberr ; brif end of expression - bail |
1722 eval_number1 cmpa #'- ; negative (ascii sign)? | 1722 eval_number1 cmpa #'- ; negative (ascii sign)? |
1723 beq eval_number3 ; brif so | 1723 beq eval_number3 ; brif so |
1724 cmpa #tok_minus ; negative (operator negative)? | 1724 cmpa #tok_minus ; negative (operator negative)? |
1725 bne eval_number2 ; brif not | 1725 bne eval_number2 ; brif not |
1726 eval_number3 com val0.sign ; invert sign | 1726 eval_number3 com val0.sign ; invert sign |
1727 bra eval_number0 ; deal with next input | 1727 bra eval_number0 ; deal with next input |
1728 eval_number2 cmpa #'+ ; unary +? | 1728 eval_number2 cmpa #'+ ; unary +? |
1729 beq eval_number0 ; brif so - skip it | 1729 beq eval_number0 ; brif so - skip it |
1730 eval_number5 cmpa #'. ; decimal point? | 1730 eval_number5 cmpa #'. ; decimal point? |
1731 beq eval_float ; brif decimal - force float | 1731 beq eval_float ; brif decimal - force float |
1732 cmpa #'0 ; is it a number? | 1732 cmpa #'0 ; is it a number? |
1733 blo eval_numberr ; brif below digit | 1733 blo eval_numberr ; brif below digit |
1734 cmpa #'9 ; is it still a number? | 1734 cmpa #'9 ; is it still a number? |
1735 bhi eval_numberr ; brif above digit | 1735 bhi eval_numberr ; brif above digit |
1736 suba #'0 ; offset to binary digit value | 1736 suba #'0 ; offset to binary digit value |
1785 subd val0.int+2 | 1785 subd val0.int+2 |
1786 std val0.int+2 | 1786 std val0.int+2 |
1787 ldd zero | 1787 ldd zero |
1788 sbcb val0.int+1 | 1788 sbcb val0.int+1 |
1789 sbca val0.int | 1789 sbca val0.int |
1790 std val0.int | 1790 std val0.int |
1791 eval_numberr0 rts | 1791 eval_numberr0 rts |
1792 eval_float jmp SNERROR ; we don't handle floating point yet | 1792 eval_float jmp SNERROR ; we don't handle floating point yet |
1793 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1793 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1794 ; Operator table | 1794 ; Operator table |
1795 ; | 1795 ; |