org directive
Vikas Kumar
vikasnkumar at users.sourceforge.net
Tue Jul 4 11:00:40 PDT 2006
Hi SMarF
>From what I have read on the net, I think DOS programs start at "org 100h"
Vikas
On 7/4/06, SMarF at gmx.de <SMarF at gmx.de> wrote:
> Hi there,
>
> trying to write my on DOS-EXE-stub, I tried the org directive in YASM (can't say enough "thank you" for this nice :) program!), but I don't get it run. Perhaps anyone can help me out or note this as a bug report:
>
> BITS 16
> ;DOS-EXE-Header
> db 'M','Z'
> .... ;some more header information
> dw 0
> ORG 0 ;resetting offset from 40h to 0h
> push cs
> pop ds
> mov dx,msg ;dx: offset of message to print
> mov ah,009h ;ah=09: print string
> int 21h ;DOS software interrupt
> mov ax,04C01h ;ah=4C: terminate program, al=01: errorcode
> int 21h ;DOS software interrupt
> msg:
> db 'This program needs Win32',13,10,'$'
>
> After assembling with the latest snapshot (r1590) register dx is loaded with offset 0x4E instead of 0xE.
>
> Thank you for your help and your work, best regards
> Stefan
> --
>
>
> "Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
> Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
> _______________________________________________
> yasm-devel mailing list
> yasm-devel at tortall.net
> http://cvs.tortall.net/mailman/listinfo/yasm-devel
>
More information about the yasm-devel
mailing list