added more floating point stubs

This commit is contained in:
FeralChild64 committed 2020-02-05 19:16:10 +01:00
1 parent d5f6f1924e
commit 377b217aec
33 files changed
+366 -48

No files matched your search

+64 -48
View File
@@ -174,54 +174,70 @@ Floating point mathematical routines - not official, but well known and broadly
<br />
| Address | Name | Status | Remarks |
| :-------: | :-------------------- | :------: | :------------------------------------------------: |
| `$B1AA` | `FACINX` | NOT DONE | convert FAC1 to 16-bit signed integer |
| `$B391` | `GIVAYF` | NOT DONE | 16-bit signed integer to FAC1 |
| `$B7B5` | `STRVAL` | NOT DONE | imports string to FAC1 |
| `$B850` | `sub_MEM_FAC1` | PARTIAL | needs `add_FAC2_FAC1` |
| `$B853` | `sub_FAC2_FAC1` | PARTIAL | needs `add_FAC2_FAC1` |
| `$B862` | `add_align_exponents` | PARTIAL | not tested yet |
| `$B867` | `add_MEM_FAC1` | PARTIAL | needs `add_FAC2_FAC1` |
| `$B86A` | `add_FAC2_FAC1` | NOT DONE | |
| `$B8FE` | `normal_FAC1` | PARTIAL | not tested yet |
| `$B9EA` | `log_FAC1` | NOT DONE | |
| `$BA28` | `mul_MEM_FAC1` | PARTIAL | needs `mul_FAC2_FAC1` |
| `$BA2B` | `mul_FAC2_FAC1` | NOT DONE | |
| `$BA8C` | `mov_MEM_FAC2` | PARTIAL | not fully tested yet |
| `$BAE2` | `mul10_FAC1` | NOT DONE | |
| `$BAFE` | `div10_FAC1_p` | NOT DONE | |
| `$BB0F` | `div_MEM_FAC1` | PARTIAL | needs `div_FAC2_FAC1` |
| `$BB12` | `div_FAC2_FAC1` | NOT DONE | |
| `$BBA2` | `mov_MEM_FAC1` | PARTIAL | not fully tested yet |
| `$BBC7` | `mov_r_FAC1_TMP2` | PARTIAL | not fully tested yet |
| `$BBCA` | `mov_r_FAC1_TMP1` | PARTIAL | not fully tested yet |
| `$BBD0` | `mov_r_FAC1_VAR` | PARTIAL | not fully tested yet |
| `$BBD4` | `mov_r_FAC1_MEM` | PARTIAL | not fully tested yet |
| `$BBFC` | `mov_FAC2_FAC1` | PARTIAL | not fully tested yet |
| `$BC0C` | `mov_r_FAC1_FAC2` | PARTIAL | not fully tested yet |
| `$BC0F` | `mov_FAC1_FAC2` | DONE | |
| `$BC1B` | `round_FAC1` | PARTIAL | not fully tested yet |
| `$BC2B` | `sgn_FAC1_A` | NOT DONE | |
| `$BC39` | `sgn_FAC1` | NOT DONE | |
| `$BC58` | `abs_FAC1` | NOT DONE | |
| `$BC5B` | `FCOMP` | NOT DONE | compare FAC1 with RAM location |
| `$BC9B` | `QINT` | NOT DONE | convert FAC1 to 32 bit signed integer |
| `$BCCC` | `int_FAC1` | NOT DONE | |
| `$BCF3` | `FIN` | NOT DONE | imports string to FAC1, ignores spaces |
| `$BDDD` | `FOUT` | NOT DONE | outputs FAC1 to string at $0100 |
| `$BF71` | `sqr_FAC1` | NOT DONE | |
| `$BF74` | `sqr_FAC2` | NOT DONE | |
| `$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` | `toggle_sign_FAC1` | DONE | |
| `$BFED` | `exp_FAC1` | NOT DONE | |
| `$E043` | `poly1_FAC1` | NOT DONE | |
| `$E059` | `poly2_FAC1` | NOT DONE | |
| `$E264` | `cos_FAC1` | NOT DONE | |
| `$E26B` | `sin_FAC1` | NOT DONE | |
| `$E2B4` | `tan_FAC1` | NOT DONE | |
| `$E30E` | `atn_FAC1` | NOT DONE | |
| Address | Name | Status | Remarks |
| :-------: | :--------------------- | :------: | :------------------------------------------------: |
| `$A9C4` | `convert_FAC1_to_INT` | NOT DONE | |
| `$AABC` | `print_FAC1` | NOT DONE | |
| `$AF7B` | `compute_TI` | NOT DONE | |
| `$AF7E` | not named yet | NOT DONE | |
| `$AF87` | not named yet | NOT DONE | |
| `$AF9A` | `compute_ST` | NOT DONE | |
| `$B1AA` | `FACINX` | NOT DONE | convert FAC1 to 16-bit signed integer |
| `$B391` | `GIVAYF` | NOT DONE | 16-bit signed integer to FAC1 |
| `$B3A2` | `convert_Y_to_FAC1` | NOT DONE | |
| `$B794` | `convert_A_to_FAC1` | NOT DONE | |
| `$B7B5` | `STRVAL` | NOT DONE | imports string to FAC1 |
| `$B7F7` | `convert_FAC1_to_ADDR` | NOT DONE | |
| `$B849` | `add_HALF_FAC1` | NOT DONE | |
| `$B850` | `sub_MEM_FAC1` | PARTIAL | needs `add_FAC2_FAC1` |
| `$B853` | `sub_FAC2_FAC1` | PARTIAL | needs `add_FAC2_FAC1` |
| `$B862` | `add_align_exponents` | PARTIAL | not tested yet |
| `$B867` | `add_MEM_FAC1` | PARTIAL | needs `add_FAC2_FAC1` |
| `$B86A` | `add_FAC2_FAC1` | NOT DONE | |
| `$B8FE` | `normal_FAC1` | PARTIAL | not tested yet |
| `$B947` | `inv_FAC1_mantissa` | NOT DONE | |
| `$B983` | `MULSHF` | NOT DONE | |
| `$B9EA` | `log_FAC1` | NOT DONE | |
| `$BA28` | `mul_MEM_FAC1` | PARTIAL | needs `mul_FAC2_FAC1` |
| `$BA2B` | `mul_FAC2_FAC1` | NOT DONE | |
| `$BA59` | `MLTPLY` | NOT DONE | |
| `$BA8C` | `mov_MEM_FAC2` | PARTIAL | not fully tested yet |
| `$BAE2` | `mul10_FAC1` | NOT DONE | |
| `$BAFE` | `div10_FAC1_p` | NOT DONE | |
| `$BB0F` | `div_MEM_FAC1` | PARTIAL | needs `div_FAC2_FAC1` |
| `$BB12` | `div_FAC2_FAC1` | NOT DONE | |
| `$BBA2` | `mov_MEM_FAC1` | PARTIAL | not fully tested yet |
| `$BBC7` | `mov_r_FAC1_TMP2` | PARTIAL | not fully tested yet |
| `$BBCA` | `mov_r_FAC1_TMP1` | PARTIAL | not fully tested yet |
| `$BBD0` | `mov_r_FAC1_VAR` | PARTIAL | not fully tested yet |
| `$BBD4` | `mov_r_FAC1_MEM` | PARTIAL | not fully tested yet |
| `$BBFC` | `mov_FAC2_FAC1` | PARTIAL | not fully tested yet |
| `$BC0C` | `mov_r_FAC1_FAC2` | PARTIAL | not fully tested yet |
| `$BC0F` | `mov_FAC1_FAC2` | DONE | |
| `$BC1B` | `round_FAC1` | PARTIAL | not fully tested yet |
| `$BC2B` | `sgn_FAC1_A` | NOT DONE | |
| `$BC39` | `sgn_FAC1` | NOT DONE | |
| `$BC3C` | `convert_A_to_FAC1` | NOT DONE | |
| `$BC44` | `convert_i16_to_FAC1` | NOT DONE | |
| `$BC58` | `abs_FAC1` | NOT DONE | |
| `$BC5B` | `FCOMP` | NOT DONE | compare FAC1 with RAM location |
| `$BC9B` | `QINT` | NOT DONE | convert FAC1 to 32 bit signed integer |
| `$BCCC` | `int_FAC1` | NOT DONE | |
| `$BCF3` | `FIN` | NOT DONE | imports string to FAC1, ignores spaces |
| `$BD7E` | `FINLOG` | NOT DONE | |
| `$BDDD` | `FOUT` | NOT DONE | outputs FAC1 to string at $0100 |
| `$BF71` | `sqr_FAC1` | NOT DONE | |
| `$BF74` | `sqr_FAC2` | NOT DONE | |
| `$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` | `toggle_sign_FAC1` | DONE | |
| `$BFED` | `exp_FAC1` | NOT DONE | |
| `$E043` | `poly1_FAC1` | NOT DONE | |
| `$E059` | `poly2_FAC1` | NOT DONE | |
| `$E264` | `cos_FAC1` | NOT DONE | |
| `$E26B` | `sin_FAC1` | NOT DONE | |
| `$E2B4` | `tan_FAC1` | NOT DONE | |
| `$E30E` | `atn_FAC1` | NOT DONE | |
<br />
@@ -0,0 +1,21 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Math package - subtract FAC1 to integer in memory
//
// Output:
// - integer pointed by $49/$4A
//
// See also:
// - https://sta.c64.org/cbm64basconv.html
// - https://www.c64-wiki.com/wiki/BASIC-ROM
//
// XXX implement, test
convert_FAC1_to_INT:
STUB_IMPLEMENTATION()
+3
View File
@@ -0,0 +1,3 @@
This is an important floating point math routine, documented in many places.
XXX - try to find real-life example
+3
View File
@@ -0,0 +1,3 @@
This is an important floating point math routine, documented in many places.
XXX - try to find real-life example
+17
View File
@@ -0,0 +1,17 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Math package - print FAC1 value
//
// See also:
// - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
//
// XXX implement, test
print_FAC1:
STUB_IMPLEMENTATION()
+16
View File
@@ -0,0 +1,16 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Math package - compute TI value
//
// See also:
// - https://www.c64-wiki.com/wiki/BASIC-ROM
//
// XXX implement, test
compute_TI:
STUB_IMPLEMENTATION()
+3
View File
@@ -0,0 +1,3 @@
This is an important floating point math routine, documented in many places.
XXX - try to find real-life example
+3
View File
@@ -0,0 +1,3 @@
This is an important floating point math routine, documented in many places.
XXX - try to find real-life example
+14
View File
@@ -0,0 +1,14 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Math package - sets mantissa to 00yyxxaa
//
// See also:
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
// XXX add name, label, implement, test
STUB_IMPLEMENTATION()
+3
View File
@@ -0,0 +1,3 @@
This is an important floating point math routine, documented in many places.
XXX - try to find real-life example
+14
View File
@@ -0,0 +1,14 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Math package - set rest of FAC1 and JMP to $b8d2
//
// See also:
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
// XXX add name, label, implement, test
STUB_IMPLEMENTATION()
+16
View File
@@ -0,0 +1,16 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Math package - compute ST value
//
// See also:
// - https://www.c64-wiki.com/wiki/BASIC-ROM
//
// XXX implement, test
compute_ST:
STUB_IMPLEMENTATION()
+3
View File
@@ -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,15 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Math package - XXX
//
// - https://www.c64-wiki.com/wiki/BASIC-ROM
// - https://sta.c64.org/cbm64basconv.html
// - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
// XXX add name, label, documentation, implement, test
STUB_IMPLEMENTATION()
+3
View File
@@ -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,12 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Math package - XXX
//
// - https://sta.c64.org/cbm64basconv.html
//
// XXX add name, label, documentation, implement, test
STUB_IMPLEMENTATION()
+3
View File
@@ -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,19 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Math package - subtract FAC1 to memory address at $14/$15 and Y/A
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 112
// - https://sta.c64.org/cbm64basconv.html
// - https://www.c64-wiki.com/wiki/BASIC-ROM
//
// XXX implement, test
convert_FAC1_to_ADDR:
STUB_IMPLEMENTATION()
+3
View File
@@ -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,15 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Math package - add 0.5 to FAC1
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 112
// XXX implement
add_HALF_FAC1:
STUB_IMPLEMENTATION()
+3
View File
@@ -0,0 +1,3 @@
This is an important floating point math routine, documented in many places.
XXX - try to find real-life example
+3
View File
@@ -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,19 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Math package - invert FAC1 mantissa
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 113
// - https://www.c64-wiki.com/wiki/BASIC-ROM
// - https://sta.c64.org/cbm64basconv.html
//
// XXX implement, test
inv_FAC1_mantissa:
STUB_IMPLEMENTATION()
+17
View File
@@ -0,0 +1,17 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Math package - SHIFT routine
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 113
//
// XXX implement, test
MULSHF:
STUB_IMPLEMENTATION()
+3
View File
@@ -0,0 +1,3 @@
This is an important floating point math routine, documented in many places.
XXX - try to find real-life example
+17
View File
@@ -0,0 +1,17 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Math package - add a mantissa byte of FAC2 to FAC1, do it .A times
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 113
//
// XXX implement, test
MULTPLY:
STUB_IMPLEMENTATION()
+3
View File
@@ -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,13 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Math package - XXX
//
// - https://codebase64.org/doku.php?id=base:asm_include_file_for_basic_routines
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
// XXX add name, label, documentation, implement, test
STUB_IMPLEMENTATION()
+3
View File
@@ -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,12 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Math package - XXX
//
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
// XXX add name, label, documentation, implement, test
STUB_IMPLEMENTATION()
+3
View File
@@ -0,0 +1,3 @@
This is an important floating point math routine, documented in many places.
XXX - try to find real-life example
+17
View File
@@ -0,0 +1,17 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Math package - add an ASCII digit that has been converted to a signed integer to FAC1
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 113
//
// XXX implement, test
FINLOG:
STUB_IMPLEMENTATION()
+3
View File
@@ -0,0 +1,3 @@
This is an important floating point math routine, documented in many places.
XXX - try to find real-life example