Linker that works with fasm plus .bin Q

Programming, for all ages and all languages.
Post Reply
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Linker that works with fasm plus .bin Q

Post 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?
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

LD works with FASM. Of course non of the LDs on windows have out of the box support for binary output.
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Post by crazygray »

the address was the first byte and I didn't realize it.
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Post 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. :P

.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" :roll:.
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Post by crazygray »

Yeah, I just found that out on the fasm manuals.
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
Post Reply