From: lonniem AT cs DOT utexas DOT edu (Lonnie McCullough) Newsgroups: comp.os.msdos.djgpp Subject: Re: Newbee question Date: Wed, 09 Jul 1997 00:51:22 GMT Message-ID: <33c2df0d.1695627@news.nol.net> References: <33bd0022 DOT 5201282 AT news DOT inet DOT fi> NNTP-Posting-Host: ip38-19.nol.net Lines: 41 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Fri, 04 Jul 1997 14:01:36 GMT, keijo DOT koivula AT pp DOT inet DOT fi (Atte A. Koivula) wrote: >Hi, > >I'm kinda new with DJGPP and programming alike, and was just wondering >how to link external (n)asm-modules with C/C++ code (I think it's done >by just linking the external asm-modules with C/C++ -modules with GCC, >but haven't had the courage to try it out :P), learning AT&T syntax is >frustrating and the TA2AS-syntax converter is somehow a bit weird... I >can't even get it translate a simple display-type setting -piece of >code (uh): > >mov ah, 0 >mov al,13h >int 10h > >(what would that look like with AT&T syntax?) > >I'm aware of Allegro, JLib, SVGAlib etc, but I prefer to learn things >"the hard way" before starting to use fancy-pants libraries :P to link an external asm module just assemble it then on the command line type gcc -o whatever.exe asmcode.o or to have gas assemble your asm stuff do gcc -o asmcode.o -c asmcode.s and gcc will invoke gas correctly to assemble your code after which you can use the first command I showed you or to do it all at once just do gcc -o test.exe test1.c test2.c asmcode.s -Wall and everything will be compiled and assembled for you (except you won't have the benefit of .o object files) AT&T syntax stuff: movb $0,%ah movb $0x13,%al int $0x10 Hope this helps. Lonnie McCullough lonniem AT cs DOT utexas DOT edu