Having written the aforementioned, I thought maybe y'all would be interested in a very very lightweight version of same done w/ my assembler of choice (only because it reminds me of Turbo Assembler from way back in the day).
format ELF64 executable
_start:
mov eax, 1 ; syscall # = write
mov edi, 1 ; man 2 write arg1 == our fd, stdout
mov esi, .msg ; "" arg2 == const void *buf
mov edx, .msglen ; "" arg3 == size_t count
syscall
mov eax, 60 ; syscall # = exit
xor edi, edi ; man 2 exit arg1 == status
syscall
.msg:
db 'Greetings, HackerNews!',10
.msglen = $ - .msg
I don't think it gets much clearer or simpler than that, and more so that "man 2 xxx" provides all of the information you need for syscall goods anyway, it really isn't that bad :-)if you compile this with fasm (http://www.flatassembler.net/) it produces a 174 byte ELF64 (and if we wanted to have some fun, we could lower that number by quite a bit still).
Cheers!
Edit: leading spaces for code