Professional Documents
Culture Documents
Agenda
About Lab
Lab Policies
Weekly Lab Schedule
About Lab1
Part1 : Introduction to Emu8086
Some Terminology
Exercise : Numbering Systems
About Lab
Compulsory
2 Lab Hours/week
Lab Hours : Tuesday: 12:00 13:45,
Wednesday: 16:00 17:45
Announcements/etc via
http://kisi.gediz.edu.tr/akaratas/en/com353-mikroislemciler/
Office Hours :
On Mondays : up to lunch time
3
Lab Policies
Attendance: Attendance in the laboratory sessions is mandatory. For each
lab that you fail to attend without a valid excuse (such as a medical
report), you will receive the grade of 0.
Missing more than 2 of the labs will cause your overall grade for the lab
to be FF. Leaving early or coming late can be cause for giving the 0 grade,
and is considered missing that lab. Both partners in a lab group must stay
until the lab is completed and checked by the TA, or till the end of the lab
time, whichever comes first.
Makeup: Missing a lab for an excused reason will allow you to make up
that lab. Make-up opportunities will be either in the same week (at
another section's lab time), or during a free week in the middle of the
term, or at the end of the semester. Students who miss lab must therefore
contact us as soon as possible with the reason for the absence, so that
make up opportunities can be arranged.
Lab Policies(cont.)
Grading: You will be graded according to your preliminary report, your
final implementation of the lab that you demonstrate, your answers to
any questions that are asked during or at the end of the demo, and
your participation in the lab.
Lab Outcomes :
Practice 8086 Emulator
Loading, verifying and saving machine code
Executing instructions and tracing programs
Some Terminology
Editor
Assembler
Linker
Debugger
10
11
12
GENERAL PURPOSE
REGISTERS(Remainder)
8086 CPU has 8 general purpose registers, each register
has its own name:
AX - the accumulator register
BX - the base address register
CX - the count register
DX - the data register
SI - source index register.
DI - destination index register.
BP - base pointer.
SP - stack pointer.
Later ..
15
SEGMENT REGISTERS(Remainder)
CS - points at the segment containing the current program.
DS - generally points at segment where variables are
defined.
ES - extra segment register, it's up to a coder to define its
usage.
Later ..
16
SPECIAL PURPOSE
REGISTERS(Remainder)
IP - the instruction pointer.
Flags Register - determines the current state of the
processor.
IP register always works together with CS segment
register and it points to currently executing instruction.
Flags Register is modified automatically by CPU after
mathematical operations, this allows to determine the
type of the result, and to determine conditions to transfer
control to other parts of the program.
Generally you cannot access these registers directly.
Later ..
17
MOV Instruction
MOV dest, source
Copies the second operand (source) to the first
operand (destination).
The source operand can be an immediate value,
general-purpose register or memory location.
The destination register can be a generalpurpose register, or memory location.
Both operands must be the same size, which can
be a byte or a word.
18
19
21
Procedure:
1. Choose New and specify COM template in
emu8086.
2. Enter the following cod to the editor:
22
Exercise-1 (cont.)
Exercise-1 (cont.)
5. Each time after pressing the single step button, check
and record down the contents of AX and BX registers in
Table 1
24
Exercise - 2
Exercise - 2
: (cont.)
26
Exercise - 2
: (cont.)
27
Part 6: Conclusion
Please express what you learn with this
laboratory work with at most one paragraph.
28
Acknowledgement
29