Article View: gnu.gcc.help
Article #49915Assembly for 386 using gcc??
From: Philipp Marx
Date: Mon, 06 Dec 1993 16:05
Date: Mon, 06 Dec 1993 16:05
65 lines
2230 bytes
2230 bytes
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
Thank's Karsten
(Here is a sample of a part of the assembler file)
NAME TEST
STACK STACKSEG 1024
CODE32 SEGMENT ER PUBLIC
ASSUME DS:DATA
INDEX equ [ebp+10h]
VALUE equ [ebp+14h]
MTest proc near
push ebp
mov ebp,esp
push ds
push es
push esi
push edi
xor eax,eax
xor ebx,ebx
.
.
.
pop edi
pop esi
pop es
pop ds
pop ebp
mov ax, bx
ret
MTest endp
CODE32 ENDS
END
Technical Details
Message-ID:
<931206154844_100273.171_BHB50-1@CompuServe.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!compuserve.COM!100273.171Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,947f853ad322703d,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-12-06 17:56:28 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!compuserve.COM!100273.171 From: 100273.171@compuserve.COM (Philipp Marx) Newsgroups: gnu.gcc.help Subject: Assembly for 386 using gcc?? Date: 6 Dec 1993 11:05:48 -0500 Organization: GNUs Not Usenet Lines: 65 Sender: daemon@cis.ohio-state.edu Distribution: gnu Message-ID: <931206154844_100273.171_BHB50-1@CompuServe.COM>