Integer Constants

Preferred Integer Constant Notation lists the notations for integer constants. Use the preferred notation for new code. The alternate notations are for porting existing code.

Table 1. Preferred Integer Constant Notation
Type Preferred Notation Alternate Notation
Hexadecimal $ followed by string of hexadecimal digits, such as $deadbeef. 0x followed by a string of hexadecimal digits, such as 0xdeadbeef.
0 followed by a string of hexadecimal digits, ending with h, such as 0deadbeefh.
Decimal String of decimal digits, such as 12345678. String of decimal digits followed by d, such as 12345678d.
Binary % followed by a string of binary digits, such as %01010001. String of binary digits followed by b, such as 01010001b.
Note: The assembler uses 32-bit signed arithmetic to store and manipulate integer constants.