more sane directory name, updated binaries
This commit is contained in:
1 parent
d4d32095d1
commit
76aaf298b8
697 files changed
+56
-56
No files matched your search
@@ -0,0 +1,22 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #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()
|
||||
@@ -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,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing this routine:
|
||||
- https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/c64flt.p8
|
||||
@@ -0,0 +1,18 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #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()
|
||||
@@ -0,0 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #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()
|
||||
@@ -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,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# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #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()
|
||||
@@ -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# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #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()
|
||||
@@ -0,0 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #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()
|
||||
@@ -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# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #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,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing this routine:
|
||||
- https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/c64flt.p8
|
||||
@@ -0,0 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - XXX
|
||||
//
|
||||
// See also:
|
||||
// - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
|
||||
//
|
||||
|
||||
// XXX implement, test
|
||||
|
||||
convert_FAC1_to_s16:
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
It's a part oof the ACME assembler SDK, see:
|
||||
- https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
|
||||
@@ -0,0 +1,21 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - 16-bit signed integer to FAC1
|
||||
//
|
||||
// Output:
|
||||
// - .A - address high byte (XXX really, not the opposite?)
|
||||
// - .Y - address low byte
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 107
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
GIVAYF:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example codoe utilizing this routine:
|
||||
- https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/c64flt.p8
|
||||
@@ -0,0 +1,16 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #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()
|
||||
@@ -0,0 +1,5 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing this routine:
|
||||
- https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/c64flt.p8
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - XXX
|
||||
//
|
||||
// - https://sta.c64.org/cbm64basconv.html
|
||||
//
|
||||
// XXX add name, label, documentation, implement, test
|
||||
|
||||
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# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - imports string to FAC1 - XXX: what about spaces?
|
||||
//
|
||||
// Input:
|
||||
// - .A needs to be loaded with string length
|
||||
// - string address in $22/$23
|
||||
//
|
||||
// See also:
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
STRVAL:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing this routine:
|
||||
- https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/c64flt.p8
|
||||
@@ -0,0 +1,20 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #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()
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing this routine:
|
||||
- https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/c64flt.p8
|
||||
@@ -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# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #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()
|
||||
@@ -0,0 +1,5 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing this routine:
|
||||
- https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/c64flt.p8
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - natural logarigthm
|
||||
//
|
||||
//
|
||||
// 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
|
||||
|
||||
log_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - XXX
|
||||
//
|
||||
// See also:
|
||||
// - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
|
||||
//
|
||||
|
||||
// XXX implement, test
|
||||
|
||||
get_FAC2_via_INDEX:
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
It's a part oof the ACME assembler SDK, see:
|
||||
- https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
|
||||
@@ -0,0 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - XXX
|
||||
//
|
||||
// See also:
|
||||
// - https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
|
||||
//
|
||||
|
||||
// XXX implement, test
|
||||
|
||||
get_FAC1_via_INDEX:
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
It's a part oof the ACME assembler SDK, see:
|
||||
- https://sourceforge.net/p/acme-crossass/code-0/38/tree/trunk/ACME_Lib/cbm/c64/float.a?force=True
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing this routine:
|
||||
- https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/c64flt.p8
|
||||
@@ -0,0 +1,21 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - evaluate FAC1 sign, to FAC1
|
||||
//
|
||||
// Output:
|
||||
// - FAC1 - 0 for FAC1 equal 0, 1 for FAC1 > 0, -1 for FAC1 < 0
|
||||
//
|
||||
// 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
|
||||
|
||||
sgn_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,14 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #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()
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing this routine:
|
||||
- https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/c64flt.p8
|
||||
@@ -0,0 +1,13 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #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()
|
||||
@@ -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,18 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - absolute value
|
||||
//
|
||||
// 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
|
||||
|
||||
abs_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing this routine:
|
||||
- https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/c64flt.p8
|
||||
@@ -0,0 +1,29 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #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,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing this routine:
|
||||
- https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/c64flt.p8
|
||||
@@ -0,0 +1,20 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - convert FAC1 to 32 bit signed integer
|
||||
//
|
||||
// Output:
|
||||
// - $62-$65, big-endian order
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 115
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
QINT:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing this routine:
|
||||
- https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/c64flt.p8
|
||||
@@ -0,0 +1,18 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - rounds away the decimal to make an integer
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 116
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
int_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing this routine:
|
||||
- https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/c64flt.p8
|
||||
@@ -0,0 +1,24 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - imports string to FAC1, ignores spaces
|
||||
//
|
||||
//
|
||||
// Input:
|
||||
// - .A needs to be loaded with first char of the string
|
||||
// - Carry flag must be clear
|
||||
// - string address in $7A/$7B
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 116
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
FIN:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing the routine:
|
||||
- https://www.lemon64.com/forum/viewtopic.php?t=67576&sid=d41e77cdddd28d6f9c9d52ce5b4e8dc3
|
||||
@@ -0,0 +1,18 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #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()
|
||||
@@ -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,22 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - outputs FAC1 to string at $0100
|
||||
//
|
||||
// Output:
|
||||
// - .A - address low byte
|
||||
// - .Y - address high byte
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 116
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
FOUT:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing the routine:
|
||||
- https://www.lemon64.com/forum/viewtopic.php?t=67576&sid=d41e77cdddd28d6f9c9d52ce5b4e8dc3
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing this routine:
|
||||
- https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/c64flt.p8
|
||||
@@ -0,0 +1,21 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - square root of FAC2
|
||||
//
|
||||
// Note:
|
||||
// - loads .5 into FAC1 and falling through to the exponentiation routine
|
||||
//
|
||||
// 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
|
||||
|
||||
sqr_FAC2:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing this routine:
|
||||
- https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/c64flt.p8
|
||||
@@ -0,0 +1,25 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #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 (XXX do we need it?)
|
||||
// - 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
|
||||
|
||||
pwr_FAC2_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,19 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - exponential function, e raised to FAC1 power
|
||||
//
|
||||
//
|
||||
// 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
|
||||
|
||||
exp_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Example code utilizing this routine:
|
||||
- https://github.com/irmen/prog8/blob/master/compiler/res/prog8lib/c64flt.p8
|
||||
@@ -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_FAC1:
|
||||
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_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -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,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Usage example:
|
||||
- https://www.lemon64.com/forum/viewtopic.php?t=10492
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Usage example:
|
||||
- https://www.lemon64.com/forum/viewtopic.php?t=10492
|
||||
@@ -0,0 +1,28 @@
|
||||
// #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_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
|
||||
poly_sin:
|
||||
|
||||
.byte $05 // series length - 1
|
||||
|
||||
put_const_POLY_SIN_1()
|
||||
put_const_POLY_SIN_2()
|
||||
put_const_POLY_SIN_3()
|
||||
put_const_POLY_SIN_4()
|
||||
put_const_POLY_SIN_5()
|
||||
put_const_POLY_SIN_6()
|
||||
@@ -0,0 +1,4 @@
|
||||
This is an important floating point math routine, documented in many places.
|
||||
|
||||
Usage example:
|
||||
- https://www.lemon64.com/forum/viewtopic.php?t=10492
|
||||
@@ -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_FAC1:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Math package - arc tangent of FAC1
|
||||
//
|
||||
// See also:
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 211
|
||||
// - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
//
|
||||
|
||||
// XXX provide implementation
|
||||
|
||||
atn_FAC1:
|
||||
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