Article View: comp.os.msdos.programmer
Article #1326Re: studying executables
From: Ross Ridge
Date: Mon, 07 Sep 1992 09:09
Date: Mon, 07 Sep 1992 09:09
46 lines
2613 bytes
2613 bytes
ara@zurich.ai.mit.edu (Allan Adler) writes: >First, it seems to me that every compiler and every assembler must have its >own idiosyncratic way of producing the executable. Is that true? ross@zooid.guild.org (Ross Ridge) writes: >For compilers yes, for assemblers no. With assemblers every byte of >the execuatable is under the programmers control. mlevis@ringer.cs.utsa.edu (Mike Levis) writes: >Actually, assemblers have their own way of producing executables, too. >There is a share-ware assembler (I think it is called A86) that even >says that it creates opcodes different from other assemblers. This >way, the author can sue unregistered owners for not registering. >There are different ways an assembler can create a "fingerprint". >One example is ``MOV BX, AX''. An assembler can generate either >``89h C3h'' or ``8Bh D8h'' for the opcode (I don't have A86, so I >don't know which opcode set it uses for ``MOV BX, AX''). True, this can be used to identify assemblers. I hadn't thought of that. But it isn't of any use in helping you understand the programme. >Likewise, an assembler can optimize the code for speed and/or size. >For example, I have TASM, which converts a far call into the same >segment into a push cs and near call. > >TASM also automatically generates code for you, such as when using >Language modifiers. For example, you can call a C function from >your ASM program. TASM will push your parameters (using the C >parameter passing protocol), make the call, then adjust the stack >for you. Neither of these examples help you identify the assembler, the code generated by TASM could've easily been generated explicitly by another assembler or even automatically by a compiler. They're still also fully under control of the programmer. The second example however, a programme using the C language calling convention, whether automatically or not is something that can be used to gain some insight into the programme. Ross Ridge -- Ross Ridge - The Great HTMU l/ // [OO][oo] ross@zooid.guild.org /()\/()/ uunet.ca!zooid!ross db //
Technical Details
Message-ID:
<1992Sep7.090918.18154@zooid.guild.org>Path:
arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!geac!torag!zooid!rossReferences:
<ARA.92Sep6131908@camelot.ai.mit.edu> <1992Sep6.232408.11684@zooid.guild.org> <1992Sep7.034936.28892@ringer.cs.utsa.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!uunet.ca!geac!torag!zooid!ross From: Ross Ridge <ross@zooid.guild.org> Subject: Re: studying executables Organization: ZOOiD BBS Distribution: comp Date: Mon, 7 Sep 1992 09:09:18 GMT Message-ID: <1992Sep7.090918.18154@zooid.guild.org> References: <ARA.92Sep6131908@camelot.ai.mit.edu> <1992Sep6.232408.11684@zooid.guild.org> <1992Sep7.034936.28892@ringer.cs.utsa.edu> Lines: 46