MicroProcessor Assignment2
MicroProcessor Assignment2
Which register or registers are used as an offset address for the string
instruction destination in the microprocessor?
Ans. The Destination Index register is used as an offset address for the
string instruction destination in the microprocessor. DI is a 16-bit register.
It is used in the pointer addressing of data and as a destination in some
string related operations.
Ques 17. Which 32-bit register or registers are used to hold an offset address for
data segment data in the Pentium 4 microprocessor?
Ans. The EAX, EBX, ECX, EDX, ESI, EDI registers are used as an offset
address for data segment data in the Pentium 4 processor.
Ques 19. If the base pointer (BP) addresses memory, the _________ segment
contains the data.
Ans. If the base pointer (BP) addresses memory, the Stack segment
contains the data.
Ques 20. Determine the memory location addressed by the following real mode
80286 register
combinations:
(a) DS = 1000H and DI = 2000H
Ans. DS = 10000H, DI = 2000H
Memory Location Accessed = DS + DI
= 10000H + 2000H
= 12000H
Ques 21. Determine the memory location addressed by the following real mode
Core2 register
combinations:
(a) DS = 2000H and EAX = 00003000H
Ans. DS = 20000H, EAX = 00003000H
Memory Location Accessed = DS + EAX
= 20000H + 00003000H
= 23000H
Ques 22. Protected mode memory addressing allows access to which area of the
memory in the 80286 microprocessor?
Ans. Below 1 MB and above 1 MB.
Ques 23 .Protected mode memory addressing allows access to which area of the
memory in the Pentium 4 microprocessor?
Ans. 64 TeraBytes.
Ques 24. What is the purpose of the segment register in protected mode
memory addressing?
Ans. In protected mode memory addressing the segment register is a
selector that selects the descriptor from a descriptor table. It also sets privi-
lege level of the request and chooses either the global
or local table.
Ques 25 .How many descriptors are accessible in the global descriptor table in
the protected mode?
Ans. 8192 descriptors. Each descriptor table contains 8192 descriptors, so a
total of 16,384 total descriptors are available.
Ques 26. For an 80286 descriptor that contains a base address of A00000H and
a limit of 1000H, what starting and ending locations are addressed by this
descriptor?
Ans. Base address = A00000H Limit = 1000H
Starting Address = A000000H
Ending Address = Base Address + Limit
= A00000H + 1000H
= A010000H
Ques 27. For a Core2 descriptor that contains a base address of 01000000H, a
limit of 0FFFFH, and G = 0 , what starting and ending locations are addressed
by this descriptor?
Ans. Starting address = 01000000H
Since, G = 0, we will limit will be the same.
Ending address = 01000000H + 0FFFFH
= 0100FFFFH
Ques 28. For a Core2 descriptor that contains a base address of 00280000H, a
limit of 00010H, and G = 1 , what starting and ending locations are addressed
by this descriptor?
Ans. Starting address = 00280000H
Since, G = 1, value of the limit is mutliplied 4K bytes( append FFF to the
limit)
Limit = 00010FFFH
Ques 29. If the DS register contains 0020H in a protected mode system, which
global descriptor table entry is accessed?
Ans. In the DS register,
DS = 0020H
DS = 0000 0000 0010 0000H
So, TI = 0
th
4 entry of global descriptor table will be accessed.
Ques 30. If DS = 0103H in a protected mode system, the requested privilege
level is _________.
Ans. 0103 = 0000 0001 0000 0011
RPL = 11
Ques 31. If DS = 0105H in a protected mode system, which entry, table, and
requested privilege level are selected?
Ans. 0105H = 0000 0001 0000 0101b.
From this, we can say that the requested privilege level is high(01), table
is local table, entry is 0 0000 0010 0000b = 20H
32th entry
Ques 32. What is the maximum length of the global descriptor table in the
Pentium 4 microprocessor?
Ans. No of entries in the global descriptor table is 8192
Each descriptor is 8 bytes long,
so max length of the global decriptor table = 8192 * 8
= 64K bytes
Ques 33. Code a descriptor that describes a memory segment that begins at
location 210000H and ends at location 21001FH. This memory segment is a
code segment that can be read. The descriptor is for an 80286 microprocessor.
0000H 001FH
P D P L S E ED/C R/W A
1 1 1 1 1 1 1 0
We assume DPL 11 and ED/C = 1, we assume that segment not accessed yet since
code is read R =1 and memory segment is in code segment E =1 and S =1
0000H 001FH
Ques 34. Code a descriptor that describes a memory segment that begins at
location 03000000H and ends at location 05FFFFFFH. This memory segment is
a data segment that grows upward in the memory system and can be written.
The descriptor is for a Pentium 4 microprocessor.
G D 0 AV Limit
03H 1 1 0 1 FFF F2H 00H
0000H 2FFFH
P D P L S E ED/C R/W A
1 1 1 1 0 0 1 0
0000H 001FH
Ans. The GDTR (global descriptor table register) contain the base address
of the global descriptor table and its limit. When the protected mode
operation is desired, the address of the global descriptor table and its limit
are loaded into the GDTR.