Re: BDS2006 exe sizes
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 24 Feb 2006 15:08:03 +0100
"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
.
- Follow-Ups:
- Re: BDS2006 exe sizes
- From: J French
- Re: BDS2006 exe sizes
- References:
- BDS2006 exe sizes
- From: Ian
- Re: BDS2006 exe sizes
- From: Rob Kennedy
- Re: BDS2006 exe sizes
- From: Ian
- Re: BDS2006 exe sizes
- From: Bruce Roberts
- Re: BDS2006 exe sizes
- From: Dodgy
- Re: BDS2006 exe sizes
- From: J French
- BDS2006 exe sizes
- Prev by Date: Re: BDS2006 exe sizes
- Next by Date: Re: BDS2006 exe sizes
- Previous by thread: Re: BDS2006 exe sizes
- Next by thread: Re: BDS2006 exe sizes
- Index(es):
Relevant Pages
|