Howdy, Stranger!

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

Categories

Inline asm with Turbo C

fnoyanfnoyan Member Posts: 103
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

  • AsmGuru62AsmGuru62 Member Posts: 6,519
    [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]


  • Andre YoungAndre Young USAMember Posts: 0

    ___ { http://forcoder.org } free video tutorials and ebooks about || C++ Delphi PHP Java Scratch Objective-C Python PL/SQL Visual Basic Assembly Visual Basic .NET MATLAB Swift JavaScript C Perl R C# Ruby Go Clojure Alice Scheme LabVIEW ABAP Lisp Kotlin Crystal Scala Fortran COBOL Transact-SQL D Awk Hack Erlang F# SAS Apex Bash Prolog FoxPro Julia VBScript Lua Ada Logo ML Dart Rust || ________

Sign In or Register to comment.