Thread: Assembly in C++?

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    38

    Assembly in C++?

    Is the Union for the assembly registers stored in any header files or is it safer to just make my own union? Also what header are the interrupts stored in?

  2. #2
    Registered User
    Join Date
    Sep 2002
    Posts
    272
    What architecture are you programming for?

    If it's an x86 running in protected mode and you're missing the dos union regs (or whatever) then you'll have to make your own. Chances are your interupts are priviledged instructions; so you'll either have to write a device driver, use a dos compiler and hope the emultion copes or use system calls to carry out the same task.
    Joe

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    >> what header are the interrupts stored in?

    We all know what you meant there, but that question could have been worded better.

    Here is the deal, Win32 does allow the programmer to rely on using interrupts for their programs (as JoeSixpack pointed out) so you are probably wanting to use a dos compiler. But the good news is the win api should allow you to do whatever it is that you want to do.

    For those who thought this thread was what I thought it was going to be, you can use assembler and C/C++ together in the same program. You can either compile in your asm source or use inline assembler.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Learning Assembly
    By mrafcho001 in forum Tech Board
    Replies: 5
    Last Post: 03-12-2006, 05:00 PM
  2. C to assembly interface
    By Roaring_Tiger in forum C Programming
    Replies: 4
    Last Post: 02-04-2005, 03:51 PM
  3. assembly language...the best tool for game programming?
    By silk.odyssey in forum Game Programming
    Replies: 50
    Last Post: 06-22-2004, 01:11 PM
  4. True ASM vs. Fake ASM ????
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-02-2003, 04:28 AM
  5. C,C++,Perl,Java
    By brusli in forum C Programming
    Replies: 9
    Last Post: 12-31-2001, 03:35 AM