The HyperNews Linux KHG Discussion Pages
Next-in-Thread Next Message Previous Message Next Thread

Question: calling interupts from linux

Forum: The Linux Kernel Hackers' Guide
Keywords: interrupts callable from C.
Date: Thu, 18 Sep 1997 14:55:46 GMT
From: John J. Binder <binder@cs.berkeley.edu>

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

Next-in-Thread Next Message Previous Message Next Thread

Messages Inline: 0 1 All Outline: 1 -1 +1

1. Sad: You can't by Michael K. Johnson newest

to: "calling interupts from linux"

Subscribe Membership Move/Remove Admin Mode Show Frames Help for HyperNews 1.9.4