TLDR Web Dev · ARTICLES & TUTORIALS

WEIRD THINGS I LEARNED WHILE WRITING AN X86 EMULATOR

timdbg.com12 min read

Summary from the TLDR Web Dev newsletter

This article explores unusual aspects of the x86 instruction set architecture discovered while creating an x86 emulator for time travel debugging. There are multiple encodings for the same instructions in the architecture. It uses prefixes to modify instruction behavior. The author also notes the peculiar nature of segment overrides in both 32-bit and 64-bit modes, the surprising behavior of shift instructions, and the inconsistent handling of flags by different instructions.