Article View: gnu.gcc.help
Article #49932Assembly for 386 using gcc??
From: Doug Evans
Date: Tue, 07 Dec 1993 16:18
Date: Tue, 07 Dec 1993 16:18
38 lines
2422 bytes
2422 bytes
You need to find out what assembler is on your system and code for it. gcc contains no assembler, all it will do with files of .s suffix is pass them on to the assembler. To see this, add -v when you invoke gcc. I suspect what you need is to put a '%' in front of your registers, eg. %ebx. Remember, this is not gcc, this is your system's assembler (which may be the gnu assembler, it's hard to tell). Also, it is always a good idea to give more information than too little. For example, we know it's a 386, but what o/s (and what version) ? Resent-Date: 06 Dec 93 10:48:45 EST Date: 06 Dec 93 10:48:45 EST From: Philipp Marx <100273.171@compuserve.com> Sender: gnulists@ai.mit.edu Resent-From: bug-gcc-request@prep.ai.mit.edu Hello, I'm using the gcc utility version 2.4.1. (as ver. 2.2.1.) for a project which includes an assembler file. Developping and target system is a INTEL386/486 based system. The gcc utility for compiling C-code runs very well. But I got a lot of problems trying to use gcc for Assembly. I named my file with the extension ".s" and ran gcc without any option. So I got a lot of errors. The assembler source file is written for the MASM of Microsoft and so I had to eleminate all the statements like .MODEL , .386 ... I used only keywords known by the 386 Assembler specification. But the gcc reported problems with all the statements like name, stack, code32, assume and so on. At the lines with "mov ebp,esp" and "xor ebx,ebx" for example I got the error message "operands given don't match any known 386 instruction". I would be very glad if someone could help me concerning these problems. My e-mail address is: 100273.171@CompuServe.com
Technical Details
Message-ID:
<9312071613.AA27982@cygnus.com>Path:
arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!cygnus.com!djeReferences:
<931206154844_100273.171_BHB50-1@CompuServe.COM>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,947f853ad322703d X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-12-08 09:12:16 PST Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!cygnus.com!dje From: dje@cygnus.com (Doug Evans) Newsgroups: gnu.gcc.help Subject: Assembly for 386 using gcc?? Date: 7 Dec 1993 11:18:36 -0500 Organization: GNUs Not Usenet Lines: 39 Sender: daemon@cis.ohio-state.edu Distribution: gnu Message-ID: <9312071613.AA27982@cygnus.com> References: <931206154844_100273.171_BHB50-1@CompuServe.COM>