A2osX/SYS/KERNEL.S.MATH.txt

58 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

PR#3
PREFIX /A2OSX.BUILD
LOMEM $A00
INC 1
AUTO 6
*/--------------------------------------
* # FAdd,FSub,FMult,FDiv
* Return X+Y,X-Y,X*Y,X/Y
* ## In:
* PUSHW = X (*Float)
* PUSHW = Y (*Float)
* Y,A = Dest (*Float)
*\--------------------------------------
K.FAdd ldx #ROM.FADD
.HS 2C BIT ABS
K.FSub ldx #ROM.FSUB
.HS 2C BIT ABS
K.FMult ldx #ROM.FMULT
.HS 2C BIT ABS
K.FDiv ldx #ROM.FDIV
phx
jsr MATH.PullFAC
jsr MATH.PullARG
>PULLW FORPNT
plx
jsr A2osX.ROMCALL
>ROMCALL GETFAC
clc
rts
*/--------------------------------------
* # Log,Cos,Sin,Tan,ATan
* Return
* ## In:
* PUSHW = X (*Float)
* Y,A = Dest (*Float)
*\--------------------------------------
K.Cos jsr MATH.PullFAC
* >ROMCALL COS
*--------------------------------------
MATH.PullFAC >PULLA
tay
>PULLA
>ROMCALL SETFAC.AY
rts
*--------------------------------------
MATH.PullARG >PULLA
tay
>PULLA
>ROMCALL SETARG.AY
rts
*--------------------------------------
*--------------------------------------
MAN
SAVE /A2OSX.SRC/SYS/KERNEL.S.MATH
LOAD /A2OSX.SRC/SYS/KERNEL.S
ASM