Beruflich Dokumente
Kultur Dokumente
Assignment Two
Student ID:
991387388_________________________________
Due Dates:
(1 mark) Give the effective address if the segment register is AA30 and the offset
register is 0032.
(1 mark) The status register is a 16-bit register. How many bits (in total) are
actually used (within the status register)?
(2 marks) The 32-bit value 0x3311C5B9 is stored starting at memory location
1000. Each memory cell can hold 8 bits.
Address
10000
10001
10002
10003
10001
10002
10003
contents
Little Endian
Address
contents
10000
Big Endian
(6 marks) Write an 8086 assembler program (using the emulator) that will
perform the following calculations. All values below are decimals, but you can
leave your answers in hex. You must attach
Screenshot of emu8086 showing the different register values at the end
of the execution
A copy of your code (screenshot is OK)
Your program must store the answer in the AX register.
5 - (7 + 18) + (3 -6)
(c) 20 - (5 7 * 6)
How many times did the instruction sub bx,0x01 get executed?
ANSWERS:
1. Three classifications of the 8086 registers are:
a) General Purpose Registers
b) Segment Registers
c) Special Purpose Registers
2. Names of Segment Registers are:
a) Code Segment (CS)
b) Data Segment (DS)
c) Extra Segment (ES)
d) Stack Segment (SS)
Address
contents
10000
B9
Big Endian
Address
contents
10000
34
10001
C5
10001
11
10002
11
10002
C5
10003
33
10003
B9
6.
a)
b)
7.
a) "0x" infront of the valye means it the hexadecimal value.
b) "sub bx,0x01" instruction will be 4 times executed.
c) when the program finally halted the value of BX is
000A.