Emu8086_tutorial.pdf

(182 KB) Pobierz
Emu8086
Open emu8086 (Figure 1)
Figure 1
Click Continue… (Figure 2)
Figure 2
From Tool Bar choose “NEW” (Figure 3)
Figure 3
Choose COM or EXE Template
A) COM File (Figure 4)
Figure 4
Figure 5
B) EXE File (Figure 6)
Figure 6
Figure7
Example: Create COM file and write these tow instructions as shown in (Figure 8)
Figure 8
Compile, correct errors if any, and then run (Emulate)… (Figure 9)
Figure 9
When you press Emulate, this window (Figure 10) will appear, it displays the value of all Registers, flags, block
of memory (1K) at a time as Hex value, Decimal value, and ASCII char, and disassembled machine code.
You can watch and change them during the executing of your code.
Figure 10
This window (Figure 11) views the source code; the highlighted instruction is the next one to be executed
Figure 11
To change any register or any memory location, double click on the register (Figure 10), this window
(Figure 12) will appear, from Watch select the register then change it as HEX, BIN, or OCT
Figure 12
Here we changed the lower byte of AX to 5E instead of 00 (Figure 13)
Figure 13
Close the window in Figure 13; the value of AX is changed (blue color) (Figure 14)
Figure 14
Here we will change tow memory locations at 0B56:0106
1) Select MEM from Watch (Figure 15).
Figure 15
2) Write the address “segment: offset” 0B56:0106 (Figure 16)
Figure 16
3) Change 0B56:0106 to 01 and 0B56:0107 to A6h. (Figure 17)
Figure 17
4) Close the window in Figure 17; the value at offset 0106 and 0107 is changed (Figure 18)
Figure 18
To start Running:
Press on Single Step (Figure 19)
Figure 19
At CS:IP one instruction will be executed at a time.
Figure 20 & 21 show the changes after executing MOV AX, 2
Figure 20
Figure 21
Then press again on Single Step for the next instruction until you finish your code.
Zgłoś jeśli naruszono regulamin