logoalt Hacker News

rrampageyesterday at 11:11 AM1 replyview on HN

I've been building small programs in Zig, C and ARM64 assembly without relying on libc and only using Linux syscalls directly.

Some examples:

- A minimal C shell with built-ins like cd, pwd, type: https://gist.github.com/rrampage/5046b60ca2d040bcffb49ee38e8...

- Terminal Snake game which fits in a QR code using Linux syscalls for drawing: https://gist.github.com/rrampage/2a781662645dc2fcba45784eb58...

- HTTP server with sendfile support in ARM64 assembly: https://gist.github.com/rrampage/d31e75647a77badb3586ebae1e4...

I learned to handcraft a static ELF binary using just GNU assembler (no linker): https://gist.github.com/rrampage/74586d0a0a451f43b546b169d46... . Trying to see if I can craft a small assembler in ARM64


Replies

kunleyyesterday at 11:48 AM

Kudos! Especially for the asm.

http.S is something I wanted to do by myself, ended up with generating data in asm and reusing Go for a http server.