Add get_FAC1_via_INDEX
Also change to only use bit 7 as sign in FAC1 and FAC2 (as the original BASIC does) to simplify implementations.
This commit is contained in:
1 parent
919f3c84b9
commit
5a3f65efa4
18 files changed
+130
-134
No files matched your search
@@ -0,0 +1,30 @@
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
|
||||
; Math package - fetch FAC1 from RAM location
|
||||
;
|
||||
; Input:
|
||||
; - .A - address low byte
|
||||
; - .Y - address high byte
|
||||
;
|
||||
; Output:
|
||||
; - .A - FAC1 exponent, affects status flags
|
||||
; - .Y - always 0
|
||||
;
|
||||
; Preserves:
|
||||
; - .X - (experimentation with original ROM)
|
||||
;
|
||||
; See also:
|
||||
; - https://www.c64-wiki.com/wiki/Floating_point_arithmetic
|
||||
; - https://codebase64.org/doku.php?id=base:kernal_floating_point_mathematics
|
||||
|
||||
|
||||
|
||||
mov_MEM_FAC1:
|
||||
sty INDEX+1
|
||||
sta INDEX+0
|
||||
|
||||
; FALLTHROUGH to get_FAC1_via_INDEX
|
||||
Reference in new issue
Block a user