compiling in binary

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Stefan

compiling in binary

Post by Stefan »

I want to know how does an flat binary object look.
Is it something similar with COM format?
I am asking because I didn't find any documentation about flat binary!
Anybody ... help!!!
Thanks
j.weeks

RE:compiling in binary

Post by j.weeks »

>On 2001-12-08 16:37:05, Stefan wrote:
>I want to know how does an flat binary object look.

Like a regular binary file... lots of 1's and 0's :)

>Is it something similar with COM format?

Kind of, I suppose. In actuality, a flat binary
has no format. If you're familiar with assembly
language, think of a flat binary as your assembly
language file, translated exactly into machine
language. The only formatting you'll have is that
which you put into your assembly code yourself.

>I am asking because I didn't find any documentation about flat binary!

'cuz most OS developers just assume people know about
the flat binary "format" :)

I'm guessing you wanna jump to a flat binary
produced by a C/C++ compiler?

Unfortunately, you can't do this _per se_, because
flat binary files have no entry point. You're gonna
have to write some assembly language that'll
call your entry point (perhaps _main) and link that
with the C/C++ file, and output it to a binary.

If your assembly langauge code is first on the
command line, it'll be first to be outputted into
the binary, and so it'll be save to jump directly
to the beginning of the binary to execute it.

>Anybody ... help!!!
>Thanks

Well, hopefully that makes sense. I'm incredibly
tired and delerious right now, so... just smack me
if I screwed something up :)

jeff
Stefan

RE:compiling in binary

Post by Stefan »

Thank you jeff. I had an ideea about flat binary,
and now I know that I was right! So, in conluzion I
began to work on my compiler, I made some great steps,
and I'll compile my OS with my own compiler!
j.weeks

RE:compiling in binary

Post by j.weeks »

>On 2001-12-10 05:00:00, Stefan wrote:
>Thank you jeff. I had an ideea about flat binary,
>and now I know that I was right! So, in conluzion I
>began to work on my compiler, I made some great steps,
>and I'll compile my OS with my own compiler!

Oh, sweet dude. Congats! I'm in the process of makin'
my own OO compiler (you doin' OO or procedural?)

Did I send you those Crenshawe docs? Good info on
writting compilers.

Where else did you find info on comp. contruction?

Jeff
Stefan

RE:compiling in binary

Post by Stefan »

I found a book about parsing techniques, but it is
a little to hard. I'm building a Object Oriented
Compiler, something like Java!
Post Reply