Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

fasm and .exe files

Hello,
I have the following asm code in fasm 1.51:
prog:
mov dl, 'A'
mov ah, 2
int 21h
repeat 25
inc dl
int 21h
end repeat
ret

and I'd like the assembler to generate a .exe file instead of a .com,
so I tried using the format PE directive, but that alone didn't work
(got an exception, page fault if I translated it correctly, that doesn't really make much sense to me, but I'm still a newbie :-).

As far as I've examined the FASM manual, it doesn't really give any clues as to what exactly is wrong (or what exact structure the source should have, which directives MUST be used, etc.). Any help is really appreciated!

Cheers

Comments

  • Ptr_082004Ptr_082004 Member Posts: 31
    : Hello,
    : I have the following asm code in fasm 1.51:
    : prog:
    : mov dl, 'A'
    : mov ah, 2
    : int 21h
    : repeat 25
    : inc dl
    : int 21h
    : end repeat
    : ret
    :
    : and I'd like the assembler to generate a .exe file instead of a .com,
    : so I tried using the format PE directive, but that alone didn't work
    : (got an exception, page fault if I translated it correctly, that doesn't really make much sense to me, but I'm still a newbie :-).
    :
    : As far as I've examined the FASM manual, it doesn't really give any clues as to what exactly is wrong (or what exact structure the source should have, which directives MUST be used, etc.). Any help is really appreciated!
    :
    : Cheers
    :

    use the Format MZ instead of the Format PE directive
Sign In or Register to comment.