GMS81C5108
Example: The usage software example of Vector address and the initialize part.
ORG
0FFE0H
DW
DW
DW
DW
DW
DW
DW
DW
DW
DW
DW
DW
DW
DW
DW
DW
NOT_USED
NOT_USED
NOT_USED
NOT_USED
WT_INT
SIO
AD_Con
Carrier_INT
INT2
; Watch Timer
; Serial I/O
; AD converter
; Carrier
; Int.2
; Timer-1
; Timer-0
; Int.1
; Int.0
; BIT
; Key Scan
; Reset
TMR1_INT
TMR0_INT
INT1
INT0
BIT_INT
KEY_INT
RESET
ORG
0F000H
;********************************************
;
MAIN
PROGRAM
*
;********************************************
;
RESET:
DI
;Disable All Interrupts
CLRG
LDX
#0
#0
RAM_CLR: LDA
;RAM Clear(!0000H->!00BFH)
STA
{X}+
#0C0H
RAM_CLR
CMPX
BNE
;
LDX
TXSP
;
#0BFH
;Stack Pointer Initialize
;Clear LCD display memory
CALL
LCD_CLR
;
LDM
LDM
LDM
LDM
:
R0, #0
;Normal Port 0
R0DR,#1000_0010B
R0PU,#1000_0010B
R0CR,#0000_0001B
;Normal Port Direction
;Pull Up Selection Set
;R0 port Open Drain control
:
LDM
:
SCMR,#1111_0000B
;System clock control
:
JUNE 2001 Ver 1.0
23