![Intel 8XC196NT Скачать руководство пользователя страница 41](http://html1.mh-extra.com/html/intel/8xc196nt/8xc196nt_user-manual_2072210041.webp)
8XC196NT USER’S MANUAL
2-4
All registers, except the 3-bit bit-select register and the 6-bit loop counter, are either 16 or 17 bits
(16 bits plus a sign extension). Some of these registers can reduce the ALU’s workload by per-
forming simple operations.
The RALU uses the upper- and lower-word registers together for the 32-bit instructions and as
temporary registers for many instructions. These registers have their own shift logic and are used
for operations that require logical shifts, including normalize, multiply, and divide operations.
The six-bit loop counter counts repetitive shifts. The second-operand register stores the second
operand for two-operand instructions, including the multiplier during multiply operations and the
divisor during divide operations. During subtraction operations, the output of this register is com-
plemented before it is moved into the ALU.
The RALU speeds up calculations by storing constants (e.g., 0, 1, and 2) in the constants register
so that they are readily available when complementing, incrementing, or decrementing bytes or
words. In addition, the constants register generates single-bit masks, based on the bit-select reg-
ister, for bit-test instructions.
2.3.3.1
Code Execution
The RALU performs most calculations for the device, but it does not use an accumulator. Instead
it operates directly on the lower register file, which essentially provides 256 accumulators. Be-
cause data does not flow through a single accumulator, the device’s code executes faster and more
efficiently.
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)
Содержание 8XC196NT
Страница 1: ...8XC196NT Microcontroller User s Manual...
Страница 2: ...8XC196NT Microcontroller User s Manual June 1995 Order Number 272317 003...
Страница 22: ...1 Guide to This Manual...
Страница 23: ......
Страница 35: ......
Страница 36: ...2 Architectural Overview...
Страница 37: ......
Страница 49: ......
Страница 50: ...3 Programming Considerations...
Страница 51: ......
Страница 66: ...4 Memory Partitions...
Страница 67: ......
Страница 104: ...5 Standard and PTS Interrupts...
Страница 105: ......
Страница 147: ......
Страница 148: ...6 I O Ports...
Страница 149: ......
Страница 176: ...7 Serial I O SIO Port...
Страница 177: ......
Страница 194: ...8 Synchronous Serial I O SSIO Port...
Страница 195: ......
Страница 211: ......
Страница 212: ...9 Slave Port...
Страница 213: ......
Страница 231: ......
Страница 232: ...10 Event Processor Array EPA...
Страница 233: ......
Страница 270: ...11 Analog to digital Converter...
Страница 271: ......
Страница 291: ......
Страница 292: ...12 Minimum Hardware Considerations...
Страница 293: ......
Страница 306: ...13 Special Operating Modes...
Страница 307: ......
Страница 317: ......
Страница 318: ...14 Interfacing with External Memory...
Страница 319: ......
Страница 362: ...15 Programming the Nonvolatile Memory...
Страница 363: ......
Страница 408: ...A Instruction Set Reference...
Страница 409: ......
Страница 476: ...B Signal Descriptions...
Страница 477: ......
Страница 493: ......
Страница 494: ...C Registers...
Страница 495: ......
Страница 565: ......
Страница 566: ...Glossary...
Страница 567: ......
Страница 580: ...Index...
Страница 581: ......
Страница 597: ......