Using interrupts(int XX) in C++ .net

Posted on 2005-05-06
Last Modified: 2010-04-24
Why doesn't work the following code:
1: char c;      
2:  __asm{
3:    mov ah,0
4:    int 16h
5:    mov c,ah
6:  }
While debuging it gives an "Unhandled exception at 0x0040126d in 8_1.exe: 0xC0000005: Access violation reading location 0xffffffff." in the 4th line.
Question by:Centauri
    LVL 11

    Expert Comment

    try puting 0x16
    LVL 11

    Accepted Solution

    if my previous solution doesnt work and I dont think it does, I think it is because 32bit compilers dont allow the use of 16-bit interrupts being using in this way. I have tried on BCB6 and I was getting similar errors there. I only got it working when I used the 16-bit Turbo C++ compiler.
    LVL 4

    Expert Comment


    the answer is provided by jase-coder is 100% correct. you cant call dos/bios functions from even visual c++ 6, then how can u do it from

    why dont you do this simply





    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
    In Easy String Encryption Using CryptoAPI in C++ ( I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now