News for hackers. Stuff that matters.
Re:1001 Things To Hack Before You Die by jrockway on Thursday November 11, 2010 @10:03PM (#1896346)
1. Write a Hello World application from scratch. No C library, compiler, linker, nothing. You get a hex editor.

Does this involve anything more than loading "Hello, world" into memory, setting up the registers/stack in a certain way, and invoking the syscall interrupt? (All the cool stuff happens in your terminal emulator. That's where 0x41 gets turned into the pixels that look like "A" on your screen, after all.)

Re:1001 Things To Hack Before You Die by angusgr on Thursday November 11, 2010 @10:15PM (#1896385)
At least part of the "fun" on a loosely modern operating system is learning the nuts and bolts of the executable format and loading conventions.

I've never spent much time there, but some of the ideas are laid out well in this two part post: http://blog.ksplice.com/2010/04/libc-free-world-2/

Doing it with _just_ a hex editor (ie writing out the ELF headers and sections yourself) may not be exactly what the commenter did, though. Cos that sounds really tedious.

I imagine that even writing "Hello, World" in the simpler way that you describe, on a simpler system (Apple IIe or so), would probably teach me something. I remember trying to write 6502 machine code in hex (no assembler) on my IIe when I was about 10 years old. It never worked then, I wonder if it would work now?

Re:1001 Things To Hack Before You Die by drblast on Friday November 12, 2010 @07:19AM (#1897405)
It's not that difficult or tedious, but it does require that you read the elf specification, or write your own "OS" from scratch.

http://www.muppetlabs.com/~breadbox/software/tiny/teensy.htm...

The idea is that you strip away everything that does something for you so that you are sure to completely understand the entire process with no "pushing the green compile button."

Re:1001 Things To Hack Before You Die by derefr on Friday November 12, 2010 @04:06AM (#1897052)
Write it for a system that doesn't have a terminal (or a character mode.) A Super Nintendo (65c816 CPU with the most thoroughly-tested emulators on the planet), say.
Re:1001 Things To Hack Before You Die by jrockway on Friday November 12, 2010 @05:10AM (#1897191)
Then it's just setting some bits in the video memory to "on".