Click to See Complete Forum and Search --> : Insert assembly instructions in c++


umarbzu
January 1st, 2004, 02:09 AM
Hi
I want to add assembly language instructions in my C++ code
is it possible ?
If yes guide me how to do ..


#include "stdio.h"
void main(void)
{
asm ("mov ax,2");
}

It will work or some thing missing ...
VC++ (6.0) compiler is not recognizing the instruction


UmaR.

Andreas Masur
January 1st, 2004, 04:11 AM
#include "stdio.h"

int main()
{
_asm
{
mov ax, 2
}

return 0;
}