f0dder's fabulous folly.

From: hutch-- (hutch_at_movsd.com)
Date: 07/19/04


Date: 19 Jul 2004 04:59:43 -0700

First I must apologise to the members of this news group for directly
addressing this matter but it is important from the MASM32 project and
its target audience that the mistakes being sold by f0dder are not
left unanswered.

f0dder has tried for some years to sell the view that if you have
function duplicates in MASM, you add in extra code yet it has always
been a mistake and a demonstration of his technical ignorance in using
MASM. The following test program clearly proves that function
duplication has NOTHING to do with an occasional jump table entry that
MASM adds to a program and that it is an include file order problem
that is easily solved.

Following is the test program that proves this very clearly.

; ллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллл

    .486 ; create 32 bit code
    .model flat, stdcall ; 32 bit memory model
    option casemap :none ; case sensitive
 
    include \masm32\include\windows.inc
    include \masm32\include\masm32.inc
    include \masm32\include\kernel32.inc

  ; ------------------------------------------
  ; proof that prototype duplication of an API
  ; from an IMPORT library does not increase
  ; the executable image size.
  ; ------------------------------------------
  REPEAT 1024
    wsprintfA PROTO C :DWORD,:VARARG
    wsprintf equ <wsprintfA>
  ENDM

  ; ----------------------------------------------------
  ; proof that prototype duplication of a static library
  ; does not increase the executable image.
  ; ----------------------------------------------------
  REPEAT 1024
    write_disk_file PROTO :DWORD,:DWORD,:DWORD
  ENDM

    includelib \masm32\lib\user32.lib
    includelib \masm32\lib\kernel32.lib
    includelib \masm32\lib\masm32.lib

    .code

start:
 
; ллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллл

    invoke ExitProcess,0

; ллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллллл

end start

----------------------------------

This test program produces this dump.

 Imp Addr Hint Import Name from kernel32.dll - Not Bound
 -------- ---- ---------------------------------------------------------------
 00002000 80 ExitProcess

IAT Entry

 00000000: 00002038 00000000

Disassembly

00401000 start:
00401000 6A00 push 0
00401002 E801000000 call fn_00401008
00401007 CC int 3
00401008 fn_00401008:
00401008 FF2500204000 jmp dword ptr [ExitProcess]

There is no entry in the jump table for wsprintfA in spite of the
nonsense that f0dder has kept sprouting and a duplicate prototype has
nothing to do with why you get the entry at times.

Coment out WINDOWS.INC and you get this dump.

 Imp Addr Hint Import Name from user32.dll - Not Bound
 -------- ---- ---------------------------------------------------------------
 00002008 262 wsprintfA

 Imp Addr Hint Import Name from kernel32.dll - Not Bound
 -------- ---- ---------------------------------------------------------------
 00002000 80 ExitProcess

IAT Entry

 00000000: 00002074 00000000 - 0000205C 00000000

Disassembly

00401000 start:
00401000 6A00 push 0
00401002 E807000000 call fn_0040100E
00401007 CC int 3
00401008 FF2508204000 jmp dword ptr [wsprintfA]
0040100E fn_0040100E:
0040100E FF2500204000 jmp dword ptr [ExitProcess]

Note the 6 byte jump table entry for wsprintfA.

f0dder has made the assertion in this newsgroup that prototype
duplication with static libraries adds extra code to the executable
file image. the REPEAT bnlock of 1024 extra redundant prototypes
simply proves that his assertion is nonsense.

I normally don't have time to do this stuff to shut up trolls but the
risk is that a learner will actually beleive f0dder ande make mistakes
that make their learning process that extra bit harder which is not
needed when learning assembler under Windows.

I will put it to f0dder that it is time to pull your head in and stop
feeding on learner programmers like a parasite to impress you piss
weak little virus buddies. If you have nothing useful to say, say
nothing, the repeated mistakes that you have whined on about for years
have mislead programmers that need all the help they can get, not
misinformation to feed your guru status among your virus buddies.

Regards,

hutch at movsd dot com



Relevant Pages

  • Simplified Data Entry
    ... duplicated entries and try to prevent operator entry errors. ... This data is entered weekly at the moment to avoid duplication but I ... Clients may have more than one a/c but the weekly amount may change but ... provided the a/c is already present in a previous ...
    (microsoft.public.excel.misc)
  • Re: Inserting multiple rows in one entry
    ... I believe I understand "what" you are trying to do (insert multiple rows in ... solve by having all the duplication of values your post implies? ... > Once the 1st entry is recorded in the table, I compute the next 7 rows ... > cause unnecessary problems because the Registration_ID is the most key ...
    (microsoft.public.access.formscoding)
  • Re: more than one set of records separated by blank lines
    ... trigger on the last entry instead. ... Please try posting a complete program if you are having more trouble. ... the special file handle to include test data in a test program. ...
    (comp.lang.perl.misc)
  • Re: Query to duplicate last entry
    ... If you look at the results you want, you are duplication names, IDs ... Applications ... Your table looks to be incorrect. ... I need to duplicate the last entry in a table. ...
    (microsoft.public.access.queries)
  • Re: Inserting multiple rows in one entry
    ... It sounds like there is a duplication involved but actually there is not. ... just went back and checked the database table how the data is stored. ... >> Access Gurus, ... >> Compute for 2nd entry: ...
    (microsoft.public.access.formscoding)