Lurker News
This is ymawky, a static file web server for MacOS written entirely in ARM64 assembly. It supports GET, PUT, DELETE, HEAD, and OPTIONS requests, and supports Range: bytes=X-Y headers (which allows scrubbing for video streaming). It decodes percent-encoded URLs, strictly enforces docroot, serves custom error pages for any HTTP error response, supports directory listing, and has (some) mitigations against slowloris-like attacks.

I’ve also written a more detailed writeup here: https://imtomt.github.io/ymawky/

Comments (227) 57 threads

Show all comments

Showing thread 38 of 57

JSR_FDED1 reply#
This is a great resource, thank you!

The last time I did anything in assembler was x86 under DOS. Your code makes ARM64 with a modern OS less scary than I thought it would be.

t-31 reply#
Arm is very nice to write assembly for. Having a proper load/store register-centric architecture rather than a stack-centric like x86 makes the mental load of writing code go waaay down, so the attractiveness of HLLs for ease of writing code is greatly diminished on RISC.
userbinator1 reply#
Hell no. Far too many registers, not enough instructions, and (especially with ARM64) weird restrictions that arose from trying to pack things into 32-bit instructions as efficiently as possible.

I've been writing x86 Asm for a few decades. RISCs are simpler in all the wrong ways. After all, "just use a (stupid) compiler" was the whole philosophy.

t-3#
Arm64 has plenty of instructions (although some convenient instructions listed in the ISA manuals seem to be rarely available in consumer hardware), and more registers is always better. I do find the lack of wide immediates annoying, but otherwise the fixed-width instruction set doesn't bother me at all.