Re: BDS2006 exe sizes



"J French" <erewhon@xxxxxxxxxx> wrote in message
news:43fefcb1.88192437@xxxxxxxxxxxxxxxxxxxxxxx
On Thu, 23 Feb 2006 17:00:28 +0000, Dodgy
<Dodgy@xxxxxxxxxxxxxxxxxxxxx> wrote:
[...]
If memory serves me right, in DOS 8086 assembly this would be less
that 20 bytes, most of them being the string itself.

Actually I get 26 bytes

CODE SEGMENT PARA PUBLIC 'CODE'
ASSUME CS:CODE,DS:CODE,ES:CODE
ORG 100h

BEGIN:
lea DX, Msg
mov AH, 9
int 21h

mov AH, 4Ch ; ===== EXIT to DOS ===>
int 21h

Msg db 'Hullo World',13,10,'$'

CODE ENDS
END BEGIN

Using Int 20h to exit actually comes out at 27 bytes

You could also use a NEAR RET to terminate. Initial memory layout was
doctored so that it would... well, do something that terminated your
program. I'd have to look up what and why exactly, and the book is at
home.

[...]
This brings back memories ....

.... not all of them pleasant.

Groetjes,
Maarten Wiltink


.



Relevant Pages