2011/4/1 何闯 <justhechu...@163.com>: > Deal all, > I just tested int 0x10 BIOS interrupt to draw some pictures. > However, when I coded the follow to enter 640X480 video mode, it seems that > the actual video mode is 640X100, > I draw a rectangle with range(0,0, 640, 480) to verify, and it resulted in > range(0,0, 640,100), about a quarter square of a rectangle. > And I noticed that 320X200 video mode is OK, and 320X200 == 640X100, is that > mean my machine can hand only 64000 pixels? > Can anyone tell me why? > /////////////////////////////////////////////////////////////////////////////////////////////////////// > void setvga() > { > __asm__ __volatile__ ( REAL_CODE ( "movw $0x4f02, %%ax\n\t" //ax=0x0012 > here seem stay in the text mode > "movw $0x0101, %%bx\n\t" > "int $0x10\n\t" )::); > } > void putpixel(int x,int y,int c) > { > if(vediobuf == NULL) > { > vediobuf = (unsigned char*)phys_to_user(0xa0000); //physic address of > graphic mode > } > *(vediobuf+x+640*y)=c; > } > ///////////////////////////////////////////////////////////////////////////////////////////////////// > > > yours, > soforth
I'd suggest looking at other boot loaders and how they write to the screen (including Syslinux's vesamenu.c32 and gfxboot.c32). 64,000 sounds like the 16-bit limit of 65,536 per segment. -- -Gene _______________________________________________ gPXE mailing list gPXE@etherboot.org http://etherboot.org/mailman/listinfo/gpxe