

#LINUX DISASSEMBLER PROGRAMS WINDOWS#
1980, still included in 32-bit Windows Vista distros). The first was the vintage program DEBUG.EXE (ca. Smart people have written all sorts of disassemblers. After going that extra mile for attaching a “disassembly backend”, you can make sure that your decoder works by comparing the disassembly output to that of a trust-worthy other disassembler. I could not find an 8086 opcode decoder written in Common Lisp, but it became clear that writing a disassembler was the way to go.
#LINUX DISASSEMBLER PROGRAMS CODE#
As Joel Spolsky observes, reading source code is harder than writing it. The last point, looking at other people’s source code, was the hardest.

write an opcode decoder first, make sure that it works before turning to simulation.

start with the 8086 (no protected mode, 20bits).I blew a night over failed attempts to organize opcodes and had to reduce my ambition: The prospect of writing an i386 emulator excited me pretty good. It would be possible, however, to use a roundabout way, by writing an Intel 386 emulator, that is, reflecting the Intel chip under Linux, and then running Linux on that virtual Intel chip Now is Linux capable of running a Linux emulator, in other words of reflecting itself? It isn’t, because the Intel 386 Virtual mode is only capable of virtualizing (reflecting) real mode. Consider the DOS emulator on Linux (or any such system) to start with: it “reflects” DOS under Linux, through the use of the Intel 386 Virtual mode. but is modest in scope and amateur-friendlyĪnother important feature of Tunes is reflexivity.
