Thread: sir,what are interrupts in c and can we create menus using interrupts

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    4

    sir,what are interrupts in c and can we create menus using interrupts

    i would like to know about interrupts in c

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    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

  3. #3
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    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.

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    You can only use debugging interupts under Win32.
    // Gliptic

  5. #5
    Registered User
    Join Date
    Sep 2001
    Posts
    752
    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.

  6. #6
    Registered User
    Join Date
    Nov 2009
    Posts
    2
    search on dos timer interrupts and bios interrupts. study about programmable interrupt controller.

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    And you think this is going to help after ~8-9 years... how, exactly? Do you think the OP still needs the help?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed