Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!ogicse!qiclab!percy!m2xenix!puddle!f15.n277.z1.fidonet.org!Ben.Coleman From: Ben.Coleman@f15.n277.z1.fidonet.org (Ben Coleman) Newsgroups: comp.lang.modula2 Subject: Modula-2 Dhrystone? Message-ID: <5236.282DD814@puddle.fidonet.org> Date: 11 May 91 02:40:00 GMT Sender: ufgate@puddle.fidonet.org (newsout1.26) Organization: FidoNet node 1:277/15 - The Back Door QBBS, Morgantown WV Lines: 45 MM>> FROM Time IMPORT GetTime; JT> My version of JPI 1.17 cannot find this library. Is it one of JT> your own? JT> There is a GetTime in Misc.MOD but it doesn't like that at all! The GetTime provided with TSM2 1.17(in my case, it's in DIVERSE.TXT) gets the time from DOS. It looks like DH.MOD wants the time in timer ticks(18.2/second), which is a BIOS function. The following should get it: DEFINITION MODULE Time; PROCEDURE GetTime(): LONGCARD; END Time. IMPLEMENTATION MODULE Time; FROM SYSTEM IMPORT Registers; FROM Lib IMPORT Intr; PROCEDURE GetTime(): LONGCARD; VAR r: Registers; BEGIN r.AH := 0; Intr(r, 1AH); RETURN (LONGCARD(r.CX) * 65536) + LONGCARD(r.DX); END GetTime; END Time. Ben -- uucp: uunet!m2xenix!puddle!277!15!Ben.Coleman Internet: Ben.Coleman@f15.n277.z1.fidonet.org