Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!mit-eddie!husc6!seismo!esosun!net1!sdcsvax!ucbvax!seivax.pnet!SYSTEM From: SYSTEM@seivax.pnet Newsgroups: mod.computers.vax Subject: How do I do quadword arithmetic (easily)? Message-ID: <8611141014.AA06326@ucbvax.Berkeley.EDU> Date: Fri, 14-Nov-86 00:14:00 EST Article-I.D.: ucbvax.8611141014.AA06326 Posted: Fri Nov 14 00:14:00 1986 Date-Received: Sat, 15-Nov-86 03:17:00 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 33 Approved: info-vax@sri-kl.arpa Gentlefolk- I have an application that gets the date of a library module as a quadword (64 bit system time), and I would like to compare this to a file time obtained using the VAX C stat() call, which returns (among other things) the mod time as a 32 bit integer. The 64 bit system time is in 100's of nanoseconds since 1858, while the 32 bit C time is in seconds since 1970. I have looked through various doc sets to find out how to do quadword arithmetic. It's too inconvenient to convert all the C times to 64 bit times (I could do it converting to ASCII, editing, and using SYS$BINTIM, but there are reasons enough not to do that). I'm not concerned with using FORTRAN if the facilities exist, and if I could do it in C that would be best. I can always go to MACRO, but I've never done any in VAX-11 and it doesn't seem in my best interests to learn it just to do bit-twiddling. Anyone got any ideas, tips, or suggestions? FYI- The arithmetical operations are: o Start with 64 bit system time format o Use SYS$BINTIM to get 64 bit system time for 1-JAN-1970. o Subtract 1-JAN-1970 from the time Now I have the time based according to the C standard, so... o Divide by 10,000,000 to convert from 100's of nanoseconds to seconds. Voila! ADthanksVANCE, Todd Aven the Softwear Sweatshop