Re: stand-alone binary

From: SFD (sfd_at_adelphia.net)
Date: 08/30/04


Date: Mon, 30 Aug 2004 14:58:55 -0400


"Norm Dresner" <ndrez@att.net> wrote in message
news:dyKYc.534065$Gx4.358845@bgtnsc04-news.ops.worldnet.att.net...
> "SFD" <sfd@adelphia.net> wrote in message
> news:S42dnfWrnLMSxK7cRVn-qQ@adelphia.com...
> > I'm trying to create a stand-alone binary file that can be executed
before
> > 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
OS
> services so you don't have std-in/our/err channels either, your only
choice
> 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
if
> your particular library doesn't provide the routines necessary to do
direct
> hardware I/O.
>
> What are you trying to do that a simple sign on the machine wouldn't
> accomplish?
>
> Norm

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



Relevant Pages

  • Re: stand-alone binary
    ... "Norm Dresner" wrote in message ... >> I found a file type that works on boot up, I just am not sure how to ... I did find some asm code that prints a message. ... and it seems the 4c is the interupt that returns to dos. ...
    (comp.unix.programmer)
  • Re: With Tiger is OS 9 pointless?
    ... > partitions on machines which can't boot OS 9. ... Or perhaps the users have no apps which need Mac OS 9, ...
    (comp.sys.mac.system)
  • Re: 2.6.22-rc1-mm1
    ... With these two patches in combination, previously failing machines ... patches but silently fail on boot with no output via earlyprintk. ... forward to v2.6.22-rc2-mm1 and that also fails. ... and decompressor into memory ok and execution passed to it normally. ...
    (Linux-Kernel)
  • RE:: freebsd7 on older machines
    ... older machines To: freebsd-questions@xxxxxxxxxxx Message-ID: ... i read somewhere that the older drives aren't supported by the installation cdrom. ... or i can setup the hd on another machine that does support the install cdrom and then transfer to the older machine. ... if i dd a hd onto another hd will i have a problem with the mbr and be unable to boot? ...
    (freebsd-questions)
  • Re: New XP box will only boot in safe mode?
    ... Also, this is happening on two identical, new machines with the ... combination does boot in normal mode. ... You can access Event Viewer by selecting Start, Administrative Tools, ... done I had to install a couple of applications that some of the ...
    (microsoft.public.windowsxp.help_and_support)