![Intel 80C196NU Скачать руководство пользователя страница 51](http://html1.mh-extra.com/html/intel/80c196nu/80c196nu_user-manual_2072209051.webp)
8XC196NP, 80C196NU USER’S MANUAL
3-2
3.2
OPERATING MODES
The accumulator has two operating modes that allow you to control the results of operations on
signed numbers. These modes are called saturation mode and fractional mode.
3.2.1
Saturation Mode
Saturation occurs when the result of two positive numbers generates a negative sign bit or the re-
sult of two negative numbers generates a positive sign bit. Without saturation mode, an underflow
or overflow occurs and the overflow (OVF) flag is set. Saturation mode prevents an underflow or
overflow of the accumulated value. In saturation mode, the accumulator’s value is changed to
7FFFFFFFH for a positive saturation or 80000000H for a negative saturation and the sticky sat-
uration (STSAT) flag is set. The following two examples illustrate the contents of the accumulator
as a result of positive and negative saturation, respectively:
7FFFFFFFH = 0111 1111 1111 1111 1111 1111 1111 1111 = 2
31
– 1 = +2147483647
80000000H = 1000 0000 0000 0000 0000 0000 0000 0000 = –2147483648
Table 3-1. Multiply/Accumulate Example Code
Device
Instructions
Execution Time
8XC196NP
(25 MHz; 1 state time = 80 ns)
mul
temp,operand_2,operand_1
shll
temp,#1
add
out_l,temp_l
addc out_h,temp_h
16 states
8 states
4 states
4 states
32 states total
1280 ns
640 ns
320 ns
320 ns
2560 ns total
80C196NU
(50 MHz; 1 state time = 40 ns)
mul 08H,operand_2,operand_1
†
16 states
16 states total
640 ns
640 ns total
†
Because bit 3 of the destination address (08H) is set, the 80C196NU clears the accumulator before
adding the result of the current instruction to it. If bit 3 were clear (destination address 07H–00H), the
80C196NU would add the result of the current instruction to the existing value of the accumulator.
Содержание 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: ......