⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 drawusb.lst

📁 基于Cypress CY3655开发工具的USB鼠标程序
💻 LST
📖 第 1 页 / 共 5 页
字号:
0000: 7D 00 68 LJMP  0x0068
0003: 30       HALT  

FILE: .\boot.asm
                                   (0001) ; Generated by PSoC Designer ver 4.4  b1884 : 14 Jan, 2007
                                   (0002) ;
                                   (0003) ;@Id: boot.tpl#238 @
                                   (0004) ;=============================================================================
                                   (0005) ;  FILENAME:   boot.asm
                                   (0006) ;  VERSION:    4.07
                                   (0007) ;  DATE:       9 March 2005
                                   (0008) ;
                                   (0009) ;  DESCRIPTION:
                                   (0010) ;  M8C Boot Code for CY7C63900 microcontroller family.
                                   (0011) ;  This file also contains the Interrupt Service Routines for enCoRe II GPIO
                                   (0012) ;  interrupts: INT0, INT1, INT2, as well as the GPIO Port interrupts for
                                   (0013) ;  port 0, port 1, port 2, port 3 and port 4.
                                   (0014) ;
                                   (0015) ;  Copyright (C) Cypress Semiconductor 2004, 2005. All rights reserved.
                                   (0016) ;
                                   (0017) ; NOTES:
                                   (0018) ; PSoC Designer's Device Editor uses a template file, BOOT.TPL, located in
                                   (0019) ; the project's root directory to create BOOT.ASM. Any changes made to 
                                   (0020) ; BOOT.ASM will be  overwritten every time the project is generated; therfore
                                   (0021) ; changes should be made to BOOT.TPL not BOOT.ASM. Care must be taken when
                                   (0022) ; modifying BOOT.TPL so that replacement strings (such as @PROJECT_NAME)
                                   (0023) ; are not accidentally modified.
                                   (0024) ;
                                   (0025) ;=============================================================================
                                   (0026) 
                                   (0027) include ".\lib\GlobalParams.inc"
                                   (0028) include "m8c.inc"
                                   (0029) include "m8ssc.inc"
                                   (0030) 
                                   (0031) ;-----------------------------------------------------------------------------
                                   (0032) ; Optimization flags
                                   (0033) ;-----------------------------------------------------------------------------
                                   (0034) C_LANGUAGE_SUPPORT: equ 1   ;Set to 0 to optimize for ASM only
                                   (0035) 
                                   (0036) ;-----------------------------------------------------------------------------
                                   (0037) ; Export Declarations
                                   (0038) ;-----------------------------------------------------------------------------
                                   (0039) 
                                   (0040) export __Start
                                   (0041) export __Exit
                                   (0042) export __bss_start
                                   (0043) 
                                   (0044) export __lit_start
                                   (0045) export __idata_start
                                   (0046) export __data_start
                                   (0047) export __func_lit_start
                                   (0048) export __text_start
                                   (0049) export __usermodules_start
                                   (0050) export __psoc_config_start
                                   (0051) 
                                   (0052) ;-----------------------------------------------------------------------------
                                   (0053) ; Interrupt Vector Table
                                   (0054) ;-----------------------------------------------------------------------------
                                   (0055) ;
                                   (0056) ; Interrupt vector table entries are 4 bytes long and contain the code that
                                   (0057) ; services the interrupt (or causes it to be serviced).
                                   (0058) ;
                                   (0059) ;-----------------------------------------------------------------------------
                                   (0060) 
                                   (0061)     AREA    TOP(ROM,ABS,CON)
                                   (0062) 
                                   (0063)     org 0                   ;Reset Interrupt Vector
                                   (0064)     ljmp __Start            ;First instruction executed following a Reset
                                   (0065) 
                                   (0066)     org 04h                 ;Supply Monitor Interrupt Vector
0004: 30       HALT                (0067)     halt                    ;Stop execution if power falls too low
0005: 30       HALT  
0006: 30       HALT  
0007: 30       HALT  
                                   (0068) 
                                   (0069)     org 08h                 ;INT0 Interrupt Vector
