Hacker News new | past | comments | ask | show | jobs | submit login

Going through a similar phase, though this is way further along. :) I had a great course in college on computer architecture that culminated in a processor in Logisim that could run fairly complex programs. (I recommend the Harris and Harris textbook for a surprisingly light/easy introduction [0].) But that was a while ago and I've never done anything for x86/amd64.

I started working on an emulator [1] a few weeks ago but it interprets Intel x86 assembly rather than ELF files. I found this a great way to get started since parsing text is easier and the instructions you need to get a basic C program (compiled to assembly) running take an hour or two: call, push, pop, add. You can shim _start in without having to implement syscalls.

Conditional jumping and syscalls took another weekend or two and now it can run some basic fibonacci C programs. I also had to build a graphical debugger for it to see what was going on... I will probably move to reading ELF files soon.

I'll be writing up the process in a series on x86/amd64 emulator basics.

[0] https://www.goodreads.com/book/show/2558730.Digital_Design_a...

[1] https://github.com/eatonphil/x86e




Your emulator project is really neat. I would love to see more documentation on the design and process of it. The notes.md file was pretty spartan. Thanks for sharing. Cheers.



Will post back once I start the series!


This is awesome, will look forward to following its progress




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: