Article View: net.micro.pc
Article #6146Re: 8087 opcodes needed
From: Alex Novikis
Date: Mon, 07 Apr 1986 06:49
Date: Mon, 07 Apr 1986 06:49
77 lines
2410 bytes
2410 bytes
In article <292@cernvax.UUCP>, mnl@cernvax.UUCP (mnl) writes:
> subject: 8087 opcodes needed
> Newsgroups: net.micro.pc
>
> I'm trying to write a pair of routines to convert 64-bit floating
> point (which is what our Modula-2 compiler uses) to and from 32-bit
> floating point. Unfortunately, I can't seem to find any list of
> 8087 opcodes, and Masm doesn't seem to know about the 8087. What I
> need are the opcodes for:
>
> FLD ;32-bit and 64-bit, i.e. DWORD and QWORD
> FSTP ; as above
>
> Thanks in advance
> --
> mnl@cernvax.bitnet or ...!seismo!mcvax!cernvax!mnl
> "This function is occasionally useful as the arguement to a function
> which requires a function as an arguement." Guy Steele, Jr.
Here are the macros for FLD and FSTP...
codemacro FLD src:Mb
segfix src
db 0d9h
modrm 0,src
endm
codemacro FLD src:Mw
segfix src
db 0ddh
modrm 0,src
endm
codemacro FLD src:Db(0,7)
db 0d9h
dbit 5(18h),3(src(0))
endm
codemacro FSTP dst:Mb
segfix dst
db 0d9h
modrm 3,dst
endm
codemacro FSTP dst:Mw
segfix dst
db 0ddh
modrm 3,dst
endm
codemacro FSTP dst:Db(0,7)
db 0ddh
dbit 5(1bh),3(dst(0))
endm
---------------------------------------------------------------
Hope these may be of some use..,
--
==============================================
Alex Paul Novickis (707) 575 8672
Fulcrum Computers, Inc. 1635 Ditty Ave. Santa Rosa, CA 95401-2636
{ihnp4, dual}!ptsfa!gilbbs!apn
"Almost doesn't count... but it almost does"
DISCLAIMER: The opinions contained herein may not be of anyone that I know.
Technical Details
Message-ID:
<144@gilbbs.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!pyramid!hplabs!qantel!ptsfa!gilbbs!apnReferences:
<292@cernvax.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!pyramid!hplabs!qantel!ptsfa!gilbbs!apn From: apn@gilbbs.UUCP (Alex Novikis) Newsgroups: net.micro.pc Subject: Re: 8087 opcodes needed Message-ID: <144@gilbbs.UUCP> Date: Mon, 7-Apr-86 01:49:10 EST Article-I.D.: gilbbs.144 Posted: Mon Apr 7 01:49:10 1986 Date-Received: Wed, 9-Apr-86 23:39:50 EST References: <292@cernvax.UUCP> Organization: Gil's Place, Santa Rosa CA Lines: 77 Summary: 8087: FLD and FSTP