Hi there.
I just wanted to know how can I use Assembler in c++.
With this I mean: which headers do I need to include in my program; how do I call a DOS Interrupt and how do I write to a specific location in memory.
Thanks.
Hi there.
I just wanted to know how can I use Assembler in c++.
With this I mean: which headers do I need to include in my program; how do I call a DOS Interrupt and how do I write to a specific location in memory.
Thanks.
Which OS and compiler do you have
Everything you've said is heavily dependent on those
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I have Windows Millenium and I use MS Visual C++ and Dev-C++.
You can't use DOS interrupts or access a specific memory location, by passing the paging, in windows.
The last time I did assembly in C++ we took C++ classes with functions not filled in, compiled them, and then filled in the mangled function calls with assembly code. The first argument passed into a nonvirtual method function will be a pointer to the class.
C and C++ can use assember in blocks such as this:
or with __asm. However, not all compilers can do this, so check your documentation. Visual C++ Version 6 I believe can compile assembler. Don't know about previous versions; I only have Visual C++.NET.Code:asm { ... }
Do not make direct eye contact with me.