home *** CD-ROM | disk | FTP | other *** search
- .ttl "fpadd.s"
-
- * MC68020/MC68881 IEEE Format Single Precision Routines
- *
- * Written by: Edmund H. Ramm
- *
- * fpsub entry point for single prec. sub, operands in 4(sp) and 8(sp)
- *
- * sp 4 8
- * ----------------------
- * | ret | a | b |
-
- .text
- .globl fpsub,_fpsub
-
- fpsub:
- _fpsub:
- ~~fpsub:
- *
- * on exit, d0 = 4(sp) - 8(sp)
- *
- * fmove.s 4(sp),fp0 * fp0 <-- "a"
- dc.w $f22f,$4400,$0004
- * fsub.s 8(sp),fp0 * fp0 <-- "a" - "b"
- dc.w $f22f,$4428,$0008
- * fmove.s fp0,d0 * d0 <-- difference
- dc.w $f200,$6400
- rts
-
- .end
-