Article View: gnu.gcc.help
Article #46499DJGPP w/INTEL 386: SOLUTION!
From: Henrik Steen
Date: Sat, 19 Nov 1994 12:32
Date: Sat, 19 Nov 1994 12:32
31 lines
1810 bytes
1810 bytes
In response to my laments about not being able to use Intel 386 assembler in GNU C, Ken wrote the following letter (he asked me to post it - here it is): From: ken@Synema.COM (Ken Whaley) Message-Id: <9411172341.AA22027@bedrock.synema.com> To: hasteen@inet.uni-c.dk Subject: asm w/djgpp piece of cake! What you do is get MASM6.11, which has the option to create coff-style object files, which is what djgpp expects. These object files can then be linked in with other djgpp-produced .o files to form your program. Of course, your assembly code must already be 32-bit protected mode, and you must use the djgpp procedure calling conventions (which I believe are "push bp" on procedure entry and "leave", "ret" on procedure exit. Compile a function with djgpp and look at the object file to see the calling convention it requires). I did this to create an assembly routine assembled with MASM called from C compiled and linked under djgpp. Ken p.s. if you need explicit detail, I have the files/makefile at home. However, the exercise of figuring it out is useful in itself.
Technical Details
Message-ID:
<3akr9a$r0l@news.uni-c.dk>Path:
arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!netnews.upenn.edu!dsinc!ub!news.kei.com!newshost.marcam.com!usc!howland.reston.ans.net!pipex!sunic!news.uni-c.dk!inet!hasteenShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,dfdbdf82f96c6d3d,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1994-11-19 04:32:42 PST Path: arc1-ca.pugleaf.net!nntp.gmd.de!newsserver.jvnc.net!netnews.upenn.edu!dsinc!ub!news.kei.com!newshost.marcam.com!usc!howland.reston.ans.net!pipex!sunic!news.uni-c.dk!inet!hasteen From: hasteen@inet.uni-c.dk (Henrik Steen) Newsgroups: gnu.gcc.help Subject: DJGPP w/INTEL 386: SOLUTION! Date: 19 Nov 1994 12:32:42 GMT Organization: News Server at UNI-C, Danish Computing Centre for Research and Education. Lines: 36 Message-ID: <3akr9a$r0l@news.uni-c.dk> NNTP-Posting-Host: inet.uni-c.dk X-Newsreader: TIN [version 1.2 PL2]