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,772 of 4,675    |
|    Bogdan (bogdro) to All    |
|    Re: interfacing ASM (ia-32) with GNU g77    |
|    30 Jun 17 20:02:09    |
      From: bogdan@nospicedham.poczta.gazeta.pl              On 27.06.2017 19:21, NimbUs wrotee:       > 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.                      I thought so, thanks for the confirmation.                     >>> *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                      I agree. Remember about the possibilities, but use whatever suits       your system best.                     >> 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...               Right. I'm using DJGPP myself too. Like I said - this was just       informational. Use whatever is the most convenient for you.                     --       Pozdrawiam/Regards - Bogdan (GNU/Linux & FreeDOS)       Kurs asemblera x86 (DOS, GNU/Linux): http://bogdro.evai.pl       Grupy dyskusyjne o asm: pl.comp.lang.asm alt.pl.asm alt.pl.asm.win32       www.Xiph.org www.TorProject.org Soft(EN): http://bogdro.evai.pl/soft              --- 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