|
CC78K0S Datasheet, PDF (341/520 Pages) NEC – C Compiler Ver.1.30 or Later Language | |||
|
◁ |
CHAPTER 11 EXTENDED FUNCTIONS
ASM Statements
#asm, #endasm
_ _asm
(b) _ _asm
(C source)
#pragma asm
int a, b;
void
}
main ( ) {
_ _ asm(â\tmovw ax, _a\t;ax <- aâ);
_ _ asm(â\tmovw _b, ax\t;b <- axâ);
(Assembler source)
@@CODE CSEG
_main:
movw ax, _a
movw _b, ax
ret
END
;ax <- a
;b <- ax
COMPATIBILITY
⢠With a C compiler that supports #asm, modify the program according to the format specified by the C
compiler.
⢠If the target device is different, modify the assembler source part of the program.
Userâs Manual U14872EJ1V0UM
341
|
▷ |