Mercurial > hg > index.cgi
diff src/print.s @ 80:bb50ac9fdf37
Checkpoint with very basic integer and floating point arithmetic, untested
This commit has implementations for floating point add, subtract, multiply,
and divide, along with 32 bit signed integer equivalents. These can probably
be optimized and they are untested.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sat, 07 Oct 2023 02:56:59 -0600 |
parents | 5f8f0b0781e8 |
children | 663d8e77b579 |
line wrap: on
line diff
--- a/src/print.s Sun Sep 10 23:18:17 2023 -0600 +++ b/src/print.s Sat Oct 07 02:56:59 2023 -0600 @@ -66,7 +66,7 @@ lda #0x20 ; default sign (positive) ldb val0+val.int ; is it negative? bpl cmd_printint0 ; brif not - jsr val_negint32 ; negate the integer + jsr int32_neg ; negate the integer lda #'- ; negative sign cmd_printint0 sta ,y+ ; save sign ldu #cmd_printintpc ; point to positive constant table