Re: BDS2006 exe sizes



On Thu, 23 Feb 2006 17:00:28 +0000, Dodgy
<Dodgy@xxxxxxxxxxxxxxxxxxxxx> wrote:

<snip>

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

I suppose one could lose the 13, 10
- yes that is fine, down to 24 bytes

This brings back memories ....


.



Relevant Pages

  • Re: Cant get "hello world" to work on nasm
    ... msg db "Hello, World!$" ... If that's the kind of Hello World you were looking for, you should probably use "mov ah, 9" - it'd be a lot "safer". ... But int 21h/9 is kinda lame. ... ret; this "returns" to an int 20h ...
    (comp.lang.asm.x86)
  • Re: stand-alone binary
    ... >> Since it's not dos, i'm not sure if there is a different code that ... > mov si, msg ... I'm assuming the int 21h, ... Msg db "This is a messag" ...
    (comp.unix.programmer)
  • Re: The Mark Of The Mushroom
    ... This failed to compile properly with those compile lines displayed. ... mov eax, 0900h ... ; int 20h ... 0C2B:0101 8D161500 LEA DX, ...
    (comp.lang.asm.x86)
  • Re: rename fils
    ... mov bx,00h ... jne infile24; ... lea dx, NO_PARMS ... int 21h ...
    (comp.lang.asm.x86)
  • Re: DispatchMessage: What is message # 0xC0FE ?
    ... windows.h defines the MSG structure which is what ... WPARAM wParam; ... LPARAM lParam; ... belief you have that a WPARAM or an LPARAM can be represented by an int is erroneous. ...
    (microsoft.public.vc.mfc)