Abbreviation |
None. |
Arguments |
None. |
Default |
None. |
Description |
The ASM directive
signals the beginning merge of a block of source text
into the .SRC file generated using the SRC directive. |
NOTE
The ASM directive can occur only in the source file
as part of a #pragma directive.
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