Xref: utzoo comp.sys.dec:5735 comp.sys.mips:1623 comp.unix.ultrix:7194 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!samsung!munnari.oz.au!uhccux!uhheph.phys.hawaii.edu!ralph From: ralph@uhheph.phys.hawaii.edu (Ralph Becker-Szendy) Newsgroups: comp.sys.dec,comp.sys.mips,comp.unix.ultrix Subject: Need routine to convert floating-point from Sun SPARC to DEC MIPS Message-ID: <12984@uhccux.uhcc.Hawaii.Edu> Date: 11 May 91 12:52:40 GMT Sender: news@uhccux.uhcc.Hawaii.Edu Followup-To: comp.sys.dec Organization: U of Hawaii High Energy Physics Lines: 22 The subject line says it all. I need a subroutine (in FORTRAN or better in C) which converts the 32-bit floating point format from a Sun SPARC into DEC MIPS format. The opposite direction would be neat too, but is not vital at this point. The byte-swapping has already been done (pretending the number was a 32-bit integer), but I can trivially undo that. If it matters, what we are really talking about are FORTRAN REAL*4 numbers stored UNFORMATTED in a file. I know about the option to have the DEC MIPS FORTRAN runt-time-library do the conversion (there is some keyword in the file OPEN statement which declares this file to be automatically converted during unformatted IO), but we are still at Ultrix V4.0, so I guess we don't have that version of the FORTRAN compiler quite yet. I hope such a routine could be found in the manual set somewhere, but at least not in the places I checked. -- Ralph Becker-Szendy UHHEPG=24742::RALPH (HEPNet,SPAN) University of Hawaii RALPH@UHHEPG.PHYS.HAWAII.EDU High Energy Physics Group RALPH@UHHEPG.BITNET Watanabe Hall #203, 2505 Correa Road, Honolulu, HI 96822 (808)956-2931