Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!dalcs!silvert From: silvert@dalcs.UUCP Newsgroups: comp.sys.atari.st Subject: Problems with XBIOS gettime() Message-ID: <2428@dalcs.UUCP> Date: Sun, 8-Mar-87 13:42:30 EST Article-I.D.: dalcs.2428 Posted: Sun Mar 8 13:42:30 1987 Date-Received: Mon, 9-Mar-87 22:37:28 EST Organization: Marine Ecology Lab. Lines: 25 Keywords: XBIOS, keyboard clock, Modula-2 I've run into a problem with reading the keyboard clock, and I don't know whether it is an error in the Abacus documentation, or a problem with TDI Modula-2, or a problem with the clock. The function XBIOS.GetDateTime(), which is supposedly equivalent to gettime() in C, reads a LONGCARDINAL (long) value. I want to check for a valid time by seeing if the year is 1987 or later, which I do with the test: IF XBIOS.GetDateTime() > 0E000000H THEN ..., which should be equivalent to comparing the value returned by gettime to 0x0E000000 in C. When I do this in a program that runs from the AUTO folder after a cold boot (Machine turned off!), the test is always TRUE. I thought that the keyboard clock under those circumstances was set in 1985, which would be 0A00.....H. How do other programs, like Braner's AUTODISK, read this variable, and is there a difference between C and modula-2 in this? By the way, I have tried comparing to LONGCARD(0E000000H), which is equivalent to the cast (long) 0x0E000000. Also, if I use the GEMDOS function to read the clock, GEMDOS.GetDate(date) and compare date to 0E00H, it works OK. -- Bill Silvert Marine Ecology Laboratory, Dartmouth, NS, Canada CDN or BITNET: silvert@cs.dal.cdn -- UUCP: ..!{seismo|utai}!dalcs!silvert ARPA: silvert%dalcs.uucp@seismo.CSS.GOV -- CSNET: silvert%cs.dal.cdn@ubc.csnet