because of the earlier requirement I posted here ( mixing c and asm) now I need to compile all my C files with tcc.
I currently have installed turbo C4 installed in my system.
I needed to put some inline assembly code at the same time and did several attempts after looking around online through mostly masm from msdn.
tried following variants, so far none of them works, so I am wondering if anyone has done in the past did this?
Does TCC support compiling inline asm code in C file? If so are syntax different than VS?
__asm__
(
push eax
pop eax
);
__asm
{
push eax
pop eax
};
Why don't you try Pelles C (http://forum.pellesc.de/index.php?action=unread)? A great free compiler, and surely supports Masm32 syntax.
In Borland C++ or Turbo C you can use following syntax for short number of instrucitons:
asm mov ah,9
asm mov dx, offset msg
asm int 21h
For longer code it is better to use:
asm {
mov ah,9
mov dx, offset msg
int 21h
}
You can also use semicolon to place multiple assembly language instruction in one line:
asm {
push ax; push dx
mov ah,9
mov dx, offset msg
int 21h
pop dx; pop ax
}
It's been forever since I've done that, but ACP's examples look about right. :-)
Some examples (http://www.abreojosensamblador.net/Productos/AOE/html/Pags_en/Chap19.html#Ce)
Quote from: avcaballero on December 22, 2015, 05:05:51 AM
Some examples (http://www.abreojosensamblador.net/Productos/AOE/html/Pags_en/Chap19.html#Ce)
FYI, that page is blocked by my AV vendor as being compromised.
Ooops, in that case, you won't have a look to that :P