Re: stand-alone binary
From: SFD (sfd_at_adelphia.net)
Date: Mon, 30 Aug 2004 14:58:55 -0400
"Norm Dresner" <firstname.lastname@example.org> wrote in message
> "SFD" <email@example.com> wrote in message
> > I'm trying to create a stand-alone binary file that can be executed
> > boot.
> > Is there a way to do this in C, or does it need to be done in assembly?
> > If it needs to be done in assembly, can it be assembled under Unix to be
> > stand-alone binary?
> > I'd like to be able to print a simple message.
> > Any examples, docs, references would be much appreciated.
> > Thanks
> Before boot, there is no file system so there are no shared libraries
> available -- static linking would be your only option. Also there are no
> services so you don't have std-in/our/err channels either, your only
> is to directly address the hardware which makes your program totally
> unportable, possibly even between similar machines with different
> accessories. It could be done in C -- a language that's often called a
> "high-level assembly language" though much I/O may have to be done in ASM
> your particular library doesn't provide the routines necessary to do
> hardware I/O.
> What are you trying to do that a simple sign on the machine wouldn't
What I'm trying to do is create a boot cd and if it is in the drive when
system boots, a message displays.
It can either display the message or cat a text file.
I found a file type that works on boot up, I just am not sure how to create
this type of file:
# file output
Microsoft a.out separate pure segmented standalone word-swapped V2.3
V3.0 86 small model executable