interrupt programming with borland c

This is a discussion on interrupt programming with borland c within the C Programming forums, part of the General Programming Boards category; hai, The following piece of code works fine in turbo C, but does not work in borland C. it says ...

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    1

    interrupt programming with borland c

    hai,

    The following piece of code works fine in turbo C, but does not work in borland C. it says that the following are undefined.

    1. int86
    2. FP_OFF
    3. cflag


    Please Help.
    This is quite urgent.

    the code is here...( to create a subdirectory)

    #include <stdio.h>
    #include <dos.h>

    union REGS inregs, outregs;

    char newdir[10];


    void main()
    {
    printf("\nEnter the name of sub directory that u want to create : ");
    scanf("%s",newdir);

    inregs.x.dx = FP_OFF(newdir);
    inregs.h.ah = 0x39;
    int86(0x21, &inregs, &outregs);


    if( outregs.cflag != 0)
    printf("\nDirectory could not be created.");
    else
    printf("\nDirectory created.");

    }

  2. #2
    Registered User Vber's Avatar
    Join Date
    Nov 2002
    Posts
    807
    read this also, interrupts are just from DOS I think... you're trying to use Borland C++? also, your code won't work in Visual C++. Hmm just in DOS specific compilers, Search for a better solution then interrupts.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pointer within a Struct
    By Bladactania in forum C Programming
    Replies: 11
    Last Post: 04-03-2009, 10:20 PM
  2. DOS, Serial, and Touch Screen
    By jon_nc17 in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 01-08-2003, 03:59 PM
  3. interrupt question
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 02-08-2002, 08:25 PM
  4. interrupt handler functions in Visual C++ 6.0
    By scromer in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 01-07-2002, 06:06 PM
  5. Sound card interrupt problems
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 12-05-2001, 03:38 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21