Jeśli chcesz wziąć udział w dyskusjach na forum - zaloguj się. Jeżeli nie masz loginu - poproś o członkostwo.
Vanilla 1.1.4 jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.
--- Floating Point Registers ---
$D5A0 - FP0 - 7-0
$D5A1 - FP0 - 15-8
$D5A2 - FP0 - 23-16
$D5A3 - FP0 - 31-24
$D5A4 - FP1 - 7-0
$D5A5 - FP1 - 15-8
$D5A6 - FP1 - 23-16
$D5A7 - FP1 - 31-24
$D5A8 - FP2 - 7-0
$D5A9 - FP2 - 15-8
$D5AA - FP2 - 23-16
$D5AB - FP2 - 31-24
$D5AC - FP3 - 7-0
$D5AD - FP3 - 15-8
$D5AE - FP3 - 23-16
$D5AF - FP3 - 31-24
#D5B0 - FP mode
--- Floating Point Operations
AA<=fun(AA)
or
AA<=fun(AA,BB)
AA BB FFFF
0 - zero / one / minus one / pi
1 - toFP / toFX / AtariFP to FP / FP to AtariFP
2 - copy
3 - swap
4 - add
5 - sub
6 - mul
7 - div
8 - modulo
9 - sqrt / inv / ln / log10
10 - pow
11 - sin / cos / tan / exp
12 - atan2
13 - round / trunc / ceil / floor
14 - is zero / not zero / grater than 0 / grater and eq zero
15 - busy
; A=3
; B=4
; C=? (5)
lda #$00 ; zero to FP0
sta $D5B0
lda #$10 ; zero to FP1
sta $D5B0
lda #$03 ; Fixed-Point -15bit.16bit
sta $D5A2
lda #$04 ; Fixed-Point -15bit.16bit
sta $D5A6
lda #$01 ; convert FP0 Fixed Point to Floating Point
sta $D5B0
lda #$51 ; convert FP1 Fixed Point to Floating Point
sta $D5B0
lda #$06 ; FP0=FP0*FP0
sta $D5B0
lda #$56 ; FP1=FP1*FP1
sta $D5B0
lda #$44 ; FP0=FP0+FP1
sta $D5B0
lda #$09 ; FP0=sqrt(FP0)
sta $D5B0
lda #$41 ; convert Floating Point to Fixed Point
sta $D5B0
lda $D5A2 ; C=5