[an error occurred while processing this directive] [an error occurred while processing this directive]
Ответ: В Softune help file
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)
[an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive]

Отправлено ДмитрийE 30 января 2002 г. 15:49
В ответ на: Ответ: Softune Workbench для ДмитрийE отправлено Egik 30 января 2002 г. 15:10

На счет volatile - это то же что и везде

А на счет
__direct выдержка из справки

direct Area Access Function

[General Format]

__direct Variable definition;

[Explanation]

The direct area operation variable can be defined by specifying the __direct type qualifier.
It makes it possible to specify that the pointer-specified object is the direct area.
When the specified variable for a structure or union, it is assumed that all members are positioned in the direct area. The variable cannot be specified for structure or union members.
Since highly-efficient dedicated instructions are provided for direct area accessing, compact objection generation can be achieved at an increased speed.

In the fcc907s command, to make accessible the section (DIRVAR/DIRINIT) generated by __direct type qualifying the variable, it is necessary to properly set up the DPR with the startup routine.
In the fcc896s command, to make accessible the section (DIRVAR/DIRINIT) generated by __direct type qualifying the variable, the sections must be arranged in the 0x00 to 0xFF range. The area in this range is also used as the I/O area, so the sections should be arranged in an area that is not used as the I/O area.

[Output Example]

• Input:

int __direct p;

void sample(void){ p=1;}

• fcc907s Command Output:

.SECTION DIRDATA, DIR, ALIGN=2

.ALIGN 2
.GLOBAL _p
_p:
.RES.B 2
.GLOAL LOADSPB
.SECTION CODE, CODE, ALIGN=2
;-------begin_of_function
.GLOBAL _sample
_sample:
LINK #0
MOVN A, #1
MOVW S:_p, A
UNLINK
RET

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

Ответы



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

E-mail: info@telesys.ru