3 ms·
I'll try and get this building for OSX. For the uninitiated, might I recommend my: http://nickdesaulniers.github.io/blog/2014/04/18/lets-write-some-x86-64/ htt
by ndesaulniers 11y ago
I'll try and get this building for OSX.
For the uninitiated, might I recommend my: http://nickdesaulniers.github.io/blog/2014/04/18/lets-write-some-x86-64/ http://nickdesaulniers.github.io/blog/2014/04/18/lets-write-...
Though, this is written in yasm syntax, which is slightly different.
Also, keep an eye out for a blog post on Interpreters, Compilers, and JITs I'm working on (cleaning it up and getting it peer reviewed this or next week)!
update 1
Actually, would the syscall's be different between Linux and OSX? Let's find out, once this builds! hammers away
update 2
Got it building and linking. bus error when run, debugging with gdb.
update3
Can't generate dwarf2 debug symbols for OSX?
$ yasm -g dwarf2
update 4
Careful, this tries to listen on port 80 [0] (0x5000 (LE) == 5*16^1 == 80), I would never run any assembly program off the web with elevated privileges. I recommend 0xB8B0 (LE, port 3000).
update 5
> Actually, would the syscall's be different between Linux and OSX?
Looks like yes: http://unix.stackexchange.com/a/3350 http://unix.stackexchange.com/a/3350
These might be close to shim out (OSX and Linux at least share a calling convention, unlink Windows). I'll upstream what I have.
[0] https://github.com/nemasu/asmttpd/blob/master/main.asm#L24 https://github.com/nemasu/asmttpd/blob/master/main.asm#L24
- j42 11y agoFreudian slip? unlink(Windows) indeed...