.XLIST ; FLOAT.MAC ; 09.11.93 ; Автор: Конюхов Д.Л. ;------ Инициализирует вещественную математику mfunc initfloat,,,extrn mextrn initf macro FINIT FWAIT endm addf macro src1, src2, dest FLD qword ptr src1 FADD qword ptr src2 ifnb FSTP qword ptr dest FWAIT endif endm subf macro src1, src2, dest FLD qword ptr src1 FSUB qword ptr src2 ifnb FSTP qword ptr dest FWAIT endif endm mulf macro src1, src2, dest FLD qword ptr src1 FMUL qword ptr src2 ifnb FSTP qword ptr dest FWAIT endif endm divf macro src1, src2, dest FLD qword ptr src1 FDIV qword ptr src2 ifnb FSTP qword ptr dest FWAIT endif endm cmpf macro src1, src2 FLD qword ptr src2 FLD qword ptr src1 FCOMPP FSTSW word ptr cs:FLAGS87 FWAIT mov AH, byte ptr cs:FLAGS87+1 sahf endm intf00 macro src, dest FLD qword ptr src FRNDINT FSTP qword ptr dest FWAIT endm intf01 macro src, dest FSTCW cs:FLAGS87+2 FSTCW cs:FLAGS87 FWAIT and cs:FLAGS87, 0F3FFh or cs:FLAGS87, 0400h FLDCW cs:FLAGS87 FLD qword ptr src FRNDINT FSTP qword ptr dest FLDCW cs:FLAGS87+2 FWAIT endm intf10 macro src, dest FSTCW cs:FLAGS87+2 FSTCW cs:FLAGS87 FWAIT and cs:FLAGS87, 0F3FFh or cs:FLAGS87, 0800h FLDCW cs:FLAGS87 FLD qword ptr src FRNDINT FSTP qword ptr dest FLDCW cs:FLAGS87+2 FWAIT endm absf macro src, dest FLD qword ptr src FABS ifnb FSTP qword ptr dest FWAIT endif endm chsf macro src, dest FLD qword ptr src FCHS ifnb FSTP qword ptr dest FWAIT endif endm equf macro src, dest FLD qword ptr src FSTP qword ptr dest FWAIT endm .LIST