Re: Assembler in C

Search this archive.

From: Patrick Mochel (mochel@transmeta.com)
Date: Thu 07 Jun 2001 - 05:57:23 IDT


On Wed, 6 Jun 2001, Kevin D. Quitt wrote:

> I'm compiling as follows:
> 
> gcc -O2 ck.c -DSHOW=1 libvgagl.a libvga.a ckn.o -o cks
> 
> It appears that no I/O writes or reads are taking place.  The output from:
> 
>     outb( 0x14, 0x3D6 );                // Select XR14
> 
>     stat    = inb( 0x3D7 ) & 0x8F;      // Enable VSYNC, Retrace, and HSYNC
>     outb( stat | 0x50, 0x3D7 );
>     fprintf( report, "stat is %0X\n", stat );
> 
> is always 0.  Are the compiler switches I need?

What video registers are you trying to access? 

According to this book in front of me ("The Undocumented PC" by van
Gilluwe) those do nothing in relation to standard VGA.

According to another reliable reference, in order to enable to set
Horizontal and Vertical Sync, you set bit 7 of CRTC index 0x17.

That code would look like:

outb (0x17,0x3d4);
stat = inb(0x3d5);
outb (stat | 0x80, 0x3d5);

	-pat


------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:24 IST