;Sending "YES" to Hyperterminal (or Tera Terminal) via Serial COM0 (SCI0) on HCS12 MCU Module ;HCS12 MPU Modules come with USB-BDM and ready to be used with CodeWarrior IDE ;In HCS12 MCU modules, RAM address is from $1000-3FFF ;We use RAM addresses starting at $1000 for scratch pad (variables) and $3FFF for Stack ;Modfied from Example 10-3 in HCS12 textbook by Mazidi & Causey ;On the Project Board, we have a serial COM port with DB-9 connector. ;The Serial COM port on Project Board is connected to the TX0 and RX0 (SCI0) of HCS12 permanently via a MAX232-compatible chip ;Serial COM PORT on Project Board is accessible by the HCS12 MCU Module via jumper called COM_SEL. ;The COM_SEL jumper is located in front of the DB-9 connector and allows the MON08 or COM selection.. ;MAKE SURE the jumper is set for the COM instead of MON08 in the COM_SEL jumper of Project Board before running this program. ;MAKE SURE 4 jumpers for COM_EN on the Project Board are also set. The COM_EN jumpers are located next to DB-9 connector. ;In CodeWarrior, make sure you are in TBDML Mode before downloading ;Press F7 (to Make), then F5(Debug) to downLOAD,and F5 once more to start the program execution ABSENTRY Entry ; for absolute assembly: mark this as application entry point ;Include derivative-specific definitions INCLUDE 'mc9s12dt256.inc' ;CPU used by HCS12 MCU Module ;code section ORG $4000 ;Flash ROM address Entry: LDS #$4000 ;Stack LDAA #$0 STAA SCI0BDH LDAA #13 STAA SCI0BDL ;4MHz/2=2MHz, 2MHz/16=125,000 and 125,000/9600=13 LDAA #0 STAA SCI0CR1 LDAA #$0C STAA SCI0CR2 OVER LDAA #'Y' JSR TRANS LDAA #'E' JSR TRANS LDAA #'S' JSR TRANS LDAA #' ' JSR TRANS BRA OVER ;---------- TRANS HERE: BRCLR SCI0SR1, $80, HERE STAA SCI0DRL RTS ;------------------- ;************************************************************** ;* Interrupt Vectors * ;************************************************************** ORG $FFFE DC.W Entry ;Reset Vector. CPU wakes here and it is sent to start of the code at $4000