|
| NODPPSAVE Compiler Directive| Abbreviation | | NODS | | Arguments | | None. | | Default | | The DPP0 and DPP3 registers are saved on interrupt entries. | | µVision | | Options — C166 — Save DPP on Interrupt Entry. | | Description | | The NODPPSAVE directive instructs the compiler not to preserve the DPP0 and DPP3 registers inside interrupt functions. This control is useful when writing applications for the C167 microcontroller using the MOD167 directive. It may be used when you are certain the DPP0 and DPP3 registers are not altered in assembly subroutines and when all C modules are compiled using the MOD167 directive. Note - The C run-time libraries for the C16x/ST10 microcontroller family do not alter the contents of the DPP0 and DPP3 registers.
| | See Also | | MOD167 | | Example | |
C166 SAMPLE.C NODPPSAVE
#pragma NODPPSAVE
The following example:
stmt lvl source
1 extern void efunc (void);
2
3 void func (void) interrupt 0x21
4 using ireg1
5 {
6 1 efunc ();
7 1 }
demonstrates code generated using the NODPPSAVE directive: Code Generated Normally |
|---|
; FUNCTION func (BEGIN)
; SOURCE LINE # 3
0000 C6030300 SCXT DPP3,#03H
0004 CC00 NOP
0006 F6F00000 R MOV ireg1,R0
000A C60800C0 R SCXT CP,#ireg1
000E CC00 NOP
0010 EC00 PUSH DPP0
0012 C6871000 SCXT MDC,#010H
0016 EC06 PUSH MDH
0018 EC07 PUSH MDL
; SOURCE LINE # 6
001A CA000000 E CALLA cc_UC,efunc
; SOURCE LINE # 7
001E FC07 POP MDL
0020 FC06 POP MDH
0022 FC87 POP MDC
0024 FC00 POP DPP0
0026 FC08 POP CP
0028 FC03 POP DPP3
002A FB88 RETI
; FUNCTION func (END)
| | CODE SIZE: 44 Bytes |
| Code Generated With NODPPSAVE |
|---|
; FUNCTION func (BEGIN)
; SOURCE LINE # 3
0000 F6F00000 R MOV ireg1,R0
0004 C60800C0 R SCXT CP,#ireg1
0008 CC00 NOP
000A C6871000 SCXT MDC,#010H
000E EC06 PUSH MDH
0010 EC07 PUSH MDL
; SOURCE LINE # 6
0012 CA000000 E CALLA cc_UC,efunc
; SOURCE LINE # 7
0016 FC07 POP MDL
0018 FC06 POP MDH
001A FC87 POP MDC
001C FC08 POP CP
001E FB88 RETI
; FUNCTION func (END)
| | CODE SIZE: 32 Bytes |
|
|
|
|