i would like to know about interrupts in c
i would like to know about interrupts in c
Interupts exists everywere but most of them can only be called in real mode or a virtual machine in Windows operating systems. The processor uses interupts to inform the Operating System about errors. Interupts are also used to communicate with the BIOS and on some OSes, it is used as system commands. Since I don't know which system you are running, I can't tell which interupts are available.
BTW. Interupts has little to do with C.
// Gliptic
I've heard of both software and hardware inturrupts. You might be able to invoke interrupt calls with Win32, but I'm not too sure. This is probably a better question for the Windows Programming Board, on this website.
You can only use debugging interupts under Win32.
// Gliptic
ANSI C does not have interrupts. Interrupts are a machine implementation issue. Of course, that doesn't mean that your compiler isn't going to throw in some interrupt wrapper functions at you. Try checking to see if your compiler has any "bios functions" or something along those lines. Basically all of those functions are going to be just wrappers for interrupt calls.
And yes, you certainly can make a menu using interrupts. Detect the keyboard interrupt, change what you want to display based on what you recieved, point some register to the screen values you want to display, and call a different interrupt to display it.
If you want to learn how to use interrupts to do this stuff though, you really should learn some assembly.
search on dos timer interrupts and bios interrupts. study about programmable interrupt controller.