Anders Johansson

Why does pgm not run without breakpoints

Discussion created by Anders Johansson on Jun 20, 2006
Latest reply on Jun 20, 2006 by Daniel Lundin
A simple asm program will only send a uart-char
if stopped at a breakpoint on every loop.
Will not run full speed.
Will not run standalone on a board.
 
Framework was generated by CW 3,1 wizard.
What have I done wrong?
 
Thanks,
Anders J
 
========================================================

            XDEF Entry
            ABSENTRY Entry

            INCLUDE 'mc9s12dt256.inc'
ROMStart    EQU  $4000  ; 
Baud9600  equ 52
 
; variable/data section
            ORG RAMStart
temp_byte   ds.b 1

; code section
            ORG ROMStart
Entry:
     
       ldd   #Baud9600        ; 9600 baud
       std   SCI0BD
       ldaa  #mSCI0CR2_TE     ; Enable transmitter
       staa  SCI0CR2
       ldaa  #0
       staa  SCI0CR1
      
       clr   temp_byte
Loop:
       ldaa temp_byte            ; Send a 'B'
       staa SCI0DRL
       inc  temp_byte
       ldx  #60000
XmitLoop:               ; Waist time
       dex
       bne  XmitLoop
       BRA Loop

;**************************************************************
;*                 Interrupt Vectors                          *
;**************************************************************
  ORG $FFFE
  fdb     Entry      ; Reset
 

Outcomes