|
有介绍问号部分内容的汇编资料吗?
;===============================================================================
;
; Vector table
;
;===============================================================================
XVCT CSEG AT 0000H ??????????????????????????????????????????
DW RESET_START ;(00) RESET
DW RESET_START ;(02) --
DW RESET_START ;(04) --
DW RESET_START ;(06) INTLVI
DW RESET_START ;(08) INTP0
DW RESET_START ;(0A) INTP1
DW RESET_START ;(0C) INTTMH1
DW RESET_START ;(0E) INTTM000
DW RESET_START ;(10) INTTM010
DW RESET_START ;(12) INTAD
DW RESET_START ;(14) --
DW RESET_START ;(16) INTP2
DW RESET_START ;(18) INTP3
DW RESET_START ;(1A) INTTM80
DW RESET_START ;(1C) INTSRE6
DW RESET_START ;(1E) INTSR6
DW RESET_START ;(20) INTST6
;===============================================================================
;
; Define the ROM data table
;
;===============================================================================
XTBL1 CSEG AT 0100H ???????????????????????????????????????????????
LEDDATA:
DB 00000011B ;00: SW1=ON, SW2=ON -> LED3=ON
DB 00000101B ;01: SW1=OFF,SW2=ON -> LED2=ON
DB 00000111B ;02: Dummy
DB 00000111B ;03: Dummy
DB 00000111B ;04: Dummy
DB 00000111B ;05: Dummy
DB 00000111B ;06: Dummy
DB 00000111B ;07: Dummy
DB 00000110B ;08: SW1=ON, SW2=OFF -> LED1=ON
DB 00000111B ;09: SW1=OFF,SW2=OFF -> LED1,2,3=OFF
;===============================================================================
;
; Define the memory stack area
;
;===============================================================================
XSTK DSEG AT 0FEE0H ???????????????????????????????
STACKEND:
DS 20H ; Memory stack area = 32byte
STACKTOP: ; Start address of the memory stack area = FF00H
;*******************************************************************************
;
; Initialization after RESET
;
;*******************************************************************************
XMAIN CSEG UNIT
RESET_START:
;-------------------------------------------------------------------------------
; Initialize the stack pointer
;-------------------------------------------------------------------------------
MOVW AX, #STACKTOP ?????????????????????????????????????????
MOVW SP, AX ; Set the stack pointer at FF00H
;-------------------------------------------------------------------------------
; Initialize the watchdog timer
;-------------------------------------------------------------------------------
MOV WDTM, #01110111B ; Stop the watchdog timer operation
;-------------------------------------------------------------------------------
; Initialize the clock generators
;-------------------------------------------------------------------------------
MOV PPCC, #00000010B ; The clock supplied to the peripheral hardware (fxp) = fx/4 (= 2MHz)
MOV PCC, #00000000B ; The clock supplied to the CPU (fcpu) = fxp (= 2MHz)
MOV LSRCM, #00000001B ; Stop the low-speed internal oscillator
;-------------------------------------------------------------------------------
自己写程序如何写??????????????? |
|