DragonFly BSD
DragonFly submit List (threaded) for 2006-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: replace true(1) and false(1) with simple shell scripts


From: David Cuthbert <dacut@xxxxxxxxx>
Date: Sat, 18 Mar 2006 23:26:55 -0800

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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]