X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Rod Pemberton" Newsgroups: comp.os.msdos.djgpp Subject: Re: djgpp for kernel dev. Date: Sun, 19 Mar 2006 19:20:29 -0500 Organization: Info Avenue Internet Services, LLC Lines: 81 Message-ID: References: <4404EB6F DOT D050DB39 AT compuserve DOT de> <200603011425 DOT k21EPHCE005449 AT envy DOT delorie DOT com> <4409DE30 DOT 46EFBC5F AT compuserve DOT de> <200603072000 DOT k27K0ggd005849 AT envy DOT delorie DOT com> <441032AE DOT A84CAA5C AT compuserve DOT de> <200603091536 DOT k29FaYMa029314 AT envy DOT delorie DOT com> <441C2040 DOT 972FE0A9 AT compuserve DOT de> NNTP-Posting-Host: c-68-60-59-250.hsd1.mi.comcast.net X-Trace: news3.infoave.net 1142814019 9630 68.60.59.250 (20 Mar 2006 00:20:19 GMT) X-Complaints-To: abuse AT infoave DOT net NNTP-Posting-Date: Mon, 20 Mar 2006 00:20:19 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Florian Liebig" wrote in message news:441C2040 DOT 972FE0A9 AT compuserve DOT de... > hello again. > I just want to make it short.. compiling with djgpp gcc 4.0.1. and > linking - using an own script file with output binary and defining text > and data sections options - everything is ok. > I have one last question now, I'd like to learn how to use AT/T > assembler syntax > for using as.exe and especially inside gcc (how to use it with keyword > inline). > since I know intel syntax by heart, but no at/t, give me some tutorial > hints, please. > where to start/find such documents ? > Florian, How is your OS coming? I've put mine on the back burner for a bit... I noticed Broeker has been replying. You should ask Broeker or Japheth or some of those guys to join you. First, a couple useful files, then some examples, then some links. These two files contain the assembly instruction encoding information for OpenWatcom and DJGPP: OW bld\wasm\h\asmins.h DJGPP binutl-x.xx\include\opcode\i386.h Examples A) and B): A) void asm_lidt(idt_pointer idtp) { #ifdef __DJGPP__ __asm__ ( "lidt %0\n" : /* no output */ :"m" (idtp) ); #endif #ifdef __WATCOMC__ _asm { lidt fword ptr idtp } #endif } B) #ifdef __DJGPP__ unsigned short nx_from_enx(unsigned long *enx) __attribute__ ((__always_inline__)); #endif #ifdef __WATCOMC__ __inline #endif unsigned short nx_from_enx(unsigned long *enx) { unsigned short nx; nx=(unsigned short)((*enx)&0x0000FFFF); return(nx); } Assembly links: http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html http://www.delorie.com/djgpp/doc/brennan/brennan_att_inline_djgpp.html http://www.cs.utah.edu/dept/old/texinfo/as/as_toc.html http://www.gnu.org/software/binutils/manual/gas-2.9.1/html_chapter/as_16.html http://www.delorie.com/gnu/docs/binutils/as_270.html Format links: (I read your OW posts...) http://www.yeyan.cn/Programming/gcc-ld-compile-binary-formats.aspx http://devpit.org/wiki/Compiler_Options_for_Creating_Odd_Binaries Rod Pemberton