implemented another batch of small floating point routiines

This commit is contained in:
FeralChild64 committed 2020-02-27 17:03:55 +01:00
1 parent 4a510d78fd
commit 6f7e099004
12 files changed
+39 -23

No files matched your search

@@ -21,5 +21,5 @@
// XXX provide implementation
FPWRT:
pwr_FAC2_FAC1:
STUB_IMPLEMENTATION()
@@ -9,8 +9,9 @@
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 112
// XXX implement
add_HALF_FAC1:
STUB_IMPLEMENTATION()
ldy #>const_HALF
lda #<const_HALF
jmp add_MEM_FAC1
File renamed without changes.
@@ -16,7 +16,14 @@
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
// XXX provide implementation
// XXX test this
div10_FAC1_p:
STUB_IMPLEMENTATION()
lda #$00
sta FAC1_sign
ldy #>const_TEN
lda #<const_TEN
jmp div_MEM_FAC1
File renamed without changes.
File renamed without changes.
@@ -15,7 +15,12 @@
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
// XXX provide implementation
sgn_FAC1_A:
STUB_IMPLEMENTATION()
lda FAC1_exponent
beq !+
lda FAC1_sign
bne !+
lda #$01
!:
rts
File renamed without changes.
@@ -15,7 +15,8 @@
// - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
//
// XXX provide implementation
sqr_FAC1:
STUB_IMPLEMENTATION()
jsr mov_FAC1_FAC2
// FALLLTROUGH to sqr_FAC2
File renamed without changes.
@@ -4,7 +4,7 @@
// #LAYOUT# * * #IGNORE
//
// Math package - set FAC1 as RAM raised to the power of FAC1
// Math package - set FAC1 as RAM raised to the power of FAC2
//
// Input:
// - .A - address low byte
@@ -12,11 +12,13 @@
//
// See also:
// - [CM64] Computes Mapping the Commodore 64 - page 117 (FPWRT)
// - https://www.c64-wiki.com/wiki/BASIC-ROM
// - 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_MEM:
FPWR:
STUB_IMPLEMENTATION()
jsr mov_MEM_FAC1
// FALLTROUGH to pwr_FAC2_FAC1