06.02.2013 Views

C166/ST10 Cross-Assembler, Linker/Locator, Utilities ... - Tasking

C166/ST10 Cross-Assembler, Linker/Locator, Utilities ... - Tasking

C166/ST10 Cross-Assembler, Linker/Locator, Utilities ... - Tasking

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• • • • • • • •<br />

Operands and Expressions 5−19<br />

5.3.1.2 SIGN OPERATORS<br />

Synopsis:<br />

Plus: +operand<br />

Minus: −operand<br />

The + operator does not modify its operand. The − operator subtracts its<br />

operand from zero.<br />

Example:<br />

5 + −3 ; result is 2<br />

5.3.1.3 MULTIPLICATION AND DIVISION<br />

Synopsis:<br />

Multiplication: operand * operand<br />

Division: operand / operand<br />

Modulo: operand % operand<br />

operand MOD operand<br />

The * operator multiplies its two operands, the / operator performs an<br />

integer division, discarding any remainder. The MOD and % operators also<br />

perform an integer division, but discard the quotient and return the<br />

remainder. The operands can be any expression evaluating to an absolute<br />

number or a relocatable operand.<br />

Examples:<br />

AVAR * 2 ; multiplication<br />

0ff3ch / COUNT ; division<br />

23 mod 4 ; modulo, result is 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!