16 bit exe?



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


.