silvert@dalcs.UUCP (03/08/87)
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
leavens@atari.UUCP (03/11/87)
> XBIOS Getdattime call... > I beleive that the XBIOS call will, on a cold boot, return a value of 0x0, rather than a long of 0x0EH00000, but I've never actually tried it to make sure. --alex @ Atari BIX:alexl. GEnie: ALEXLEAVENS AtariCorp: 408-745-2006 "How can you be in two places at once when you're not anywhere at all."