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,19 @@
|
||||
|
||||
//
|
||||
// Helper aliases to make the code more readable
|
||||
// Always use double underscore in label names
|
||||
// to allow automatic VICE label conflict prevention
|
||||
//
|
||||
|
||||
// Temporary variables for various routines
|
||||
.label __tokenise_work1 = $07 // CHARAC
|
||||
.label __tokenise_work2 = $08 // ENDCHR
|
||||
.label __tokenise_work3 = $0B // COUNT
|
||||
.label __tokenise_work4 = $0F // GARBFL
|
||||
.label __tokenise_work5 = $0C // DIMFLG
|
||||
|
||||
// We re-use FAC2 for memory move pointers, since
|
||||
// we can't be doing calculations while moving memory
|
||||
.label __memmove_src = $69
|
||||
.label __memmove_dst = $6B
|
||||
.label __memmove_size = $6D
|
||||
@@ -0,0 +1,50 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# M65 BASIC_0 #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// Routines imported from Kernal - our private API
|
||||
|
||||
#if ROM_LAYOUT_STD
|
||||
#import "KERNAL_combined.sym"
|
||||
#else
|
||||
#import "KERNAL_0_combined.sym"
|
||||
#endif
|
||||
|
||||
|
||||
.function KERNAL()
|
||||
{
|
||||
#if ROM_LAYOUT_STD
|
||||
.return KERNAL
|
||||
#else
|
||||
.return KERNAL_0
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#if ROM_LAYOUT_M65
|
||||
.label map_end = KERNAL().map_end
|
||||
.label map_NORMAL = KERNAL().map_NORMAL
|
||||
#endif
|
||||
|
||||
#if CONFIG_PANIC_SCREEN
|
||||
.label panic = KERNAL().panic
|
||||
#endif
|
||||
|
||||
.label hw_entry_reset = KERNAL().hw_entry_reset
|
||||
|
||||
#if CONFIG_DBG_PRINTF
|
||||
.label printf = KERNAL().printf
|
||||
#endif
|
||||
|
||||
.label plot_set = KERNAL().plot_set
|
||||
.label print_hex_byte = KERNAL().print_hex_byte
|
||||
.label print_return = KERNAL().print_return
|
||||
.label print_space = KERNAL().print_space
|
||||
|
||||
#if CONFIG_TAPE_HEAD_ALIGN
|
||||
.label tape_head_align = KERNAL().tape_head_align
|
||||
#endif
|
||||
|
||||
.label filename_any = KERNAL().filename_any
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
This address is called at least by the Simon's BASIC cartridge.
|
||||
@@ -0,0 +1,10 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
REASON:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
This routine is probably used by many cartridges and other software to initialize parts of the system. At least the UCart uses it - see here:
|
||||
- https://www.elektroda.pl/rtvforum/topic3293027.html
|
||||
@@ -0,0 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,16 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
|
||||
MAIN:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
|
||||
|
||||
CHRNCH:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,9 @@
|
||||
All the BASIC routines, for which there are vectors in $0300-$030B, have to be available at their original addresses.
|
||||
|
||||
Reason: some autostart software (https://codebase64.org/doku.php?id=base:autostarting_disk_files) override these vectors, so that some point
|
||||
to new locations (usually Kernal related), while others points the original BASIC routines. Different techniques modify different vectors
|
||||
(while resetting others to original C64 locations), some don't change the vectors at all, but might still put the original
|
||||
C64 BASIC addresses there.
|
||||
|
||||
For various cartridges this just means disabling their extensions (like new commands); for us that would mean improperly functionning BASIC.
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
This routine is probably used by many cartridges and other software to initialize parts of the system. At least the UCart uses it - see here:
|
||||
- https://www.elektroda.pl/rtvforum/topic3293027.html
|
||||
@@ -0,0 +1,10 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and real implementation
|
||||
|
||||
new:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,6 @@
|
||||
This routine is used to launch other software. It is used by:
|
||||
|
||||
- Exomizer (see https://github.com/bitshifters/exomizer/blob/master/exomizer/exomizer115.txt)
|
||||
- FileBrowser64 (FB64) - found by debugging
|
||||
|
||||
and probably others.
|
||||
@@ -0,0 +1,12 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
// see: https://www.lemon64.com/forum/viewtopic.php?t=64721&sid=bc400a5a6d404f8f092e4d32a92f5de7
|
||||
// https://www.lemon64.com/forum/viewtopic.php?t=70680&sid=3ff66caf7f5fdf2a3c2ff2ee31fc3fd8
|
||||
|
||||
setcharptr:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,9 @@
|
||||
All the BASIC routines, for which there are vectors in $0300-$030B, have to be available at their original addresses.
|
||||
|
||||
Reason: some autostart software (https://codebase64.org/doku.php?id=base:autostarting_disk_files) override these vectors, so that some point
|
||||
to new locations (usually Kernal related), while others points the original BASIC routines. Different techniques modify different vectors
|
||||
(while resetting others to original C64 locations), some don't change the vectors at all, but might still put the original
|
||||
C64 BASIC addresses there.
|
||||
|
||||
For various cartridges this just means disabling their extensions (like new commands); for us that would mean improperly functionning BASIC.
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
|
||||
|
||||
QPLOP:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 70, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
|
||||
|
||||
GONE:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,9 @@
|
||||
All the BASIC routines, for which there are vectors in $0300-$030B, have to be available at their original addresses.
|
||||
|
||||
Reason: some autostart software (https://codebase64.org/doku.php?id=base:autostarting_disk_files) override these vectors, so that some point
|
||||
to new locations (usually Kernal related), while others points the original BASIC routines. Different techniques modify different vectors
|
||||
(while resetting others to original C64 locations), some don't change the vectors at all, but might still put the original
|
||||
C64 BASIC addresses there.
|
||||
|
||||
For various cartridges this just means disabling their extensions (like new commands); for us that would mean improperly functionning BASIC.
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 70, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
|
||||
|
||||
EVAL:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,9 @@
|
||||
All the BASIC routines, for which there are vectors in $0300-$030B, have to be available at their original addresses.
|
||||
|
||||
Reason: some autostart software (https://codebase64.org/doku.php?id=base:autostarting_disk_files) override these vectors, so that some point
|
||||
to new locations (usually Kernal related), while others points the original BASIC routines. Different techniques modify different vectors
|
||||
(while resetting others to original C64 locations), some don't change the vectors at all, but might still put the original
|
||||
C64 BASIC addresses there.
|
||||
|
||||
For various cartridges this just means disabling their extensions (like new commands); for us that would mean improperly functionning BASIC.
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
basic_adray1:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,8 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
basic_adray2:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,16 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
//
|
||||
// Official BASIC routine, described in:
|
||||
//
|
||||
// - [RG64] C64 Programmers Reference Guide - XXX
|
||||
// - [CM64] Computes Mapping the Commodore 64 - page 69, XXX
|
||||
//
|
||||
// CPU registers that has to be preserved (see [RG64]): XXX
|
||||
//
|
||||
|
||||
|
||||
ERROR:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,9 @@
|
||||
All the BASIC routines, for which there are vectors in $0300-$030B, have to be available at their original addresses.
|
||||
|
||||
Reason: some autostart software (https://codebase64.org/doku.php?id=base:autostarting_disk_files) override these vectors, so that some point
|
||||
to new locations (usually Kernal related), while others points the original BASIC routines. Different techniques modify different vectors
|
||||
(while resetting others to original C64 locations), some don't change the vectors at all, but might still put the original
|
||||
C64 BASIC addresses there.
|
||||
|
||||
For various cartridges this just means disabling their extensions (like new commands); for us that would mean improperly functionning BASIC.
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
INIT:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -0,0 +1,3 @@
|
||||
This routine is mentionned in the cartridge writing tutorial here: https://codebase64.org/doku.php?id=base:assembling_your_own_cart_rom_image
|
||||
|
||||
We have to implement (or at least provide stub), otherwise cartridges will crash.
|
||||
@@ -0,0 +1,3 @@
|
||||
This routine is mentionned in the cartridge writing tutorial here: https://codebase64.org/doku.php?id=base:assembling_your_own_cart_rom_image
|
||||
|
||||
We have to implement (or at least provide stub), otherwise cartridges will crash.
|
||||
@@ -0,0 +1,9 @@
|
||||
// #LAYOUT# STD * #TAKE
|
||||
// #LAYOUT# * BASIC_0 #TAKE
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
// XXX provide documentation and implementation
|
||||
|
||||
RVECT:
|
||||
STUB_IMPLEMENTATION()
|
||||
@@ -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
|
||||
@@ -0,0 +1,7 @@
|
||||
This routine is used to launch other software. It is used by:
|
||||
|
||||
- Uncrunch (see https://github.com/mist64/pucrunch/blob/master/uncrunch.asm)
|
||||
- FileBrowser64 (FB64) - found by debugging
|
||||
|
||||
and probably others.
|
||||
|
||||
Loaded 100 of 697 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user