8086 Microprocessor Emulator
8086 Microprocessor Emulator
The emulator runs programs like the real microprocessor in step-by-step mode. It shows
registers, memory, stack, variables and flags.
All memory values can be investigated and edited by a double click. The instructions can be
executed in a regular forward direction and also in reverse direction.
Emu8086 can create a tiny operating system and write its binary code to a bootable floppy
disk. This software package includes several virtual external devices: robot, stepper motor,
led display, and traffic lights intersection.
Virtually anyone with any programming experience can design animated virtual devices in
assembly language or in any other programming language.
All devices are open for modifications and closing (source code is available). All
communications between the microprocessor and devices is coming through this file: c:\
emu8086.io, to emulate in/out instructions it's just required to change corresponding bytes in
this binary file.
Type your code inside the text area, and click compile button. You will be asked for a place
where to save the compiled file.
After successful compilation you can click emulate button to load the compiled file in
emulator.
Using the emulator
If you want to load your code into the emulator, just click "Emulate" button .
But you can also use emulator to load executable even if you don't have the original source
code. Select Show emulator from the Emulator menu.
Try loading files from "MyBuild" folder. If there are no files in "MyBuild" folder return to
source editor, select Examples from File menu, load any sample, compile it and then load into
the emulator:
[Single Step] button executes instructions one by one stopping after each instruction.
[Run] button executes instructions one by one with delay set by step delay between
instructions.
Double click on register text-boxes opens "Extended Viewer" window with value of that
register converted to all possible forms. You can modify the value of the register directly in
this window.
Double click on memory list item opens "Extended Viewer" with WORD value loaded from
memory list at selected location. Less significant byte is at lower address: LOW BYTE is
loaded from selected position and HIGH BYTE from next memory address. You can modify
the value of the memory word directly in the "Extended Viewer" window,
You can modify the values of registers on runtime by typing over the existing values.
CMPSB MOV
AAA CMPSW JAE JNBE JPO MOVSB RCR SCASB
AAD CWD JB JNC JS MOVSW REP SCASW
AAM DAA JBE JNE JZ MUL REPE SHL
AAS DAS JC JNG LAHF NEG REPNE SHR
ADC DEC JCXZ JNGE LDS NOP REPNZ STC
ADD DIV JE JNL LEA NOT REPZ STD
AND HLT JG JNLE LES OR RET STI
CALL IDIV JGE JNO LODSB OUT RETF STOSB
CBW IMUL JL JNP LODSW POP ROL STOSW
CLC IN JLE JNS LOOP POPA ROR SUB
CLD INC JMP JNZ LOOPE POPF SAHF TEST
CLI INT JNA JO LOOPNE PUSH SAL XCHG
CMC INTO JNAE JP LOOPNZ PUSHA SAR XLATB
CMP IRET JNB JPE LOOPZ PUSHF SBB XOR
JA RCL
Operand Types:
REG: AX, BX, CX, DX, AH, AL, BL, BH, CH, CL, DH, DL, DI, SI, BP, SP.
SREG: DS, ES, SS, and only as second operand: CS.
Memory: [BX], [BX+SI+7], variable, etc
Immediate: 5, -24, 3Fh, 10001101b, etc...