Related, how to print "Hello world" without libc: https://www.youtube.com/watch?v=b9OJYMFpHRU&ab_channel=Rubbe...
At 7:44 they go into the “magic numbers” used to define kernel syscalls like how Cosmopolitan [0] uses for building things like RedBean [1].