
numEctron                                                                                               http://nalhossri.free.fr 
_______________________________________________________________________ 
  
  
;******************************************************************* 
;* This stationery serves as the framework for a user application                               * 
;* For a more comprehensive program that demonstrates the more                           * 
;* advanced functionality of this processor, please see the                                         * 
;* demonstration applications, located in the examples                                              * 
;* subdirectory of the "Freescale CodeWarrior for HC08" program                          * 
;* directory.                                                                                                                 * 
;******************************************************************* 
 
; Ici est défini le fichier du composant utilisé ; on peut, bien sûr, en ajouter d’autres avec la ; fonction INCLUDE. 
; Include derivative-specific definitions 
            INCLUDE 'derivative.inc' 
; 
; export symbols 
; 
            XDEF _Startup 
            ABSENTRY _Startup 
; 
; Définition de la RAM 
; variable/data section 
; 
            ORG    RAMStart         ; Insert your data definition here 
ExampleVar: DS.B   1 
 
; 
; Définition de la Flash 
; code section 
; 
            ORG    ROMStart 
 
_Startup: 
            LDHX   #RAMEnd+1        ; initialize the stack pointer 
            TXS 
            CLI                     ; enable interrupts 
; Ceci sert à initialiser le pointeur en RAM, en fin de RAM, plus exactement  RAMEnd+1 
 
; Ici, peut commencer votre programme en Assembleur 
mainLoop: 
            ; Insert your code here 
            NOP 
 
            feed_watchdog 
            BRA    mainLoop 
; Ne pas oublier de définir les vecteurs de reset sinon votre programme ne fonctionnera pas 
;************************************************************** 
;* spurious - Spurious Interrupt Service Routine.                                              * 
;*             (unwanted interrupt)                                                                          * 
;************************************************************** 
spurious:                           ; placed here so that security value 
            NOP                     ; does not change all the time. 
            RTI 
;************************************************************** 
;*                 Interrupt Vectors                                                                           * 
;************************************************************** 
            ORG   $FFFA 
 
            DC.W  spurious          ; 
            DC.W  spurious          ; SWI 
            DC.W  _Startup          ; Reset 
 
  
  
  
______________________________________________________________________________ 
5
 
5
Code Warrior - nouveau projet structuré en langage Assembleur