4-1
CHAPTER 4
PROGRAMMING CONSIDERATIONS
This section provides an overview of the instruction set of the MCS
®
96 microcontrollers and of-
fers guidelines for program development. For detailed information about specific instructions,
see Appendix A.
4.1
OVERVIEW OF THE
INSTRUCTION SET
The instruction set supports a variety of operand types likely to be useful in control applications
(see Table 4-1).
NOTE
The operand-type variables are shown in all capitals to avoid confusion. For
example, a BYTE is an unsigned 8-bit variable in an instruction, while a byte is
any 8-bit unit of data (either signed or unsigned).
Table 4-1. Operand Type Definitions
Operand Type
No. of
Bits
Signed
Possible Values
Addressing
Restrictions
BIT
1
No
True (1) or False (0)
As components of bytes
BYTE
8
No
0 through 2
8
–1 (0 through 255)
None
SHORT-INTEGER
8
Yes
–2
7
t2
7
–1
(–128 t127)
None
WORD
16
No
0 through 2
16
–1
(0 through 65,535)
Even byte address
INTEGER
16
Yes
–2
15
t2
15
–1
(–32,768 t32,767)
Even byte address
DOUBLE-WORD
(Note 1)
32
No
0 through 2
32
–1
(0 through 4,294,967,295)
An address in the lower
register file that is evenly
divisible by four (Note 2)
LONG-INTEGER
(Note 1)
32
Yes
–2
31
t2
31
–1
(–2,147,483,648 through
+2,147,483,647)
An address in the lower
register file that is evenly
divisible by four (Note 2)
QUAD-WORD
(Note 3)
64
No
0 through 2
64
–1
An address in the lower
register file that is evenly
divisible by eight
NOTES:
1.
The 32-bit variables are supported only as the operand in shift operations, as the dividend in 32-by-
16 divide operations, and as the product of 16-by-16 multiply operations.
2.
For consistency with third-party software, you should adopt the C programming conventions for
addressing 32-bit operands. For more information, refer to page 4-11.
3.
QUAD-WORD variables are supported only as the operand for the EBMOVI instruction.
Содержание 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: ......