replace true(1) and false(1) with simple shell scripts
Jake Maciejewski
maciejej at msoe.edu
Sun Mar 19 12:57:29 PST 2006
I'm perfectly happy with the current C versions. I was just reporting
what everyone else is doing. If we really want to go nuts, we could
assemble the ELF executables as a raw binaries like in
http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
On Sat, 2006-03-18 at 23:26 -0800, David Cuthbert wrote:
> Jake Maciejewski wrote:
> > I checked other *NIX distros. NetBSD and OpenBSD use shell scripts,
> > Solaris uses C but with _exit() before the return statement, and GNU
> > uses a C program, but I haven't checked the source.
>
> Well, as long as we're bikeshedding and optimizing the pointless... ;-)
>
> % cat true.s
> .text
> .globl _start
> .type _start, @function
>
> _start:
> pushl $0
> pushl $0
> movl $1, %eax
> int $0x80
>
>
> % cat false.s
> .text
> .globl _start
> .type _start, @function
>
> _start:
> pushl $1
> pushl $0
> movl $1, %eax
> int $0x80
--
Jake Maciejewski <maciejej at xxxxxxxx>
More information about the Submit
mailing list