Intel MP Architecture & Assembly Programming
Intel MP Architecture & Assembly Programming
Intel MP Architecture
Shown above is the simplified block diagram of any microprocessor, including the Intel 80x68
family of processors. You noticed that memory (random accessed memory or RAM) is needed so
that there would be a place for data and instructions to be stored. Data and programs which can
be lost after power is removed are stored in RAM. Data and instructions (or specifically, program
or in general software) which must never be lost, even after the power is turned off, are stored in
ROM (read only memory). Remember that ROM is a type of memory which cannot have its
contents changed once the ROM chip is manufactured. PROM (programmable ROM) and
EPROM (erasable-programmable ROM) are used in much the same way as ROM but can be
reprogrammed after manufactured but require special equipment to program them.
Microprocessor Programming
Microprocessors work with an instruction set that allows it to function. Although the instruction
set within the processor is binary, programmers work with English-like commands, which are
divided into seven groups. These are:
MP Basic Operations
Fetch
Decode
Execute
Addressing
• Since there are many memory locations (or, addresses), it is necessary to have a means of
referring to specific locations.
• This is done through addressing. Typically, RAM addresses are numbered 0000H (in hex)
to the highest addressable memory.
• For example, using 12 binary digits, how many unique memory locations would be possible?
• Accumulator: one of the most often used parts of a μP is the accumulator – a register which
often has its contents altered in some way.
• For example, we can add the contents of the accumulator to the contents of a RAM address.
Usually, the result of an operation is also placed in the accumulator.
• Width of Registers: maximum size of bits is generally, 8, 16, 32, or 64
• General-Purpose Registers: are similar to the accumulator, and are temporary storage
locations. They differ from accumulator in that operations involving two pieces of data are
usually not performed in them with the result going back into the register itself, as the case of
the accumulator.
• Program Counter (PC) or Instruction Pointer (IP): considering the fact that there can be
millions of RAM locations, it’s obvious that the μP must keep track of the location from which
it will be getting its next instruction. This is the job of the PC or IP.
• Status Register: sometimes called condition code register, or flag register, is a special register
which keeps track of certain facts about the outcome of arithmetic, logical, & other operations.
This register makes it possible for the μP to be able to test for certain conditions, & then to
perform alternate functions based on those conditions. This is done through the use of flags.
• Stack Pointer: the structure of a stack is a first-in-last-out (FILO), where unlike main memory,
where you can access data item in any order. The stack is designed so that you can only
access (through stack pointer) the top of the stock. We can push an item (save operation)
onto the stack so that we can later pop them (retrieve operation)
ASSIGNMENT 4
INSTRUCTIONS: Answer the following problem and submit in the complete solution.
1. If we had 20,00010 memory address lines, what would be the last address line needed to
describe an item in hex 2 bytes wide?
2. Refer to Figure shown. If we POP data item #2 (two-bytes) from the stack, will the stack
pointer (SP) increment or decrement? What hex value will appear in the SP?
3. Refer to the same Figure, if we PUSH three data items onto the stack 1-byte each, will the
SP increment or decrement? What hex value will appear in the SP?
ANSWERS TO SAQ #4
A. Multiple Choice
1. C 6. A
2. D 7. A
3. B 8. D
4. B 9. D
5. A 10. C
B. Identification
1. It is named EAX as a 32-bit wide extended accumulator, or named AX & is 16 bits wide with
an 8-bit upper half (called AH) and an 8-bit lower-half (called AL).
2. There are eight 8-bit general-purpose registers: AH, AL, BH, BL, CH, CL, DH, & DL
3. The IP (Instruction Pointer)
4. Temporary locations which can store a byte or a word of data similar to RAM but which are
inside the μP.
5. Index register
6. 0 (LOW) or CLEAR/Disabled
7. 1 (HIGH) or SET/Enabled
REFERENCES
PDF:
Books:
Malvino, Albert P., Brown Jerald A., Digital Computer Electronics (3rd Ed.). Prentice Hall Int’l. Inc.