AS11, an absolute assembler for Motorola MCU's, version 1.2e

                        *
                        * Lcd1.asm ---- 16X2 LCD sample program for FOX11 board
                        *		with BUFFALO monitor, (c)2003, EVBplus.com
                        *		Written by Wayne Chu
                        *
                        *     Function:	This is the simplest way to displays a message on a 
                        *		16X2 LCD display module. The cursor is off. 
                        *		If more controls to display are needed, see the LCD2.asm
                        
09c4                    TEN_MS:		equ	2500
8fff                    STACK:		equ	$8FFF
                        
                        ; The following 3 routines are included in BUFFALO monitor ver. 3.47
ff70                    	org     $FF70
ff70                    lcd_ini:	rmb	3	; initializes 16x2 LCD module
ff73                    lcd_line1:	rmb	3	; displays 16 char on the first line
ff76                    lcd_line2:	rmb	3	; displays 16 char on the second line
                        
d000                    	org	$D000
d000 7e d0 0d           	jmp	start
                        *
d003                    delay_10ms:
d003 3c                 	pshx
d004 ce 09 c4           	ldx     #TEN_MS		; 2500 x 8 = 20,000 cycles = 10ms
d007 09                 del1:	dex			; 3 cycles
d008 01                 	nop			; 2 cycle
d009 26 fc              	bne	del1		; 3 cycles
d00b 38                 	pulx
d00c 39                        	rts
                        *
d00d 8e 8f ff           start:  lds	#STACK
d010 bd d0 03              	jsr	delay_10ms	; delay 20ms during power up
d013 bd d0 03               	jsr	delay_10ms
                        
d016 bd ff 70               	jsr	lcd_ini		; initialize LCD
                        
d019 ce d0 26           back:	ldx    	#MSG1		; MSG1 for line1, x points to MSG1
d01c bd ff 73                   jsr	lcd_line1
                        *
d01f ce d0 36               	ldx    	#MSG2		; MSG2 for line2, x points to MSG2
d022 bd ff 76                   jsr	lcd_line2
d025 3f                      	swi                     ; go back to BUFFALO monitor
                             	
d026 20 20 46 4f 58 31  MSG1:   FCC     "  FOX11 TRAINER "
     31 20 54 52 41 49
     4e 45 52 20
d036 28 43 29 32 30 30  MSG2:   FCC     "(C)2002, EVBPLUS"
     32 2c 20 45 56 42
     50 4c 55 53
                               	end
                        

Executed: Sat Dec 31 10:29:45 2005
Total cycles: 81, Total bytes: 70
Total errors: 0, Total warnings: 0
