Ok, thanks thanks!!! Have a lot of thinks I need to learn.... When I generate the exe file, something is wrong with this: dosh.e_magic = cast(WORD)*"MZ".ptr; When the PE file is generate in EXE have just the "M" of "MZ"...