2-5
ARCHITECTURAL OVERVIEW
2.3.3.2
Instruction Format
MCS 96 microcontrollers combine a large set of general-purpose registers with a three-operand
instruction format. This format allows a single instruction to specify two source registers and a
separate destination register. For example, the following instruction multiplies two 16-bit vari-
ables and stores the 32-bit result in a third variable.
MUL
RESULT, FACTOR_1, FACTOR_2
;multiply FACTOR_1 and FACTOR_2
;and store answer in RESULT
;(RESULT)
←
(FACTOR_1 × FACTOR_2)
An 80C186 device requires four instructions to accomplish the same operation. The following ex-
ample shows the equivalent code for an 80C186 device.
MOV
AX, FACTOR_1
;move FACTOR_1 into accumulator (AX)
;(AX)
←
FACTOR1
MUL
FACTOR_2
;multiply FACTOR_2 and AX
;(DX:AX)
←
(AX)×(FACTOR_2)
MOV
RESULT, AX
;move lower byte into RESULT
;(RESULT)
←
(AX)
MOV
2, DX
;move upper byte into 2
;(2)
←
(DX)
2.3.4
Memory Controller
The RALU communicates with all memory, except the register file and peripheral SFRs, through
the memory controller. (It communicates with the upper register file through the memory control-
ler except when windowing is used; see Chapter 5, “Memory Partitions,”) The memory controller
contains the prefetch queue, the slave program counter (slave PC), address and data registers, and
the bus controller.
The bus controller drives the memory bus, which consists of an internal memory bus and the ex-
ternal address/data bus. The bus controller receives memory-access requests from either the
RALU or the prefetch queue; queue requests always have priority. This queue is transparent to
the RALU and your software.
NOTE
When using a logic analyzer to debug code, remember that instructions are
preloaded into the prefetch queue and are not necessarily executed
immediately after they are fetched.
When the bus controller receives a request from the queue, it fetches the code from the address
contained in the slave PC. The slave PC increases execution speed because the next instruction
byte is available immediately and the processor need not wait for the master PC to send the ad-
dress to the memory controller. If a jump, interrupt, call, or return changes the address sequence,
the master PC loads the new address into the slave PC, then the CPU flushes the queue and con-
tinues processing.
Содержание 80C196NU
Страница 1: ...8XC196NP 80C196NU Microcontroller User s Manual...
Страница 2: ...8XC196NP 80C196NU Microcontroller User s Manual August 1995 Order Number 272479 002...
Страница 18: ...1 Guide to This Manual...
Страница 19: ......
Страница 31: ......
Страница 32: ...2 Architectural Overview...
Страница 33: ......
Страница 48: ...3 Advanced Math Features...
Страница 49: ......
Страница 56: ...4 Programming Considerations...
Страница 57: ......
Страница 72: ...5 Memory Partitions...
Страница 73: ......
Страница 106: ...6 Standard and PTS Interrupts...
Страница 107: ......
Страница 144: ...7 I O Ports...
Страница 145: ......
Страница 165: ......
Страница 166: ...8 Serial I O SIO Port...
Страница 167: ......
Страница 183: ......
Страница 184: ...9 Pulse width Modulator...
Страница 185: ......
Страница 196: ...10 Event Processor Array EPA...
Страница 197: ......
Страница 225: ......
Страница 226: ...11 Minimum Hardware Considerations...
Страница 227: ......
Страница 239: ......
Страница 240: ...12 Special Operating Modes...
Страница 241: ......
Страница 255: ......
Страница 256: ...13 Interfacing with External Memory...
Страница 257: ......
Страница 303: ......
Страница 304: ...A Instruction Set Reference...
Страница 305: ......
Страница 373: ......
Страница 374: ...B Signal Descriptions...
Страница 375: ......
Страница 390: ...C Registers...
Страница 391: ......
Страница 447: ......
Страница 448: ...Glossary...
Страница 449: ......
Страница 458: ...Index...
Страница 459: ......