implemented NEGOP math routine

This commit is contained in:
FeralChild64 committed 2020-01-29 20:28:01 +01:00
1 parent 733bf8d2ba
commit 0e319d9871
4 files changed
+11 -5

No files matched your search

+1 -1
View File
@@ -206,7 +206,7 @@ Floating point mathematical routines - not official, but well known and broadly
| `$BF71` | `SQR` | NOT DONE | XXX - no stub added yet |
| `$BF78` | `FPWR` | NOT DONE | set FAC1 as RAM raised to the power of FAC1 |
| `$BF7B` | `FPWRT` | NOT DONE | set FAC1 as FAC2 raised to the power of FAC1 |
| `$BFB4` | `NEGOP` | NOT DONE | toggle FAC1 sign (if not 0) |
| `$BFB4` | `NEGOP` | DONE | |
| `$BFED` | `EXP` | NOT DONE | XXX - no stub added yet |
| `$E043` | `POLY1` | NOT DONE | evaluate polynomial with odd powers only |
| `$E059` | `POLY2` | NOT DONE | evaluate polynomial with odd and even powers |
+1 -1
View File
@@ -31,7 +31,7 @@
.label TEMPPT = $16 // -- NOT IMPLEMENTED --
.label LASTPT = $17 // $17-$18 -- NOT IMPLEMENTED --
.label TEMPST = $19 // $19-$21 -- NOT IMPLEMENTED --
.label INDEX = $22 // $22-$25 -- NOT IMPLEMENTED -- temporary variables
.label INDEX = $22 // $22-$25 temporary variables, [!] our usage might be different
.label RESHO = $26 // $26-$2A -- NOT IMPLEMENTED --
.label TXTTAB = $2B // $2B-$2C start of BASIC code
.label VARTAB = $2D // $2D-$2E end of BASIC code, start of variables
@@ -10,7 +10,13 @@
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
//
// XXX provide implementation
NEGOP:
STUB_IMPLEMENTATION()
lda FAC1_exponent
beq !+ // do not toggle the sign if value is 0
lda FAC1_sign
eor #$FF
sta FAC1_sign
!:
rts
File renamed without changes.