Add FINLOG
This commit is contained in:
1 parent
9d385f7aa6
commit
a5d92887c2
6 files changed
+42
-11
No files matched your search
@@ -50,11 +50,8 @@ FIN_loop:
|
||||
sbc #48 ; Convert to number
|
||||
sta FIN_DIGIT
|
||||
jsr mul10_FAC1
|
||||
jsr mov_FAC1_FAC2
|
||||
lda FIN_DIGIT
|
||||
jsr convert_A_to_FAC1
|
||||
jsr add_FAC2_FAC1
|
||||
|
||||
jsr FINLOG
|
||||
lda FIN_DECFOUND ; Have we passed the decimal sign?
|
||||
bpl FIN_next
|
||||
inc FIN_NUMDEC
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
;
|
||||
; Math package - add an ASCII digit in A that has been converted to a signed integer to FAC1
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 113
|
||||
;
|
||||
|
||||
FINLOG:
|
||||
pha
|
||||
jsr mov_FAC1_FAC2
|
||||
pla
|
||||
jsr convert_A_to_FAC1
|
||||
jsr add_FAC2_FAC1
|
||||
rts
|
||||
@@ -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