;Example 3-12 Page 121 ;Modified and Tested by David Munguia #include "C:\Reg9s12.H" ;Needed for many Programs ORG $2000 LDS #$2000 LDAA #$0 BACK JSR DISP ;CALL DISP Subroutine BRA BACK ;___________________DISPLAY SUBROUTINE ORG $2300 DISP INCA STAA PORTB ;Remember to initialize PORTB JSR DELAY ;Call DELAY Subroutine RTS ;Return to Main Program ;___________________DELAY SUBROUTINE DELAY LDAB #$FF OVER NOP ;No Operation (Wastes a Time Cycle) NOP NOP DECB BNE OVER RTS :Return to Display Subroutine ____________________ END