org directive
SMarF at gmx.de
SMarF at gmx.de
Tue Jul 4 04:19:06 PDT 2006
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
More information about the yasm-devel
mailing list