P4 Emulator
This program allows you to step through assembly code written for the GCC compiler on linux.
When I was taking the computer architecture course in my sophomore year at IIT Kharagpur, we had to write assembly code for the gcc compiler on linux. We did not have access to any debuggers, so I did the best thing I could think of - I wrote one. Not only did it solve the problem of debugging programs (which would often just SegFault), it also saved me from having to install linux.
This only supports the instructions we were taught at that time: movl, addl, subl, imul, andl, orl, pushl, opl, xorl, negl, jmp, cmpl, jg, jge, je, jl, jle, jne, incl, decl, shll, sall, shrl, sarljz, jnz, leal.
This only supports the following addressing modes: Immediate Data, Immediate Registers, Indirect through registers, named data segments.
Download the source code.
Download the binary.
This program and its source code is licensed under the BSD 2-Clause license.
Last updated sometime in 2006.