Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

system date

0 views
Skip to first unread message

Lex Harrelson

unread,
Mar 4, 2000, 3:00:00 AM3/4/00
to
Does anyone have a solid way to get the CMOS date in the unix environment.
This reasonably simple on a MSDOS platform as I can access ports directly.
out 70h and inp 71h. Not as simple to me in unix........
Thank is advance
Lex

Tony Lawrence

unread,
Mar 4, 2000, 3:00:00 AM3/4/00
to


"setclock" accesses the RTC, but if you really want to do
this yourself, this older post might be of interest. Be
careful, though- it's easy to kill your system with a simple
mistype:

---dredged from dejanews- which has become much faster just
recently---

Subject: Re: Cannot write to an external register using SCO
V
Date: 06/07/1999
Author: John DuBois <spc...@deeptht.armory.com.>


In article <3755E0DA...@club-internet.fr>,
Philippe BRUN <phb...@club-internet.fr> wrote:
>I'm using SCO OpenServer Enterprise Release 5.04
>I want to set or reset signal on the parallel port, to
pilot an external
>relay
>Usually i use the "outb" standard C function to write in
the data
>register (3BC) or the control register.
>I cannot do it on SCO
>Does anyone encountered this problem ?

The only correct way of doing this is to write a device
driver.

But for testing & hacks, this can be handy:

mknod /dev/iob c 4 3
Then open the device, lseek to a file offset equal to the
IO address
you want to write to, and write a byte there. Be sure to
lseek again
if you want to write another byte to the same address.

John
--
John DuBois spc...@armory.com. KC6QKZ
http://www.armory.com./~spcecdt/

------------ end of deja post --------------------------

--
Tony Lawrence (to...@aplawrence.com)
SCO/Linux articles, help, book reviews, tests,
job listings and more : http://www.pcunix.com

Jean-Pierre Radley

unread,
Mar 4, 2000, 3:00:00 AM3/4/00
to
Lex Harrelson propounded (on Sat, Mar 04, 2000 at 04:35:21PM -0500):

| Does anyone have a solid way to get the CMOS date in the unix environment.
| This reasonably simple on a MSDOS platform as I can access ports directly.
| out 70h and inp 71h. Not as simple to me in unix........

/etc/cmos gives you everything in the CMOS.

Try 'setclk -p', though, it's a bit friendlier. :-)

--
JP

0 new messages