Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as ARM assembler by hehe ( 8 years ago )
;*******************************************************************
;* 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.                                                      *
;*******************************************************************

; Include derivative-specific definitions
            INCLUDE 'derivative.inc'
;
; export symbols
;
            XDEF _Startup
            ABSENTRY _Startup

;
; variable/data section
;
            ORG    RAMStart         ; Insert your data definition here
ExampleVar: DS.B   1

;
; code section
;
            ORG    ROMStart

_Startup:
            LDHX   #RAMEnd+1        ; initialize the stack pointer
            TXS
            CLI   
               
            BSET 0,CONFIG1
            BCLR 1,PTA
            BCLR 4,PTA
            BSET 4,DDRA
            BSET 1,DDRA
            BSET 3,DDRA
            BSET 0,DDRA
            BCLR 5,DDRA
            BCLR 2,DDRA
            
            START: LDA #$01
            BSR WYSLANIE
            BCLR 3,PTA
            BSET 4,PTA
            BCLR 4,PTA
            BSR OPOZNIENIEDL
            
            LDA #$38
            BSR WYSLANIE
            BCLR 2,PTA
            BSET 4,PTA
            BCLR 4,PTA
            BSR OPOZNIENIEKR
            
            LDA #$0F
            BSR WYSLANIE
            BCLR 3,PTA
            BSET 4,PTA
            BCLR 4,PTA
            BSR OPOXNIENIEKR
            
            LDA #$06
            BSR WYSLANIE
            BCLR 3,PTA
            BSET 4,PTA
            BCLR 4,PTA
            BSR OPOZNIENIEKR
            LDA #$80
            BSR WYSLANIE
            BCLR 3,PTA
            BSET 4,PTA
            BCLR 4,PTA
            BSR OPOZNIENIEKR
            LDA #$39
            BSR WYSLANIE
            BCLR 3,PTA
            BSET 4,PTA
            BCLR 4,PTA
            BSR OPOZNIENIEKR
       ALA: BRA ALA
       WYSLANIE:
            MOV #$08,$80  
          LAB2: ASLA
          
            BSET 3,PTA
            BCS LAB1
            BCLR 3,PTA
      LAB1: BSET 1,PTA
            BCLR 1,PTA
            DBNZ $80,LAB2
            RTS
            
     OPOZNIENIEKR:
                    MOV #$FF,$80
            OPOZ1A: DBNZ $80,OPOZ1A                   
                    RTS
      OPOZNIENIEDL:
      MOV #$FF,$80
      OPOZ1:  MOV #$FF,$81
      OPOZ2:  DBNZ $81,OPOZ2
              DBNZ $80,OPOZ1
              RTS
            
      mainLoop            ; Insert your code here
            NOP
 
            feed_watchdog
            BRA    mainLoop

;**************************************************************
;* 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

 

Revise this Paste

Your Name: Code Language: