Message-ID: <360F20F0.D025E1A7@post.comstar.ru> Date: Mon, 28 Sep 1998 08:38:56 +0300 From: Dim Zegebart Reply-To: zager AT post DOT comstar DOT ru Organization: Comstar Ltd. MIME-Version: 1.0 To: Silviu Simen , "djgpp AT delorie DOT com" Subject: Re: outportb problem ? References: <360B42E0 DOT 7A0E2FDC AT ubisoft DOT ro> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Precedence: bulk Silviu Simen wrote: > typedef unsigned char byte; > byte byte_read_cmos(byte adresa) { > byte x; > outportb(0x70,adresa); > delay(2); > x =inportb(0x71); > return x; > } > > void read_cmos(void) { > byte i; > byte *p; > for(p=(char*)&cmos,i=0;i *p=byte_read_cmos(i); > } Looks correct, the only suggestion (rather stupid) is p=(byte*)&cmos; not (char*) -- Dim Zegebart Moscow, Russia