Original Post
Hello, there. I was testing to see how much faster my computer did basic addition using ASM and regular C/C++ code. The only compiler error is in the ASM section. I am also using class templating.
template
class ASM
{
public:
MathASM Add(MathASM val1, MathASM val2)
{
// I Don''t Know What to Do Here
// Tried this:
/*
__asm
{
PUSH ax
ADD val1,val2
MOV ax,val1
RET
}
}
};
int main()
{
MathASM math;
int n = math.Add(10, 2);
cout << "N = " << n << "\n\n";
return 0;
}
Please help. I am using MS Visual C++ 6.0.
Thanks,
Matt U.
If thispost = 0 Then
GoBack()
Else
Read()
End If