EXE file format info... mind blowing

Blitz3D Forums/Blitz3D Programming/EXE file format info... mind blowing

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi

as some people on here have noticed I like to reinvent the wheel for curiosity's sake so here it goes...

I was just curious of how to write an exe via the writefile and writeint commands in blitz... I know it is possible. So after much thought I decided learning the exe file format is a must at this stage and I did a ton of research and experimenting getting manny bsd's along the way. so after going through much strife to get to what I know about the exe file format already (which is relatively nothing) I decided that someone on the blitz blog might know.

all I know now is that the first 4 bytes of every exe are the same

0x4d and 0x5a consecutively

i think these translate to binary accordingly

0000 0000 0100 1101 x 0000 0000 0101 1010

is that right? and if so how would i write that via the writeint command? how does blitz write integers?

I also know that the first 80 to 100 ish bytes of every blitz3d compiled program are the same mostlikely because they have the same icon and information

so is there an expert in the field? does anyone know anything about this format that we use so often yet never have come to understand fully?