Renesas 70 Manual De Usuario

Descargar
Página de 162
Chapter 5 Detailed Applications 
   
- 77 - 
5.2.4 
Writing Cyclic Handler/Alarm Handler 
When describing the cyclic or alarm handler in Assembly Language, observe the following precautions. 
1.  At the beginning of file, be sure to include "mr308.inc" which is in the system directory. 
2.  For the symbol indicating the handler start address, make the external declaration.
3.  Always use the RTS instruction (subroutine return instruction) to return from cyclic han-
dlers and alarm handlers. 
For examples: 
 
.INCLUDE mr308.inc 
----- 
(1) 
.GLB 
 cychand 
 ----- 
(2) 
 
cychand: 
; handler process 
 
rts 
  ----- 
(3) 
 
Figure 5.10 Example Handler Written in Assembly Language 
                                                      
55
  Use the .GLB pseudo-directive.