Xref: utzoo unix-pc.general:1707 comp.sys.att:4789 Path: utzoo!utgpu!watmath!uunet!labrea!decwrl!ucbvax!pasteur!ames!ncar!boulder!pikes!udenva!isis!scicom!zebra!vern From: vern@zebra.UUCP (Vernon C. Hoxie) Newsgroups: unix-pc.general,comp.sys.att Subject: syslocal(2) on 3b1 sick? Keywords: real time clock, perror(2) Message-ID: <130@zebra.UUCP> Date: 22 Nov 88 07:32:55 GMT Organization: Alpha Science Computer Networks, Denver, Colo. Lines: 21 I'm trying to write a program to reset the clock on the 3b1. First, I want to be able to read the clock to see if things work. This has to be done in the quickest time possible, so I am trying the syslocal(2) call special to the 3b1. It has the form: int syslocal(cmd, [, arg] From the manual (ugh) and the syslocal.h file, I get the command to be "SYSL_RDRTC" and the argument to be of struct rtc *x_rtc. Now: int x = syslocal(SYSL_RDRTC, x_rtc); gives x = -1. So I added perror("Error id"); as the next instruction and got a "Bad address" response. How does a system function provide a bad address. Oh! This is an AT&T machine (:>). I'm tempted to go to machine language but it would be nice to have something a little more portable. Not portable fully if I am using syslocal(2), I know. Any help will be appreciated. -- Vernon C. Hoxie {ncar,nbires,boulder,isis}!scicom!zebra!vern 3975 W. 29th Ave. voice: 303-477-1780 Denver, Colo., 80212 uucp: 303-455-2670