several more stubs for math routines
This commit is contained in:
1 parent
ee9bda8652
commit
9de9a6c0a7
43 files changed
+535
-20
No files matched your search
@@ -176,42 +176,43 @@ Floating point mathematical routines - not official, but well known and broadly
|
||||
|
||||
| Address | Name | Status | Remarks |
|
||||
| :-------: | :----------- | :------: | :------------------------------------------------: |
|
||||
| `$B1AA` | `FACINX` | NOT DONE | XXX - no stub added yet |
|
||||
| `$B1AA` | `FACINX` | NOT DONE | convert FAC1 to 16-bit signed integer |
|
||||
| `$B391` | `GIVAYF` | NOT DONE | XXX - no stub added yet |
|
||||
| `$B7B5` | `STRVAL` | NOT DONE | XXX - no stub added yet |
|
||||
| `$B850` | `FSUB` | NOT DONE | XXX - no stub added yet |
|
||||
| `$B853` | `FSUBT` | NOT DONE | XXX - no stub added yet |
|
||||
| `$B867` | `FADD` | NOT DONE | XXX - no stub added yet |
|
||||
| `$B86A` | `FADDT` | NOT DONE | XXX - no stub added yet |
|
||||
| `$B850` | `FSUB` | NOT DONE | subtract FAC1 from RAM |
|
||||
| `$B853` | `FSUBT` | NOT DONE | subtract FAC1 from FAC2 |
|
||||
| `$B867` | `FADD` | NOT DONE | add RAM to FAC1 |
|
||||
| `$B86A` | `FADDT` | NOT DONE | add FAC2 to FAC1 |
|
||||
| `$B9EA` | `LOG` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BA28` | `FMULT` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BA28` | `FMUL` | NOT DONE | multiplies FAC1 by RAM |
|
||||
| `$BA2B` | `FMULT` | NOT DONE | multiplies FAC1 by FAC2 |
|
||||
| `$BA8C` | `CONUPK` | NOT DONE | fetch FAC2 from RAM location |
|
||||
| `$BAE2` | `MUL10` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BAFE` | `DIV10` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BB0F` | `FDIV` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BB12` | `FDIVT` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BAE2` | `MUL10` | NOT DONE | multiply FAC1 by 10 |
|
||||
| `$BAFE` | `DIV10` | NOT DONE | divide FAC1 by 10, result is always positive |
|
||||
| `$BB0F` | `FDIV` | NOT DONE | divide RAM by FAC1 |
|
||||
| `$BB12` | `FDIVT` | NOT DONE | divide FAC2 by FAC1, ignores sign |
|
||||
| `$BBA2` | `MOVFM` | NOT DONE | fetch FAC1 from RAM location |
|
||||
| `$BBD4` | `MOVMF` | NOT DONE | copy FAC1 to memory location, rounds if asked |
|
||||
| `$BBFC` | `MOVEF` | NOT DONE | copy FAC2 to FAC1 |
|
||||
| `$BC0F` | `MOVFA` | NOT DONE | copy FAC1 to FAC2, skips rounding |
|
||||
| `$BC2B` | `SIGN` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BC2B` | `SIGN` | NOT DONE | evaluate FAC1 sign |
|
||||
| `$BC39` | `SGN` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BC58` | `ABS` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BC5B` | `FCOMP` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BC5B` | `FCOMP` | NOT DONE | compare FAC1 with RAM location |
|
||||
| `$BC9B` | `QINT` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BCCC` | `INT` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BCF3` | `FIN` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BDDD` | `FOUT` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BF71` | `SQR` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BF78` | `FPWR` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BF7B` | `FPWRT` | NOT DONE | XXX - no stub added yet |
|
||||
| `$BFB4` | `NEGOP` | 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) |
|
||||
| `$BFED` | `EXP` | NOT DONE | XXX - no stub added yet |
|
||||
| `$E043` | `POLY1` | NOT DONE | XXX - no stub added yet |
|
||||
| `$E059` | `POLY2` | NOT DONE | XXX - no stub added yet |
|
||||
| `$E264` | `COS` | NOT DONE | XXX - no stub added yet |
|
||||
| `$E26B` | `SIN` | NOT DONE | XXX - no stub added yet |
|
||||
| `$E2B4` | `TAN` | 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 |
|
||||
| `$E264` | `COS` | NOT DONE | cosine of FAC1 in radians |
|
||||
| `$E26B` | `SIN` | NOT DONE | sine of FAC1 in radians |
|
||||
| `$E2B4` | `TAN` | NOT DONE | tangent of FAC1 in radians |
|
||||
| `$E30E` | `ATN` | NOT DONE | XXX - no stub added yet |
|
||||
|
||||
<br />
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - convert FAC1 to 16-bit signed integer
|
||||
//
|
||||
// Input:
|
||||
// - .A - address low byte
|
||||
// - .Y - address high byte
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 105
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
FACINX:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,21 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - subtract FAC1 from RAM
|
||||
//
|
||||
// Input:
|
||||
// - .A - address low byte
|
||||
// - .Y - address high byte
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 112
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
FSUB:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,23 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - subtract FAC1 from FAC2
|
||||
//
|
||||
// Input:
|
||||
// - .A - must load FAC1 exponent ($61) beforehand to set the zero flag
|
||||
//
|
||||
// Note:
|
||||
// - load FAC2 after FAC1, or mimic the Kernals sign comparison
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 112
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
FSUBT:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,21 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - add RAM to FAC1
|
||||
//
|
||||
// Input:
|
||||
// - .A - address low byte
|
||||
// - .Y - address high byte
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 112
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
FADD:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,23 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - add FAC2 to FAC1
|
||||
//
|
||||
// Input:
|
||||
// - .A - must load FAC1 exponent ($61) beforehand to set the zero flag
|
||||
//
|
||||
// Note:
|
||||
// - load FAC2 after FAC1, or mimic the Kernals sign comparison
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 112
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
FADDT:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,24 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - multiplies FAC1 by RAM
|
||||
//
|
||||
// Input:
|
||||
// - .A - address low byte
|
||||
// - .Y - address high byte
|
||||
//
|
||||
// Note:
|
||||
// - C64 Wiki calls it FMULT, this looks like a mistake
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 113
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
FMUL:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,23 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - multiplies FAC1 by FAC2
|
||||
//
|
||||
// Input:
|
||||
// - .A - must load FAC1 exponent ($61) beforehand to set the zero flag
|
||||
//
|
||||
// Note:
|
||||
// - load FAC2 after FAC1, or mimic the Kernals sign comparison
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 113 XXX address does not match
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
FMULT:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - multiply FAC1 by 10
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 114
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
MUL10:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,21 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - divide FAC1 by 10, result is always positive
|
||||
//
|
||||
// Notes:
|
||||
// - shifts FAC1 to FAC2, loads FAC1 with the constant 10, falls through to the division routine
|
||||
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 114
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
DIV10:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,21 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - divide RAM by FAC1
|
||||
//
|
||||
// Input:
|
||||
// - .A - address low byte
|
||||
// - .Y - address high byte
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 114
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
FDIV:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,23 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - divide FAC2 by FAC1, ignores sign
|
||||
//
|
||||
// Input:
|
||||
// - .A - must load FAC1 exponent ($61) beforehand to set the zero flag
|
||||
//
|
||||
// Output:
|
||||
// - leaves the quotient FAC1 and the remainder in FAC2
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 114
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
FDIVT:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,20 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - evaluate FAC1 sign
|
||||
//
|
||||
// Output:
|
||||
// - .A - $00 for equal, $01 for FAC1 > RAM, $FF for FAC1 < RAM
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 115
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
SIGN:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,28 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - compare FAC1 with RAM location
|
||||
//
|
||||
// Input:
|
||||
// - .A - address low byte
|
||||
// - .Y - address high byte
|
||||
//
|
||||
// Output:
|
||||
// - .A - $00 for equal, $01 for FAC1 > RAM, $FF for FAC1 < RAM
|
||||
// - flags N/Z, depending on whether FAC1 is 0, positive, or negative
|
||||
//
|
||||
// Notes:
|
||||
// - uses vector at $24, leaves FAC1 and FAC2 unchanged (Codebase64)
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 115
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
FCOMP:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,21 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - set FAC1 as RAM raised to the power of FAC1
|
||||
//
|
||||
// Input:
|
||||
// - .A - address low byte
|
||||
// - .Y - address high byte
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 117 (FPWRT)
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
FPWR:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,24 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - set FAC1 as FAC2 raised to the power of FAC1
|
||||
//
|
||||
// Input:
|
||||
// - .A - must load FAC1 exponent ($61) beforehand to set the zero flag
|
||||
//
|
||||
// Note:
|
||||
// - load FAC2 after FAC1, or mimic the Kernals sign comparison
|
||||
// - uses exp(x*log(y)) formula to calculate y^x; slow and inaccurate
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 117
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
FPWRT:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,16 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - toggle FAC1 sign (if not 0)
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 117
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
NEGOP:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,27 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - evaluate polynomial with odd powers only for FAC1 value
|
||||
//
|
||||
// Input:
|
||||
// - .A - table address low byte
|
||||
// - .Y - table address low byte
|
||||
// - table format:
|
||||
// - polynomial degree (8 bit integer)
|
||||
// - oefficients (floats), starting from highest degree, times 1+degree
|
||||
//
|
||||
// Notes:
|
||||
// - calls POLY2(table, X*X)*X
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 206
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://www.c64-wiki.com/wiki/POLY1
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
POLY1:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,27 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - evaluate polynomial with odd and even powers for FAC1 value
|
||||
//
|
||||
// Input:
|
||||
// - .A - table address low byte
|
||||
// - .Y - table address low byte
|
||||
// - table format:
|
||||
// - polynomial degree (8 bit integer)
|
||||
// - oefficients (floats), starting from highest degree, times 1+degree
|
||||
//
|
||||
// Notes:
|
||||
// - uses Horner method
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 207
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://www.c64-wiki.com/wiki/POLY1
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
POLY2:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - cosine of FAC1 in radians
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 210
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
COS:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - sine of FAC1 in radians
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 210 - XXX address does not match
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
SIN:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
@@ -0,0 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - tangent of FAC1 in radians
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 210
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
TAN:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
XXX - try to find real-life example
|
||||
Reference in new issue
Block a user