🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #25485

Problems with XBIOS gettime()

#25485
From: silvert
Date: Sun, 08 Mar 1987 18:42
25 lines
1837 bytes
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
Technical Details
Message-ID: <2428@dalcs.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!dalcs!silvert

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!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