AVR (03.06.2005 21:51, просмотров: 1) ответил Bill на Можно глупый вопрос: это как вычисляется?
RTFM и ветеранам, оказывается, не помешает :) Функциями в AVRASM несколько недальновидно назвали расширенные операторы. Вот цитата из файла AVRASM.chm:
Functions
The following functions are defined:
LOW(expression) returns the low byte of an expression
HIGH(expression) returns the second byte of an expression
BYTE2(expression) is the same function as HIGH
BYTE3(expression) returns the third byte of an expression
BYTE4(expression) returns the fourth byte of an expression
LWRD(expression) returns bits 0-15 of an expression
HWRD(expression) returns bits 16-31 of an expression
PAGE(expression) returns bits 16-21 of an expression
EXP2(expression) returns 2 to the power of expression
LOG2(expression) returns the integer part of log2(expression)
The following functions are only defined in AVRASM2:
INT(expression) Truncates a floating point expression to integer (ie discards fractional part)
FRAC(expression) Extracts fractional part of a floating point expression (ie discards integer part).
Q7(expression) Converts a fractional floating point expression to a form suitable for the FMUL/FMULS/FMULSU instructions. (sign + 7-bit fraction)
Q15(expression) Converts a fractional floating point expression to a form suitable for the FMUL/FMULS/FMULSU instructions. (sign +15-bit fraction)
ABS() Returns the absolute value of a constant expression.