9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: James Tomaschke <james@orcasystems.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] The first annual "Hello, World" challenge
Date: Tue, 18 Aug 2009 16:18:13 -0700	[thread overview]
Message-ID: <4A8B36B5.3050305@orcasystems.com> (raw)
In-Reply-To: <14ec7b180908181153h493b2e45y33f59d2731a6ca58@mail.gmail.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

andrey mirtchovski wrote:
> i have some variations on a theme:
>
> linux, i386: main() { syscall(4, 1, "hello world\n", 12); } (~6KB
> dynamically linked)
> linux, x86: main() { syscall(1, 1, "hello world\n", 12); } (~6KB, 4KB
> stripped; 2.4megs statically linked, 400KB statically linked and
> stripped)
You can also use some alternative libcs for a reduced footprint, or
eliminate libc altogether with some simple inline assembly.  GNU is
really bloated.

I'm not sure where one draws the line though, theres also is a lot of
code and memory behind that syscall before anything is seen on the
screen, which could be considered part of the "linked" code.

One could always poke data into video memory and avoid all that, but
that does not get us the "Are you sure?" dialog box or status bars that
go from 0 to 100% over and over again.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqLNrUACgkQl3JZTBu3/9naawCdF9Hlx2niYJJpnbT52tLobmU6
btEAmQGuBC629h7Xx7fu6FKD8NE5yRr7
=JBrq
-----END PGP SIGNATURE-----



  reply	other threads:[~2009-08-18 23:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-18 17:26 ron minnich
2009-08-18 17:53 ` John Floren
2009-08-18 18:53   ` andrey mirtchovski
2009-08-18 23:18     ` James Tomaschke [this message]
2009-08-19 10:32     ` Uriel
2009-08-19 13:52       ` andrey mirtchovski
2009-08-18 17:54 ` erik quanstrom
2009-08-19  0:25 ` Abhishek Kulkarni
2009-08-19  2:06   ` LiteStar numnums

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A8B36B5.3050305@orcasystems.com \
    --to=james@orcasystems.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).