Inline asm with Turbo C

Hi
I want to use assembly with C under DOS. I use it with GCC under Linux but I don't know how to use it under DOS with Turbo C.
And...If you know any detailed documnet about inline asm (under dos or linux) please send an e-mail to "fnoyanisi@yahoo.com" or "fni18444@gantep.edu.tr"

THANKS

Comments

  • [b][red]This message was edited by AsmGuru62 at 2002-8-28 6:52:4[/red][/b][hr]
    : Hi
    : I want to use assembly with C under DOS. I use it with GCC under Linux but I don't know how to use it under DOS with Turbo C.
    : And...If you know any detailed documnet about inline asm (under dos or linux) please send an e-mail to "fnoyanisi@yahoo.com" or "fni18444@gantep.edu.tr"
    :
    : THANKS
    :
    [blue]Prefix every ASM line with 'asm' keyword:[/blue][code]
    void foo (int param)
    {
    char chAscii = 'A';
    char color = RED;
    void* pVGA = MK_FP (0xB800, 0);

    asm mov ah, color
    asm mov al, chAscii
    asm les di, pVGA
    asm mov cx, 2000 // 25x80
    asm cld
    asm rep stosw

    asm mov dx, param // Load parameter into a REGISTER
    }
    [/code][blue]Also, look in help system.[/blue]


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion