delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/15/00:42:45

From: Jeff Weeks <pweeks AT mercury DOT execulink DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: porting watcom progs
Date: Mon, 14 Oct 1996 14:23:03 -0400
Organization: Code X software
Lines: 34
Message-ID: <32628507.3B61824@mercury.execulink.com>
NNTP-Posting-Host: ppp5.mars.execulink.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi there.  I just recently got some Watcom C++ source code that I'd like
to port over to DJGPP.  I assume they're shouldn't be much trouble
because they're both 386 pmode compilers (right?) but I've never used
Watcom before so I'm not sure.

Anyway, my question concerns Watcom inline assembly.  The code I have
contains a lot of assembly so I'm wondering how I would port that to
DJGPP inline assembly.  Here's a little chunk...

/* The following inline assembly segments draw vertical lines of a solid
   color, in either 1, 2 or 4 pixel widths. */
unsigned long wvlineh (unsigned long scrcoord, unsigned short length,
unsigned char col);
#pragma aux wvlineh = \
  "vloop: mov [ebx], al" \
  "sub ebx, 320" \
  "dec cx" \
  "jnz vloop" \
parm [ebx] [cx] [al]\
value [ebx]\
modify exact [ax cx ebx] nomemory;

Most of the code should just be a switch from Intel to AT&T asm right? 
But what about the three lines at the end?  What are they all about (the
parm, value and modify lines)?  And how to I convert those to DJGPP V2
assembly.

Any help concerning porting of Watcom code (C/C++/Inline ASM) would be
greatly appreciated.

Thanks a lot,
Jeff Weeks

PS: If possible could you please respond to pweeks AT execulink DOT com

- Raw text -


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