?? p1.lst
字號:
0000: 7D 00 68 LJMP 0x0068
0003: 30 HALT
FILE: .\boot.asm
(0001) ; Generated by PSoC Designer ver 4.2 b1013 : 02 September, 2004
(0002) ;
(0003) ;@Id: boot.tpl#117 @
(0004) ;=============================================================================
(0005) ; FILENAME: boot.asm
(0006) ; VERSION: 4.06
(0007) ; DATE: 8 March 2005
(0008) ;
(0009) ; DESCRIPTION:
(0010) ; M8C Boot Code for CY7C63800 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, and port 3.
(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
(0067) halt ;Stop execution if power falls too low
0004: 30 HALT
0005: 30 HALT
0006: 30 HALT
0007: 30 HALT
(0068)
(0069) org 08h ;INT0 Interrupt Vector
(0070) ljmp _INT0_KB
0008: 7D 0C 0E LJMP _INT0_KB
(0071) reti
000B: 7E RETI
(0072)
(0073) org 0Ch ;SPI TX Empty Interrupt Vector
(0074) // call void_handler
(0075) reti
000C: 7E RETI
000D: 30 HALT
000E: 30 HALT
000F: 30 HALT
(0076)
(0077) org 10h ;SPI RX Full Interrupt Vector
(0078) // call void_handler
(0079) reti
0010: 7E RETI
0011: 30 HALT
0012: 30 HALT
0013: 30 HALT
(0080)
(0081) org 14h ;GPIO Port 0 Interrupt Vector
(0082) ljmp PORT0_ISR
0014: 7D 0C 0A LJMP 0x0C0A
(0083) reti
0017: 7E RETI
(0084)
(0085) org 18h ;GPIO Port 1 Interrupt Vector
(0086) ljmp PORT1_ISR
0018: 7D 0C 0B LJMP 0x0C0B
(0087) reti
001B: 7E RETI
(0088)
(0089) org 1Ch ;INT1 Interrupt Vector
(0090) ljmp _INT1_MS
001C: 7D 0C F3 LJMP _INT1_MS
(0091) reti
001F: 7E RETI
(0092)
(0093) org 20h ;USB Endpoint 0 Interrupt Vector
(0094) ljmp _myUSB_EP0_ISR
0020: 7D 05 E2 LJMP 0x05E2
(0095) reti
0023: 7E RETI
(0096)
(0097) org 24h ;USB Endpoint 1 Interrupt Vector
(0098) ljmp _myUSB_EP1_ISR
0024: 7D 15 6D LJMP _myUSB_EP1_ISR
(0099) reti
0027: 7E RETI
(0100)
(0101) org 28h ;USB Endpoint 2 Interrupt Vector
(0102) ljmp _myUSB_EP2_ISR
0028: 7D 15 78 LJMP _myUSB_EP2_ISR
(0103) reti
002B: 7E RETI
(0104)
(0105) org 2Ch ;USB Bus Reset Interrupt Vector
(0106) ljmp _myUSB_RESET_ISR
002C: 7D 15 83 LJMP _myUSB_RESET_ISR
(0107) reti
002F: 7E RETI
(0108)
(0109) org 30h ;USB Bus Activity Interrupt Vector
(0110) ljmp _myUSB_ACT_ISR
0030: 7D 15 8D LJMP myUSB_ACT_ISR
(0111) reti
0033: 7E RETI
(0112)
(0113) org 34h ;One Millisecond Interval Timer Interrupt Vector
(0114) ljmp _MSTIMER_ISR
0034: 7D 14 31 LJMP _MSTIMER_ISR
(0115) reti
0037: 7E RETI
(0116)
(0117) org 38h ;Programmable Interval Timer Interrupt Vector
(0118) // call void_handler
(0119) reti
0038: 7E RETI
0039: 30 HALT
003A: 30 HALT
003B: 30 HALT
(0120)
(0121) org 3Ch ;Timer Capture 0 Interrupt Vector
(0122) // call void_handler
(0123) reti
003C: 7E RETI
003D: 30 HALT
003E: 30 HALT
003F: 30 HALT
(0124)
(0125) org 40h ;Timer Capture 1 Interrupt Vector
(0126) // call void_handler
(0127) reti
0040: 7E RETI
0041: 30 HALT
0042: 30 HALT
0043: 30 HALT
(0128)
(0129) org 44h ;Free Running Counter Wrap Interrupt Vector
(0130) // call void_handler
(0131) reti
0044: 7E RETI
0045: 30 HALT
0046: 30 HALT
0047: 30 HALT
(0132)
(0133) org 48h ;INT 2 Interrupt Vector
(0134) ljmp INT2_ISR
0048: 7D 0C 09 LJMP 0x0C09
(0135) reti
004B: 7E RETI
(0136)
(0137) org 4Ch ;PS2 Data Low
(0138) // call void_handler
(0139) reti
004C: 7E RETI
004D: 30 HALT
004E: 30 HALT
004F: 30 HALT
(0140)
(0141) org 50h ;GPIO Port 2 Interrupt Vector
(0142) ljmp PORT2_ISR
0050: 7D 0C 0C LJMP 0x0C0C
(0143) reti
0053: 7E RETI
(0144)
(0145) org 54h ;GPIO Port 3 Interrupt Vector
(0146) ljmp PORT3_ISR
0054: 7D 0C 0D LJMP 0x0C0D
(0147) reti
0057: 7E RETI
(0148)
(0149) org 58h ;Reserved
(0150) // call void_handler
(0151) reti
0058: 7E RETI
0059: 30 HALT
005A: 30 HALT
005B: 30 HALT
(0152)
(0153) org 5Ch ;Reserved
(0154) // call void_handler
(0155) reti
005C: 7E RETI
005D: 30 HALT
005E: 30 HALT
005F: 30 HALT
(0156)
(0157) org 60h ;Reserved
(0158) // call void_handler
(0159) reti
0060: 7E RETI
0061: 30 HALT
0062: 30 HALT
0063: 30 HALT
(0160)
(0161) org 64h ;Sleep Timer Interrupt Vector
(0162) // call void_handler
(0163) reti
0064: 7E RETI
0065: 30 HALT
0066: 30 HALT
0067: 30 HALT
(0164)
(0165) ;-----------------------------------------------------------------------------
(0166) ; Start of Execution
(0167) ; CPU is operating at 3 MHz, change to 12 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)
(0180) ; Configure the Clock Out
(0181) OR REG[CLKIOCR], (CLOCK_OUT_JUST)
0068: 43 32 00 OR REG[50],0
(0182)
(0183) mov [bSSC_KEY1],0 ; Lockout Flash and Supervisiory operations
006B: 55 F8 00 MOV [248],0
(0184) mov [bSSC_KEYSP],0
006E: 55 F9 00 MOV [249],0
(0185)
(0186) ;------------------
(0187) ; Set up the stack
(0188) ;------------------
(0189) mov A, __ramareas_end ; Set top of stack to end of used RAM
0071: 50 AC MOV A,172
(0190) swap SP, A ; This is only temporary if going to LMM
0073: 4E SWAP SP,A
(0191)
(0192) ;-------------------------------------------------------------------------
(0193) ; All the user selections and UserModule selections are now loaded,
(0194) ; except CPU frequency (CPU is runing at 12 MHz). Load the PSoC
(0195) ; configuration with a 12 MHz CPU clock to keep config time short.
(0196) ;-------------------------------------------------------------------------
(0197) lcall LoadConfigInit ; Configure PSoC blocks per Dev Editor
0074: 7C 02 42 LCALL 0x0242
(0198)
(0199)
(0200) IF (C_LANGUAGE_SUPPORT)
(0201) call InitCRunTime ; Initialize for C language
0077: 90 08 CALL 0x0081
(0202) ENDIF ;(C_LANGUAGE_SUPPORT)
(0203)
(0204) ;-------------------------------------------------------------------------
(0205) ; Global Interrupt are NOT enabled, this should be done in main().
(0206) ; LVD is set but will not occur unless Global Interrupts are enabled.
(0207) ; Global Interrupts should be as soon as possible in main().
(0208) ;-------------------------------------------------------------------------
(0209) mov reg[INT_VC],0 ; Clear any pending interrupts which may
0079: 62 E2 00 MOV REG[226],0
(0210) ; have been set during the boot process.
(0211) lcall _main ; Call main
007C: 7C 0D D2 LCALL _main
(0212)
(0213) __Exit:
(0214) jmp __Exit ; Wait here till power is turned off
007F: 8F FF JMP 0x007F
(0215)
(0216)
(0217)
(0218) ;-----------------------------------------------------------------------------
(0219) ; C Runtime Environment Initialization
(0220) ; The following code is conditionally assembled.
(0221) ;-----------------------------------------------------------------------------
(0222)
(0223) IF (C_LANGUAGE_SUPPORT)
(0224)
(0225) InitCRunTime:
(0226) ;-----------------------------
(0227) ; clear bss segment
(0228) ;-----------------------------
(0229) mov A,0
0081: 50 00 MOV A,0
(0230) mov [__r0],<__bss_start
0083: 55 00 1C MOV [__r0],28
(0231) BssLoop:
(0232) cmp [__r0],<__bss_end
0086: 3C 00 AC CMP [0],172
(0233) jz BssDone
0089: A0 05 JZ 0x008F
(0234) mvi [__r0],A
008B: 3F 00 MVI [__r0],A
(0235) jmp BssLoop
008D: 8F F8 JMP 0x0086
(0236) BssDone:
(0237) ;----------------------------
(0238) ; copy idata to data segment
(0239) ;----------------------------
(0240) mov A,>__idata_start
008F: 50 01 MOV A,1
(0241) mov X,<__idata_start
0091: 57 50 MOV X,80
(0242) mov [__r0],<__data_start
0093: 55 00 00 MOV [__r0],0
(0243) IDataLoop:
(0244) cmp [__r0],<__data_end
0096: 3C 00 00 CMP [0],0
(0245) jz IDataDone
0099: A0 0B JZ 0x00A5
(0246) push A
009B: 08 PUSH A
(0247) romx
009C: 28 ROMX
(0248) mvi [__r0],A
009D: 3F 00 MVI [__r0],A
(0249) pop A
009F: 18 POP A
(0250) inc X
00A0: 75 INC X
(0251) adc A,0
00A1: 09 00 ADC A,0
(0252) jmp IDataLoop
00A3: 8F F2 JMP 0x0096
(0253) IDataDone:
(0254) ret
00A5: 7F RET
00A6: 30 HALT
00A7: 30 HALT
00A8: 30 HALT
00A9: 30 HALT
00AA: 30 HALT
00AB: 30 HALT
00AC: 30 HALT
00AD: 30 HALT
00AE: 30 HALT
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -