News for hackers. Stuff that matters.
Re:Implement an emulator for a fantasy CPU in JavaScript by jhallenworld on Sunday August 23, 2020 @11:26PM (#24257297)
Well I have an important resource for this, the book "Hacker's Delight":

https://www.amazon.com/Hackers-Delight-2nd-Henry-Warren/dp/0...

This book will tell you how to efficiently generate condition flag values such as carry and overflow. It's easy when when you have extra bits available (such as emulating an 8 or 16 bit processor on a 32-bit processor), but less obvious when you are emulating a 32-bit processor on a 32-bit processor from a high level language.

There are no comments on this comment yet.