home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
vol_200
/
250_01
/
fpsub.s
< prev
next >
Wrap
Text File
|
1987-10-29
|
640b
|
31 lines
.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