0008: 7D 0B 08 LJMP  0x0B08        (0070)     ljmp    INT0_ISR
000B: 7E       RETI                (0071)     reti
                                   (0072) 
                                   (0073)     org 0Ch                 ;SPI TX Empty Interrupt Vector
                                   (0074)     // call	void_handler
000C: 7E       RETI                (0075)     reti
000D: 30       HALT  
000E: 30       HALT  
000F: 30       HALT  
                                   (0076) 
                                   (0077)     org 10h                 ;SPI RX Full Interrupt Vector
                                   (0078)     // call	void_handler
0010: 7E       RETI                (0079)     reti
0011: 30       HALT  
0012: 30       HALT  
0013: 30       HALT  
                                   (0080) 
                                   (0081)     org 14h                 ;GPIO Port 0 Interrupt Vector
0014: 7D 0B 0B LJMP  0x0B0B        (0082)     ljmp    PORT0_ISR
0017: 7E       RETI                (0083)     reti
                                   (0084)     
                                   (0085)     org 18h                 ;GPIO Port 1 Interrupt Vector
0018: 7D 0B 0C LJMP  0x0B0C        (0086)     ljmp    PORT1_ISR
001B: 7E       RETI                (0087)     reti
                                   (0088)     
                                   (0089)     org 1Ch                 ;INT1 Interrupt Vector
001C: 7D 0B 09 LJMP  0x0B09        (0090)     ljmp    INT1_ISR
001F: 7E       RETI                (0091)     reti
                                   (0092)     
                                   (0093)     org 20h                 ;USB Endpoint 0 Interrupt Vector
0020: 7D 05 7C LJMP  0x057C        (0094)     ljmp	_USB_EP0_ISR
0023: 7E       RETI                (0095)     reti
                                   (0096) 
                                   (0097)     org 24h                 ;USB Endpoint 1 Interrupt Vector
0024: 7D 0C 18 LJMP  USB_EP1_ISR   (0098)     ljmp	_USB_EP1_ISR
0027: 7E       RETI                (0099)     reti
                                   (0100) 
                                   (0101)     org 28h                 ;USB Endpoint 2 Interrupt Vector
0028: 7D 0C 23 LJMP  USB_EP2_ISR   (0102)     ljmp	_USB_EP2_ISR
002B: 7E       RETI                (0103)     reti
                                   (0104) 
                                   (0105)     org 2Ch                 ;USB Bus Reset Interrupt Vector
002C: 7D 0C 2E LJMP  USB_RESET_ISR (0106)     ljmp	_USB_RESET_ISR
002F: 7E       RETI                (0107)     reti
                                   (0108) 
                                   (0109)     org 30h                 ;USB Bus Activity Interrupt Vector
0030: 7D 0C 38 LJMP  USB_ACT_ISR   (0110)     ljmp	_USB_ACT_ISR
0033: 7E       RETI                (0111)     reti
                                   (0112) 
                                   (0113)     org 34h                 ;One Millisecond Interval Timer Interrupt Vector
                                   (0114)     // call	void_handler
0034: 7E       RETI                (0115)     reti
0035: 30       HALT  
0036: 30       HALT  
0037: 30       HALT  
                                   (0116) 
                                   (0117)     org 38h                 ;Programmable Interval Timer Interrupt Vector
                                   (0118)     // call	void_handler
0038: 7E       RETI                (0119)     reti
0039: 30       HALT  
003A: 30       HALT  
003B: 30       HALT  
                                   (0120) 
                                   (0121)     org 3Ch                 ;Timer Capture 0 Interrupt Vector
                                   (0122)     // call	void_handler
003C: 7E       RETI                (0123)     reti
003D: 30       HALT  
003E: 30       HALT  
003F: 30       HALT  
                                   (0124) 	
                                   (0125)     org 40h                 ;Timer Capture 1 Interrupt Vector
                                   (0126)     // call	void_handler
0040: 7E       RETI                (0127)     reti
0041: 30       HALT  
0042: 30       HALT  
0043: 30       HALT  
                                   (0128) 
                                   (0129)     org 44h                 ;Free Running Counter Wrap Interrupt Vector
                                   (0130)     // call	void_handler
