
Emulator basics: a stack and register machine - eatonphil
http://notes.eatonphil.com/emulator-basics-a-stack-and-register-machine.html
======
delinka
> If you know why our macOS users use _main I'd love to know.

You'll find this on Linux, too. You'll notice the compiler (on POSIX systems?)
prefixes your symbol names with _ since The Dawn Of Time.

~~~
CalChris
The leading underscore on MacOS is part of the Mach-O standard [1]. This was
inherited from a.out which really wasn't much of a standard _per se_ but
rather just a collection of a.out implementations [2]. Mach-O (1987) predated
ELF (1993) and the later ELF abandoned the underscore as unnecessary.

[1] [http://math-
atlas.sourceforge.net/devel/assembly/MachORuntim...](http://math-
atlas.sourceforge.net/devel/assembly/MachORuntime.pdf)

[2]
[https://www.nasm.us/doc/nasmdoc9.html](https://www.nasm.us/doc/nasmdoc9.html)

