home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,735 of 4,675   
   NimbUs to All   
   Re: interfacing ASM (ia-32) with GNU g77   
   27 Jun 17 17:21:23   
   
   From: nimbus@nospicedham.XXX.invalid   
      
   Bogdan (bogdro) dit dans news:595281ca$0$657$65785112   
   @news.neostrada.pl:   
      
   >  Now this is interesting indeed. This is most probably OS-   
   dependent.   
   > For example, Linux doesn't decorate C names, so "printf" in   
   source   
   > code is just a "printf" in binary, but on DOS or Windows,   
   it's   
   > "_printf". I may need to update my tutorial. Could you just   
   tell me   
   > what Fortran's "MAIN" looks like in the binary? Is it   
   "_MAIN__" (1   
   > underscore before, 2 underscores after)?   
      
   This one is easy, taking a peek inside g77-generated .exe   
   files : is '_MAIN__' exactly as you predicted.   
      
   >> *Mod. 2 : The object format expected by g77 on the platform   
   is   
   >> coff, not ELF, so I had to change the assembler command   
   line   
   >> to :  'nasm -f coff asm1fl.asm' .   
      
   >  Yes. For DJGPP on DOS it also would be COFF,   
      
   Though Frank suggested 'nasm -f win32' produces a Coff-variant   
   more suitable for Win32 platforms. Both types worked for your   
   simple demo, but maybe would not on sources   
      
   > for 16-bit compilers it   
   > would be OMF, but I don't know if GNU compilers are ported   
   to 16 bit   
   > somewhere, so no need to worry about this, just a side note.   
      
   Fortunately GNU Fortan programs, nominally compiled for the   
   Windows 32 bit "console" system, /do/ run, unmodified, under   
   the late Japheth's "HX" DPMI + Win emulation for DOS. Thus it   
   is not really necessary to long for a native DOS port of the   
   GNU compiler, that will never happen for a lot of reasons, I   
   think...   
      
   Regards !   
      
   --   
   NimbUs   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca