Re: 16 bit exe?



"Dave Turner" <not@dave> wrote in message
news:4402a24d$1@xxxxxxxxxxxxxxxxxxx
Does anyone here know the formula for calculating the size of a 16 bit exe
based on IMAGE_DOS_HEADER alone?

I thought it was something like this but it's not quite right ...

BytesOnLastPage = IMAGE_DOS_HEADER.e_cblp
Pages = IMAGE_DOS_HEADER.e_cp
Size = (Pages * 512) + BytesOnLastPage

Almost -- e_cblp *is* the number of bytes on the last page. Yep -- the one
mentioned in e_cp!
So the size = (Pages-1)*512+BytesOnLastPage.
Cor! I knew that but to confirm I hadda search my legacy code directory for
that! (dirtasm.c, oct 3 1997)

[Jongware]


.



Relevant Pages

  • Re: More of "Index was outside the bounds of the array"
    ... questions to me alone (I cannot speak for Herfried). ... When I was you I would place this question again, without that Cor and ... because I don't know that as a function to create a datarow. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: date problem
    ... There are more than alone this sample ... expecially for your problem on our VB-Tips website. ... Cor ... Prev by Date: ...
    (microsoft.public.dotnet.general)
  • Re: textbox question
    ... This is about buttons so have a look alone to the addhandler and the event ... Cor ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Url Block
    ... however not alone for kids. ... This is as well for workers in a company. ... Cor ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Formatting problem
    ... Because Greg is all alone in this thread, I find this one real very nice ... txtEntries.Text = FormatCurrency(CDec(txtEntries.Text)* 1.5) ... Cor ...
    (microsoft.public.dotnet.languages.vb)