www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/08/02/20:49:05

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>,
<http://sourceware.cygnus.com/ml/#faqs>
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: "Suhaib M. Siddiqi" <ssiddiqi AT ipass DOT net>
To: <brendan AT dgs DOT monash DOT edu DOT au>, "Franklin Wingate" <maurio AT csh DOT rit DOT edu>,
"CygWin32" <cygwin AT sourceware DOT cygnus DOT com>
Subject: RE: Compiling embedded assembly code (was: Cross compiling).
Date: Mon, 2 Aug 1999 20:38:53 -0400
Message-ID: <LOBBLPGIHMIEGBEAFDMCOEIACAAA.ssiddiqi@ipass.net>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
In-Reply-To: <37A636C1.9DBE0E83@dgs.monash.edu.au>
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Importance: Normal

A bit off the topic.
working on Xfree86 port for cygwin, I had problem compiling
all assembly code in various directories in Xfree86 source tree.

Finally, I got compiled if I mounted disk
as binary.  With default mount (i.e text mount) I was getting errors
which were sort of misleading, like something was wrong with
the files or I was using wrong flags.

--sms


> -----Original Message-----
> From: cygwin-owner AT sourceware DOT cygnus DOT com
> [mailto:cygwin-owner AT sourceware DOT cygnus DOT com]On Behalf Of Brendan Simon
> Sent: Monday, August 02, 1999 8:25 PM
> To: Franklin Wingate; CygWin32
> Subject: Re: Compiling embedded assembly code (was: Cross compiling).
>
>
> Franklin Wingate wrote:
>
> > When I try to compile with gcc -b i386 filename, I get the error
> > installation problem, cannot exec cc1: No such file or directory. Am i
> > using the correct compiler options?
>
> Hi Franklin,
>
> The gcc manual (info gcc) says :
>
>    The `-b' and `-V' options actually work by controlling part of the
> file name used for the executable files and libraries used for
> compilation.  A given version of GNU CC, for a given target machine, is
> normally kept in the directory `/usr/local/lib/gcc-lib/MACHINE/VERSION'.
>
>    Thus, sites can customize the effect of `-b' or `-V' either by
> changing the names of these directories or adding alternate names (or
> symbolic links).  If in directory `/usr/local/lib/gcc-lib/' the file
> `80386' is a link to the file `i386v', then `-b 80386' becomes an alias
> for `-b i386v'.
>
> Therefore using the -b i386 would require a /usr/local/gcc-lib/i386
> directory.  You need to substitute the cygwin install directory for
> /usr/local.  I am assuming that you are using cygwin (since this
> is the cygwin
> mailing list).  If you are using cygwin then you shouldn't need
> the -b i386 as
> the cygwin compiler understands 386 assembly code.
>
> I've had a look at the demo code you attached and the assembler
> coder does not
> appear to be adhere to the GCC syntax for assembler code.  It looks like a
> BorlandC or MicrosoftC extension for embedded assembly.  You will have to
> convert it to GCC syntax if you want it to work.  Have a look at the
> GCC manuals (there are some at http://www.objsw.com).
>
> For example
>
> /* sets the graphic mode to mode mode !? */
> void setmode(int mode)
> {
> asm     mov     ax,mode
> asm     int     10h
> }
>
> converts to :
>
> /* sets the graphic mode to mode mode !? */
> void setmode(int mode)
> {
>     asm(" mov   ax,%0" : /* no outputs */ : "r" (mode) );
>     asm(" int     10h");
> }
>
> I think this is correct but I am not an i386 assembly expert, nor a GCC
> embedded assembler expert.  I would read the assembler code
> syntax in the GCC
> manual, have an attempt at rewriting your code and compile it.
> If you can't
> get it to work then cut the C routines with the assebler from the code and
> paste (not attach) them in an email asking for help.  Include
> your attempts so
> people can see what you have tried.  Hopefully someone can correct your
> errors.
>
> Regards,
> Brendan Simon.
>
>
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
>


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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