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.
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)
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.