Вопрос интересный. Открыл "MSP430 Family Assembly Language Tools User's Guide"
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)

миниатюрный аудио-видеорекордер mAVR

Отправлено -=Shura=- 07 августа 2003 г. 19:12
В ответ на: Как правильно использовать '&' в ассемблере для MSP430 от IAR ? отправлено misyachniy 07 августа 2003 г. 18:40

Цитирую:
The assembler allows you to specify that a constant, symbol or expression should be used as an adddress, an immediate value or an indirect value. The following rules apply to the operands of instructions.
No prefix - the operand is an address or register. If you do not use a prefix with an operand, the assembler treats an operand representing a constant value as an absolute address. When the operand is a label, the assembler generates a symbolic address. A register name specifies the contens of the named register. This are examples of instructions that use operands without prefixes:
Label: ADD 0FFFEh,R5 ; add contents of absolute address to register
ADD Label,R5 ; add contents of symbolic address to register

& prefix - the operand is an absolute address. If you use the & sign as a prefix, the assembler treats the operand as an absolute address, similar to using no prefix. The operand has to specify a constant value:
MOV &200h,R5
MOV 200h,R5

Both instructions generate the same object code, moving the contetnts of absolute address 200h to R5.
Вот и пойми из этого описания, где отличие... :-(
Это, правда, не про IAR


Составить ответ  |||  Конференция  |||  Архив

Ответы



Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru