;Sending "YES" to Terminal via Serial COM0 (SCI0) on Dragon12+ board ;with D-Bug12 Program installed. This code is for AsmIDE or MiniIDE Assemblers ;Serial COM0 (SCI0) is the RS232 next to the LCD (on new Dragon12-USB board it is the USB next to the LCD) ;Serial COM0 (SCI0) is used by the D-Bug12 to communicate with the Trainer board ;Modfied from Example 10-3 in HCS12 book by Mazidi & Causey ;upon running this program in MiniIDE or AsmIDE the data (YES) is ;displayed on the same Terminal that is being used to downlaod and run the program. #include "C:\Reg9s12.H" ;code section ORG $2000 LDS #$2000 ;Stack ;D-Bug12 works at 48MHz LDAA #$0 STAA SC0BDH LDAA #156 ;48MHz/2=24Mhz, 24Mhz/16= 1.5MHz, 1.5MHz/9600=156 STAA SC0BDL ;Notice the value for Baud Rate LDAA #0 STAA SC0CR1 LDAA #$0C STAA SC0CR2 OVER LDAA #'Y' JSR TRANS LDAA #'E' JSR TRANS LDAA #'S' JSR TRANS LDAA #' ' JSR TRANS BRA OVER ;---------- TRANS HERE: BRCLR SC0SR1, $80, HERE STAA SC0DRL RTS