For example, for 21 years now I've been programming my emulators almost entirely in 68000, 8086, or 32-bit x86 assembly languages. It's made for some very small, fast, and efficient emulators, but hardly ones that I can easily port to other platforms such as Mac OS....
The system flags include a trap flag (TF, bit8), an interrupt enable flag (IF, bit9), an I/O privileged level (IOPL, bits12-13), a nested task (NT, bit14), a resume flag (RF, bit16), a virtual-8086 mode (VM, bit17), an alignment check (AC, bit18), a virtual interrupt...
. 111.3.2 Assembly language . . . . . . . . . . . . . . . . . . . . 111.3.3 Instruction operands . . . . . . . . . . . . . . . . . . . 121.3.4 Basic instructions . . . . . . . . . . . . . . . . . . . . 121.3.5 Directives . . . . . . ...
Tools objdump –d View byte code and assembly instructions, determine stack offsets ./hex2raw Pass raw ASCII strings to targets gdb Step through execution, determine stack addresses gcc –c Generate object file from assembly language file More Tips Draw stack diagrams Be careful of byte ordering ...