Update GIVAYF

This commit is contained in:
Rikard Nordgren authored and FeralChild64 committed 2026-03-29 21:45:24 +02:00
1 parent 376823fc65
commit 135522352a
3 files changed
+13 -7

No files matched your search

+10 -5
View File
@@ -3,7 +3,9 @@
;; #LAYOUT# * BASIC_0 #TAKE
;; #LAYOUT# * * #IGNORE
;
; This file is under the MIT license, it contains code released by Microsoft Corporation.
; See LICENSE for more information.
; Math package - 16-bit signed integer to FAC1
;
; Output:
@@ -13,6 +15,8 @@
; Sets the data type flag at $0D to "numeric", stores the number in the FAC1 mantissa
; then calls convert_i16_to_FAC1
;
; This is verified to be identical to the original Microsoft implementation where it was named GIVAYF.
;
; See also:
; - [CM64] Computes Mapping the Commodore 64 - page 107
; - https://www.c64-wiki.com/wiki/GIVAYF
@@ -20,8 +24,9 @@
GIVAYF:
ldx #$00
stx $0D
sty FAC1_mantissa
sta FAC1_mantissa+1
ldx #0
stx VALTYP
sta FAC1_mantissa+0
sty FAC1_mantissa+1
ldx #$90
jmp convert_i16_to_FAC1