I'm trying to figure out how to run irq 0x10 from gcc so as to
interact with the video card directly. I believe it will have to be done with inline assembler.
The general question is "How do you make interupts work from gcc. To say get the video mode (coded for with 0x0f in register ah when irq 0x10 is called) I tried a fragment like:
___________ int ans; __asm__ __volatile__ ( "movb $0x0F,%%ah\n\t" \ "int $0x10\n\t" \ "movl %%eax,ans\n\t" \ :"=memory" (ans) \ : :"ax" ); printf( "ans='%d'\n",(int) ans); _____________ But it gives a segmentation fault. Permissions? ioperm?? whats the answer? Thanks John
|