implemented few trivial math routines

This commit is contained in:
FeralChild64 committed 2020-01-29 19:18:59 +01:00
1 parent 9de9a6c0a7
commit 2d1d7ee0b4
10 files changed
+21 -16

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
// #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
//
FSUB:
jsr CONUPK
// FALLTROUGH to FSUBT
+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
+22
View File
@@ -0,0 +1,22 @@
// #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
//
FADD:
jsr CONUPK
// FALLTROUGH to FADDT
+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
+25
View File
@@ -0,0 +1,25 @@
// #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
//
FMUL:
jsr CONUPK
// FALLTROUGH to FMULT
+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
+22
View File
@@ -0,0 +1,22 @@
// #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
//
FDIV:
jsr CONUPK
// FALLTROUGH to FDIVT
+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