www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/01/01:10:29

From: rellwood <rellwood AT aludra DOT usc DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Help with Inline Assembly in DJGPP
Date: 31 Jan 1997 20:55:00 -0800
Organization: University of Southern California, Los Angeles, CA
Lines: 28
Sender: rellwood AT aludra DOT usc DOT edu
Message-ID: <Pine.SV4.3.94.970131204350.10972D-100000@aludra.usc.edu>
NNTP-Posting-Host: aludra.usc.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I was converting a program that I wrote from Turbo C++ to DJGPP (which I
just got) when I discovered to my horror that all of my inline assembly
didn't work!  The documentation is so cryptic that I can't make heads or
tails of it.

Can someone please explain how convert Turbo C++ inline Assembly to
DJGPP's format?  For example, one piece of my code looks something like
this:

 __asm {
        push ds
        mov cx, DOUBLE_BUFFER_SIZE
        les di, temp_video_buffer
        mov ax, 320
        mul zero
        add di, ax
        lds si, temp_double_buffer
        rep movsw
        pop ds
   }

(As you can guess from the variable names, this is *suppose to* copy data
from a double buffer to the real video buffer.)

Thanks!  ...this is driving me crazy!

-R Ellwood

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019