Intel Microcontroller, 80C196NU, 8XC196NP manual BIT Operands, Byte Operands, SHORT-INTEGER Operands

Models: Microcontroller 80C196NU 8XC196NP

1 471
Download 471 pages 22.3 Kb
Page 59
Image 59

8XC196NP, 80C196NU USER’S MANUAL

Table 4-2 lists the equivalent operand-type names for both C programming and assembly lan- guage.

Table 4-2. Equivalent Operand Types for Assembly and C Programming Languages

Operand Types

Assembly Language Equivalent

C Programming Language Equivalent

 

 

 

BYTE

BYTE

unsigned char

 

 

 

SHORT-INTEGER

BYTE

char

 

 

 

WORD

WORD

unsigned int

 

 

 

INTEGER

WORD

int

 

 

 

DOUBLE-WORD

LONG

unsigned long

 

 

 

LONG-INTEGER

LONG

long

 

 

 

QUAD-WORD

 

 

 

4.1.1BIT Operands

A BIT is a single-bit variable that can have the Boolean values, “true” and “false.” The architec- ture requires that BITs be addressed as components of BYTEs or WORDs. It does not support the direct addressing of BITs.

4.1.2BYTE Operands

ABYTE is an unsigned, 8-bit variable that can take on values from 0 through 255 (28–1). Arith- metic and relational operators can be applied to BYTE operands, but the result must be interpret- ed in modulo 256 arithmetic. Logical operations on BYTEs are applied bitwise. Bits within BYTEs are labeled from 0 to 7; bit 0 is the least-significant bit. There are no alignment restric- tions for BYTEs, so they may be placed anywhere in the address space.

4.1.3SHORT-INTEGER Operands

A SHORT-INTEGER is an 8-bit, signed variable that can take on values from –128 (–2 7) through +127 (+27–1). Arithmetic operations that generate results outside the range of a SHORT -INTE- GER set the overflow flags in the processor status word (PSW). The numeric result is the same as the result of the equivalent operation on BYTE variables. There are no alignment restrictions on SHORT-INTEGERs, so they may be placed anywhere in the address space.

4-2

Page 59
Image 59
Intel Microcontroller, 80C196NU, 8XC196NP manual BIT Operands, Byte Operands, SHORT-INTEGER Operands