FR Enhancing specification of C Compiler

Answer:

Enhancing specification of C Compiler

In order to correspond to program description for embedded application, we prepare the specification of enhanced language as following. Please use effectively this enhanced specification at making the program.

1) At describing "__asm" sentence, it is enhanced as assembler instruction.

 

Example: __asm(" LDI #1 , R0 ");

Enhancing qualifier

2) By specifying __interrupt, it is described interrupt function.

 

Example: __interrupt void "function name"(void){ . . . }

 

3) By specifying __io, it is defined the variable, which is scanned I/O area.

 

Example: #pragma section IO=IOA, attr=IO, locate=0x10

 

__io int a;

 

void "function name"(void){ a=1;}

Enhanced function at using #pragma

4) The description between #pragma asm and #pragma endasm is enhanced as assembler.

 

Example: #pragma asm

 

LDI #1, R0

 

LDI #2, R1

 

#pragma endasm

 

5) By specifying #pragma inline, user definition function of inline expansion is specified.

 

Example: #pragma inline "function name 1"[, "function name 2"]

 

6) By specifying #pragma section, section name and section attribute is changed, and location address of section is set.

 

Example: #pragma section CODE=program, attr=CODE, locate=0x80000

 

void "function name"(void){ ... }

 

7) #pragma ilm specifies interrupt level of defined function after this specification.
  #pragma noilm releases the specification of interrupt level.

 

Example: #pragma ilm(24)

 

void "function name"(void){ ... }

 

#pragma noilm

 

8) #pragma intvect makes interrupt vector table, which is set interrupt function.
  #pragma defvect specifies default interrupt function, which is set to interrupt vector of not specifying by #pragma intvect.

Example: #pragma intvect "function name 1" 21

 

#pragma intvect "function name 2" 20

 

#pragma defvect "function name 3"

Interrupt function of related to interrupt

9) By describing __DI(), the code, which is masked interrupt, is enhanced

 

Example: void "function name"(void){ ...

 

__DI();

 

... }

 

10) By describing __EI(), the code, which is released interrupt mask, is enhanced.

 

Example: void "function name"(void){ ...

 

__EI();

 

... }

 

11) By describing __set_il(), the code, which is changed interrupt level, is enhanced.

 

Example: void "function name"(void){ ...

 

__set_il(20);

 

... }

Another embedded function

2) By describing __wait_nop(), NOP instruction is enhanced.

 

Example: void "function name"(void){ ...

 

__wait_nop(3);

 

... }