Thread: dos interrupts in C

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    13

    dos interrupts in C

    can anyone give me links to good resources on dos interrupts..

    i mean tutorials or paper on DOS INT in C, interaction with hardware etc....

    anyway thanx in advance

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    13
    reference and theory r fine but i need some examples to start with ....i dont ve prior experience of programming with intrrupts

    some good n easy examples of how to write programms using DOS int

  4. #4
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Ralph Brown's Interrupt List known as RBIL

    Get the viewer as well.

    Google it.

  5. #5
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    some good n easy examples of how to write programms using DOS int
    I'm not sure why you want to mess with interrupts since in protected mode programming, drivers have taken the place of low-level access.

    But when you invoke an interrupt the CPU transfers control to a handler. The address of the handler is stored in memory somewhere. The interrupt handler address list starts at 0000:0000 in real mode and in protected mode it gets much more complex. The IVT or interrupt vector table can be changed directly or via DOS. DOS C has functions in <dos.h> to do just this.

    setvect()
    getvect()
    geninterrupt()
    int86()
    int86x()

    etc.

    You will need to understand these in order to work with DOS interrupts.

    This will show the mouse cursor in DOS code. The mouse handler is for int 33 hex or 0x33. There are about 12 standard functions for most mouse drivers and about 6 of them for sure are implemented on the default Windows mouse driver.

    Show mouse:
    Code:
    void ShowMouse(void)
    {
      REGS regs;
      regs.ax=0x01;
      int86(0x33,&regs,&regs);
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File systems?? (Winxp -> DOS)
    By Shadow in forum Tech Board
    Replies: 4
    Last Post: 01-06-2003, 09:08 PM
  2. winver, winminor, winmajor can it be found from dos?
    By ronin in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 10-02-2002, 10:32 AM
  3. real mode dos & win dos
    By scott27349 in forum A Brief History of Cprogramming.com
    Replies: 26
    Last Post: 08-19-2002, 06:15 AM
  4. DOS program versus DOS console program
    By scromer in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 01-10-2002, 01:42 PM
  5. Shut off DOS screen automatically to Windows
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 11-08-2001, 07:14 PM