When i'am putting an assembler code in C++ like
__asm
{
}
and calling some of int 21h or any thing else it won't work, works only INT 3, but other functions(int 21h, int 13h......) don't. Commands MOV,XOR...... works correct. What is the problem???
This is a discussion on __asm don't work within the C++ Programming forums, part of the General Programming Boards category; When i'am putting an assembler code in C++ like __asm { } and calling some of int 21h or any ...
When i'am putting an assembler code in C++ like
__asm
{
}
and calling some of int 21h or any thing else it won't work, works only INT 3, but other functions(int 21h, int 13h......) don't. Commands MOV,XOR...... works correct. What is the problem???
Well, can't do much about that if you don't tell what your compiler is, eh?
Typing stuff in Code::Blocks 8.02, compiling stuff with MinGW 3.4.5.
You know that hexadecimal numbers should not be used as "variable = 21h;" but as "variable = 0x21;"?
If you did that, then it would help what compiler you are using.
There ARE two different kinds of assembly language. Make sure you're using the right kind.
There are many "kinds" of assembly. But inline assembly in for example GCC is implemented different from inline assembly in MSVC++ or Turbo C or something else. Therefor it is important to know which compiler is used.
0x21 is a dos interrupt ... maybe thats an issue?
You can't use DOS interupts in Windows!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
(sorry for the overreacting but there are hundreds of people who asks about this all the time)
what is asm?
asm = machine code. its the lowest you can go in a readable language. you can control how every variable is created, how many bits it will use, etc.