0044: 7E       RETI                (0131)     reti
0045: 30       HALT  
0046: 30       HALT  
0047: 30       HALT  
                                   (0132) 
                                   (0133)     org 48h                 ;INT 2 Interrupt Vector
0048: 7D 0B 0A LJMP  0x0B0A        (0134)     ljmp    INT2_ISR
004B: 7E       RETI                (0135)     reti
                                   (0136) 
                                   (0137)     org 4Ch                 ;PS2 Data Low
                                   (0138)     // call	void_handler
004C: 7E       RETI                (0139)     reti
004D: 30       HALT  
004E: 30       HALT  
004F: 30       HALT  
                                   (0140) 
                                   (0141)     org 50h                 ;GPIO Port 2 Interrupt Vector
0050: 7D 0B 0D LJMP  0x0B0D        (0142)     ljmp    PORT2_ISR
0053: 7E       RETI                (0143)     reti
                                   (0144) 
                                   (0145)     org 54h                 ;GPIO Port 3 Interrupt Vector
0054: 7D 0B 0E LJMP  0x0B0E        (0146)     ljmp    PORT3_ISR
0057: 7E       RETI                (0147)     reti
                                   (0148) 
                                   (0149)     org 58h                 ;GPIO Port 4 Interrupt Vector
0058: 7D 0B 0F LJMP  0x0B0F        (0150)     ljmp    PORT4_ISR
005B: 7E       RETI                (0151)     reti
                                   (0152) 
                                   (0153)     org 5Ch                 ;Reserved
                                   (0154)     // call	void_handler
005C: 7E       RETI                (0155)     reti
005D: 30       HALT  
005E: 30       HALT  
005F: 30       HALT  
                                   (0156) 
                                   (0157)     org 60h                 ;Reserved
                                   (0158)     // call	void_handler
0060: 7E       RETI                (0159)     reti
0061: 30       HALT  
0062: 30       HALT  
0063: 30       HALT  
                                   (0160) 
                                   (0161)     org 64h                 ;Sleep Timer Interrupt Vector
                                   (0162)     // call	void_handler
0064: 7E       RETI                (0163)     reti
0065: 30       HALT  
0066: 30       HALT  
0067: 30       HALT  
                                   (0164) 
                                   (0165) ;-----------------------------------------------------------------------------
                                   (0166) ;  Start of Execution
                                   (0167) ;  CPU is operating at 3 MHz
                                   (0168) ;  IO Bank is Bank0
                                   (0169) ;-----------------------------------------------------------------------------
                                   (0170)     org 68h
                                   (0171) __Start:
                                   (0172) 
                                   (0173) IF ( WATCHDOG_ENABLE )             ; WDT selected in Global Params
                                   (0174)     M8C_EnableWatchDog
                                   (0175) ENDIF
                                   (0176)     ;------------------
                                   (0177)     ; Set up the clocks
                                   (0178)     ;------------------
                                   (0179)     ; Configure the external oscillator, EFTB Filter, and clock out
                                   (0180)     ;  It is configured with an 'OR' in case a USB Bus Reset occurred and
                                   (0181)     ;  the external oscillator has already been started.  This way
                                   (0182)     ;  it does not get unselected.
                                   (0183) IF XOSC_ENABLE
                                   (0184)     MOV  REG[XOSCTR], XOSC_XGM_JUST        ; Set the external OSC XGM
                                   (0185)     OR   REG[CLKIOCR], (XOSC_ENABLE_JUST | EFTB_JUST | CLOCK_OUT_JUST)
                                   (0186)     ; If the external oscillator has been selected, wait for it to stabilize
                                   (0187)     ;   then select it 
                                   (0188)     M8C_SetBank1
                                   (0189)     AND  REG[OSC_CR0], ~OSC_CR0_SLEEP
                                   (0190)     OR   REG[OSC_CR0],  OSC_CR0_SLEEP_512Hz ; Wait ~2 mSec
                                   (0191)     M8C_SetBank0
                                   (0192)     M8C_ClearWDTAndSleep                   ; Restart the sleep timer
                                   (0193)     MOV  REG[INT_VC], 0                    ; Clear all pending interrupts

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -