port() & int86()

Discussion in 'Programmer's Corner' started by vaidhya, Jan 3, 2008.

  1. vaidhya

    Thread Starter New Member

    Jan 3, 2008
    6
    0
    Can any one explain what are these command in C,
    with examples Plz:confused: port() & int86
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,148
    1,791
    To read I/O ports and call operating system services.
     
  3. mrmeval

    Distinguished Member

    Jun 30, 2006
    833
    2
  4. vaidhya

    Thread Starter New Member

    Jan 3, 2008
    6
    0
    Thanks ......

    by this command can we control the monitors setup ........?

    if there any examples .... kindly give me >>>>>>>>
     
  5. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
  6. cumesoftware

    Senior Member

    Apr 27, 2007
    1,330
    10
    Yes, you can call video modes with int86 (). Here is a routine to do that:
    Code ( (Unknown Language)):
    1.  
    2. #include <dos.h>
    3.  
    4. union REGS r;
    5. ...
    6. void CallVideoMode (short mode)
    7. {
    8.     r.h.ah = 0x00;
    9.     r.h.al = mode;
    10.     int86 (0x10, &r, &r);
    11. }
    12.  
    As you can see, you use interrupt 10h to call display services.
     
  7. vaidhya

    Thread Starter New Member

    Jan 3, 2008
    6
    0
    Thanks


    This is what i was expecting for ......
     
Loading...