Page 1 of 1
Linker that works with fasm plus .bin Q
Posted: Wed Nov 07, 2007 6:10 pm
by crazygray
I am looking for a linker that will work with fasm.
Q:
I opened the .bin file that was output from fasm and found that the
lea instruction produced the lea opcode but just 00s after it
here is the beginning of the file?
8D 05 00 00 00 00 is the address added in on linking?
Posted: Wed Nov 07, 2007 7:10 pm
by frank
LD works with FASM. Of course non of the LDs on windows have out of the box support for binary output.
Posted: Wed Nov 07, 2007 7:43 pm
by crazygray
the address was the first byte and I didn't realize it.
Posted: Sat Nov 10, 2007 7:43 am
by inflater
FASM doesn't make object files for linkage. It will assemble and link and you will get the stand-alone application. There's no way to link object files in FASM.
If you want to combine two apps into one using FASM, please note that the second app must be .COM. You will reserve the space e.g. 30 kB in your first app (.EXE or .COM), and then you compile the both applications. If the compile process was successful, all you would have to do is raw write the 2nd .COM into your first application, you need the correct offset value to do that. Inflater called this as Self-Hacking(TM) and he is using this method in his OS.
.BIN is the standalone application. If you have put ORG 100h, which I see
you didn't, you would get a simple app in the .COM format.
Please, start learning your OS basics first, because the second question will be "why mov 1,ax doesnt work"
.
Posted: Sat Nov 10, 2007 9:07 am
by crazygray
Yeah, I just found that out on the fasm manuals.