File "klcd_Ser.asm"

Full Path: /home/analogde/www/private/Projet/Example/HC12/D128/klcd_Ser.asm
File size: 1.29 KB
MIME-type: text/x-c
Charset: utf-8

;  klcd_Ser.ASM
;	Example program using the KEYPAD and LCD_PORT
;     serial interface on the Axiom
;       CMD912X & Cml12S
;

; Memory Map Equates
;STACK:          EQU     RAMSTRT+RAMSIZE-2 ; top of stack
PRGSTRT:        EQU     $1000   ; start of the program code

#include        dp256reg.asm     ; include register equates

; RAM
        

;**********************
; Program starts here *
;**********************

        ORG     PRGSTRT
         jmp    START    ; jump over var's
CNT1	  RMB	1	       ; temporary count variable
TMP1	  RMB	1	       ; temporary storage variable
OLDKEY  RMB	1	       ; save key value for debounce


START:

;        lds     #STACK  ; initialize stack pointer (don't do this if under monitor)
; Initialize KEYPAD
        jsr   INITKEY    ;

; Initialize LCD
        jsr   LCD_TST   ; Initialize LCD

MainLoop:
	  jsr   GETKEY	; get a key from keypad, returned in A
	  jsr   LCD_OUT	; display key value
	  bra   MainLoop

;ENDPROG:
;
;**************
; TEXT TABLES *
;**************
PMT:    FCC   'Press Key: '
        FCB     0


;*******************
;   INCLUDE FILES
;*******************
#include        lcd_ser.asm     ; include serial Lcd functions
#include        keyS12A.asm     ; include KEYPAD functions


        END