C'est la nouvelle librairie graphique de David Teitlebaum et je doit avouer que les screenshot sont impressionant. Mais est-ce que qqn a tester ?
http://www.ticalc.org/archives/files/fileinfo/361/36173.html
Lionel Debroux :
Cette lib utilise les floats d'AMS. Il avait essayé de mettre du fixed-point, mais la perte de précision était trop importante sur certains points. Lisez le readme
Il existe une lib dynamique kernel-based ("ffplib" ?), mais il me semble que la convention d'appel est également différente de celle d'AMS.
Pollux
: (*) il fut une époque où c'était intégré dans gtc, mais je ne sais plus très bien si ça marche encore ^^
Lionel Debroux :
(ou de "ffplib", quitte à la désassembler)
Lionel Debroux :
Je crois que je parle d'une autre ffplib que je ne connais pas, parce que je ne me souvenais pas que tu en avais fait uneC'est dommage qu'elle soit __stkparm__. Tu l'as faite à une époque où la partie C de TIGCC ne savait pas ce qu'était __regparm__ ?
***************************************************************************** * ffp68343 -- Fast Floating-Point Support for Fargo II * * Code Adapted to Fargo II by Aaron Hill * ***************************************************************************** * 68343 Fast Floating-Point Firmware * * Release 1.2 July 29, 1983 * * Copyright (C) 1980,1981,1982 Motorola, Inc. * *****************************************************************************
;----------------------------------------------------------------
; ffpabs -- Fast Floating Point Absolute Value
;
; Input: D7 - Argument
;
; Output: D7 - Absolute Value
;
; Condition Codes:
; N - Cleared
; Z - Set If Result Is Zero
; V - Cleared
; C - Undefined
; X - Undefined
;
;----------------------------------------------------------------
ffp68343::ffpabs equ ffp68343@0000
;----------------------------------------------------------------
; ffpneg -- Fast Floating Point Negate
;
; Input: D7 - Argument
;
; Output: D7 - Negated Value
;
; Condition Codes:
; N - Set If Result Is Negative
; Z - Set If Result Is Zero
; V - Cleared
; C - Undefined
; X - Undefined
;
;----------------------------------------------------------------
ffp68343::ffpneg equ ffp68343@0001
;----------------------------------------------------------------
; ffpadd -- Fast Floating Point Add
; ffpsub -- Fast Floating Point Subtract
;
; Input:
; ffpadd
; D6 - Addend
; D7 - Adder
; ffpsub
; D6 - Subtrahend
; D7 - Minuend
;
; Output: D7 - Add/Subtract Result
;
; Condition Codes:
; N - Set If Result Is Negative
; Z - Set If Result Is Zero
; V - Set If Overflow Has Occured
; C - Undefined
; X - Undefined
;
; Registers D3 thru D5 are volatile
;
;----------------------------------------------------------------
ffp68343::ffpsub equ ffp68343@0002
ffp68343::ffpadd equ ffp68343@0003
;----------------------------------------------------------------
; ffpafp -- Ascii to Fast Floating Point
;
; Input: A0 - Pointer to Ascii String
;
; Output: D7 - Fast Floating Point Equivalent
; A0 - Points to Character Which
; Terminated The Scan
;
; Condition Codes:
; N - Set If Result Is Negative
; Z - Set If Result Is Zero
; V - Set If Result Overflowed
; C - Set If Invalid Format Detected
; X - Undefined
;
; Registers D3 thru D6 are volatile
;
; See Documentation For String Formatting
;
;----------------------------------------------------------------
ffp68343::ffpafp equ ffp68343@0004
;----------------------------------------------------------------
; ffparnd -- Ascii Round Subroutine
;
; Input: A0 - Pointer to Ascii String
;
; Output: D7 - Fast Floating Point Equivalent
; A0 - Points to Character Which
; Terminated The Scan
;
; Condition Codes:
; N - Set If Result Is Negative
; Z - Set If Result Is Zero
; V - Set If Result Overflowed
; C - Set If Invalid Format Detected
; X - Undefined
;
; Registers D3 thru D6 are volatile
;
; See Documentation For String Formatting
;
;----------------------------------------------------------------
ffp68343::ffparnd equ ffp68343@0005
;----------------------------------------------------------------
; ffpatan -- Fast Floating Point Arctangent
;
; Input: D7 - Input Argument
;
; Output: D7 - Arctangent Radian Result
;
; Condition Codes:
; N - Cleared
; Z - Set If The Result Is Zero
; V - Cleared
; C - Undefined
; X - Undefined
;
;----------------------------------------------------------------
ffp68343::ffpatan equ ffp68343@0006
;----------------------------------------------------------------
; ffpcmp -- Fast Floating Point Compare
;
; Input: D6 - Fast Floating Point Argument (Source)
; D7 - Fast Floating Point Argument (Destination)
;
; Output: Condition code reflecting the following branches
; for the result of comparing the destination minus
; the source:
; gt - destination greater
; ge - destination greater or equal to
; eq - destination equal
; ne - destination not equal
; lt - destination less than
; le - destination less than or equal to
;
; Condition Codes:
; N - Cleared
; Z - Set If Result Is Zero
; V - Cleared
; C - Undefined
; X - Undefined
;
;----------------------------------------------------------------
ffp68343::ffpcmp equ ffp68343@0007
;----------------------------------------------------------------
; ffptst -- Fast Floating Point Test
;
; Input: D7 - Fast Floating Point Argument
;
; Output: Condition codes set for the following branches:
; eq - argument equals zero
; ne - argument not equal zero
; pl - argument is positive (incl. zero)
; mi - argument is negative
;
; Condition Codes:
; N - Set If Result Is Negative
; Z - Set If Result Is Zero
; V - Cleared
; C - Undefined
; X - Undefined
;
;----------------------------------------------------------------
ffp68343::ffptst equ ffp68343@0008
;----------------------------------------------------------------
; ffpdbf -- Fast Floating Point Dual-binary To Float
;
; Input: D6 bit #16 - Represents Sign (0=positive)
; (1=negative)
; D6.w - Represents Base Ten Exponent
; Considering D7 A Binary Integer
; D7 - Binary Integer Mantissa
;
; Output: D7 - Fast Floating Point Equivalent
;
; Condition Codes:
; N - Set If Result Is Negative
; Z - Set If Result Is Zero
; V - Set If Result Overflowed
; C - Cleared
; X - Undefined
;
; Registers D3 thru D6 destroyed
;
;----------------------------------------------------------------
ffp68343::ffpdbf equ ffp68343@0009
;----------------------------------------------------------------
; ffpdiv -- Fast Floating Point Divide
;
; Input: D6 - Floating Point Divisor
; D7 - Floating Point Dividend
;
; Output: D7 - Floating Point Quotient
;
; Condition Codes:
; N - Set If Result Negative
; Z - Set If Result Zero
; V - Set If Result Overflowed
; C - Undefined
; X - Undefined
;
; Registers D3 thru D5 volatile
;
;----------------------------------------------------------------
ffp68343::ffpdiv equ ffp68343@000A
;----------------------------------------------------------------
; ffpexp -- Fast Floating Point Exponent
;
; Input: D7 - Input Argument
;
; Output: D7 - Exponential Result
;
; Condition Codes:
; N - Cleared
; Z - Set If Result Is Zero
; V - Set If Overflow Occurred
; C - Undefined
; X - Undefined
;
;----------------------------------------------------------------
ffp68343::ffpexp equ ffp68343@000B
;----------------------------------------------------------------
; ffpfpa -- Fast Floating Point To Ascii
;
; Input: D7 - Floating Point Number
;
; Output: D7 - The Base Ten Exponent In Binary
; For The Returned Format
; SP - Decremented By 14 And Pointing
; To The Converted Number In Ascii
; Format
;
; Condition Codes:
; N - Set If The Result Is negative
; Z - Set If The Result Is Zero
; V - Cleared
; C - Cleared
; X - Undefined
;
; See Documentation For String Formatting
;
;----------------------------------------------------------------
ffp68343::ffpfpa equ ffp68343@000C
;----------------------------------------------------------------
; ffpfpbcd -- Fast Floating Point To BCD
;
; Input: D7 - Floating Point Number
;
; Output: SP - Decremented By 8 And Pointing
; To The Converted Number In BCD
; Format
;
; Condition Codes:
; N - Set If Result Is Negative
; Z - Set If Result Is Zero
; V - Cleared
; C - Cleared
; X - Undefined
;
; See Documentation For BCD Format
;
;----------------------------------------------------------------
ffp68343::ffpfpbcd equ ffp68343@000D
;----------------------------------------------------------------
; ffpfpi -- Fast Floating Point To Integer
;
; Input: D7 - Fast Floating Point Number
;
; Output: D7 - Fixed Point Integer (2's complement)
;
; Condition Codes:
; N - Set If Result Is Negative
; Z - Set If Result Is Zero
; V - Set If Overflow Occurred
; C - Undefined
; X - Undefined
;
; Register D5 is destroyed
;
;----------------------------------------------------------------
ffp68343::ffpfpi equ ffp68343@000E
;----------------------------------------------------------------
; ffpifp -- Integer To Fast Floating Point
;
; Input: D7 - Fixed Point Integer (2's complement)
;
; Output: D7 - Fast Floating Point Equivalent
;
; Condition Codes:
; N - Set If Result Is Negative
; Z - Set If Result Is Zero
; V - Cleared
; C - Undefined
; X - Undefined
;
; Register D5 is destroyed
;
;----------------------------------------------------------------
ffp68343::ffpifp equ ffp68343@000F
;----------------------------------------------------------------
; ffplog -- Fast Floating Point Logorithm
;
; Input: D7 - Input Argument
;
; Output: D7- Logorithmic Result To Base e
;
; Condition Codes:
; N - Set If Result Is Negative
; Z - Set If Result Is Zero
; V - Set If Invalid Negative Argument or Zero Argument
; C - Undefined
; X - Undefined
;
;----------------------------------------------------------------
ffp68343::ffplog equ ffp68343@0010
;----------------------------------------------------------------
; ffpmul -- Fast Floating Point Multiply (speed)
; ffpmul2 -- Fast Floating Point Multiply (accuracy)
;
; Input: D6 - Floating Point Multiplier
; D7 - Floating Point Multiplican
;
; Output: D7 - Floating Point Result
;
; Condition Codes:
; N - Set If Result Negative
; Z - Set If Result Zero
; V - Set If Overflow Occurred
; C - Undefined
; X - Undefined
;
; Registers D3 thru D5 are volatile
;
; See Documentation About Multiplication
;
;----------------------------------------------------------------
ffp68343::ffpmul equ ffp68343@0011
ffp68343::ffpmul2 equ ffp68343@0012
;----------------------------------------------------------------
; ffppwr -- Fast Floating Point Power Function
;
; Input: D6 - Floating Point Exponent Value
; D7 - Floating Point Argument Value
;
; Output: D7 - Result Of The Value Taken To
; The Power Specified
;
; Condition Codes:
; N - Cleared
; Z - Set If The Result Is Zero
; V - Set If Overflow Occurred Or Base Value
; Argument Was Negative
; C - Undefined
; X - Undefined
;
;----------------------------------------------------------------
ffp68343::ffppwr equ ffp68343@0013
;----------------------------------------------------------------
; ffpsin -- Fast Floating Point Sine
; ffpcos -- Fast Floating Point Cosine
; ffptan -- Fast Floating Point Tangent
; ffpsincs -- Fast Floating Point Sine and Cosine
;
; Input: D7 - Input Argument (Radian)
;
; Output: D7 - Function Result
; (ffpsincs also returns d6)
;
; Condition Codes:
; N - Set If Result In D7 Is Negative
; Z - Set If Result In D7 Is Zero
; V - Set If Result Is Meaningless
; (Input Magnitude Too Large)
; C - Undefined
; X - Undefined
;
;----------------------------------------------------------------
ffp68343::ffpsincs equ ffp68343@0014
ffp68343::ffptan equ ffp68343@0015
ffp68343::ffpcos equ ffp68343@0016
ffp68343::ffpsin equ ffp68343@0017
;----------------------------------------------------------------
; ffpcosh -- Fast Floating Point Hyperbolic Cosine
; ffpsinh -- Fast Floating Point Hyperbolic Sine
; ffptanh -- Fast Floating Point Hyperbolic Tangent
;
; Input: D7 - Floating Point Argument
;
; Output: D7 - Hyperbolic Result
;
; Condition Codes:
; N - Set If The Result Is Negative
; Z - Set If The Result Is Zero
; V - Set If Overflow Occurred
; C - Undefined
; X - Undefined
;
;----------------------------------------------------------------
ffp68343::ffpcosh equ ffp68343@0018
ffp68343::ffpsinh equ ffp68343@0019
ffp68343::ffptanh equ ffp68343@001A
;----------------------------------------------------------------
; ffpsqrt -- Fast Floating Point Square Root
;
; Input: D7 - Floating Point Argument
;
; Output: D7 - Floating Point Square Root
;
; Condition Codes:
; N - Cleared
; Z - Set If Result Is Zero
; V - Set If Argument Was Negative
; C - Cleared
; X - Undefined
;
; Registers D3 thur D6 are volatile
;
;----------------------------------------------------------------
ffp68343::ffpsqrt equ ffp68343@001B