Телесистемы
 Разработка, производство и продажа радиоэлектронной аппаратуры
На главную   | Карта сайта | Пишите нам | В избранное
Требуется программист в Зеленограде
- обработка данных с датчиков; ColdFire; 40 тыс.
e-mail:jobsmp@pochta.ru

Телесистемы | Электроника | Конференция «Микроконтроллеры и их применение»

Или из старого кейловского хелпа(+)

Отправлено Quasy 20 сентября 2007 г. 14:25
В ответ на: И такая дребедень - каждый день. Call 0x00002000 не подойдёт? ((void (*)())0x00002000)(); отправлено <font color=gray>Quasy</font> 20 сентября 2007 г. 14:00

ASM / ENDASM
Abbreviation: None.
Arguments: None.
Default: None.
μVision2 Control: This directive may not be specified on the command line.
Description: The ASM directive signals the beginning of a block of
source text to merge into the .SRC file generated using the
SRC directive.
This source text can be thought of as in-line assembly.
However, it is output to the source file generated only when
using the SRC directive. The source text is not assembled
and output to the object file.
In μVision2 you may set a file specific option for C source
files that contain ASM/ENDASM sections as follows:
 Right click on the file in the Project Window – Files tab
 Choose Options for… to open Options – Properties
page
 Enable Generate Assembler SRC file
 Enable Assemble SRC file.
With this setting, μVision2 generates an assembler source
file (.SRC) and translates this file with the Assembler to an
Object file (.OBJ).
The ENDASM directive signals the end of the source text
block.
NOTE
The ASM and ENDASM directives can occur only in the
source file, as part of a #pragma directive.
Keil Software — Cx51 Compiler User’s Guide 27
2
Example: #pragma asm / #pragma endasm
The following C source file:
.
.
.
stmt level source
1 extern void test ();
2
3 main () {
4 1 test ();
5 1
6 1 #pragma asm
7 1 JMP $ ; endless loop
8 1 #pragma endasm
9 1 }
.
.
.
generates the following .SRC file.
; ASM.SRC generated from: ASM.C
NAME ASM
?PR?main?ASM SEGMENT CODE
EXTRN CODE (test)
EXTRN CODE (?C_STARTUP)
PUBLIC main
; extern void test ();
;
; main () {
RSEG ?PR?main?ASM
USING 0
main:
; SOURCE LINE # 3
; test ();
; SOURCE LINE # 4
LCALL test
;
; #pragma asm
JMP $ ; endless loop
; #pragma endasm
; }
; SOURCE LINE # 9
RET ; END OF main
END


Составить ответ | Вернуться на конференцию

Ответы


Отправка ответа
Имя*: 
Пароль: 
E-mail: 
Тема*:

Сообщение:

Ссылка на URL: 
URL изображения: 

если вы незарегистрированный на форуме пользователь, то
для успешного добавления сообщения заполните поле, как указано ниже:
сколько миллиампер в одном ампере ?:

Перейти к списку ответов | Конференция | Раздел "Электроника" | Главная страница | Карта сайта

Rambler's Top100 Рейтинг@Mail.ru
 
Web telesys.ru