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

📄 p1.lst

📁 实现2个ps/2接口转到1个USB接口功能
💻 LST
📖 第 1 页 / 共 5 页
字号:
(0029) 
(0030) 
(0031) export NO_SHADOW
(0032) export _NO_SHADOW
(0033) 
(0034) FLAG_CFG_MASK:      equ 10h         ;M8C flag register REG address bit mask
(0035) END_CONFIG_TABLE:   equ ffh         ;end of config table indicator
(0036) 
(0037) AREA psoc_config(rom, rel)
(0038) 
(0039) 
(0040) ;---------------------------------------------------------------------------
(0041) ; LoadConfigInit - Establish the start-up configuration (except for a few
(0042) ;                  parameters handled by boot code, like CPU speed). This
(0043) ;                  function can be called from user code, but typically it
(0044) ;                  is only called from boot.
(0045) ;
(0046) ;       INPUTS: None.
(0047) ;      RETURNS: Nothing.
(0048) ; SIDE EFFECTS: Registers are volatile: the A and X registers can be modified!
(0049) ;               In the large memory model currently only the page
(0050) ;               pointer registers listed below are modified.  This does
(0051) ;               not guarantee that in future implementations of this
(0052) ;               function other page pointer registers will not be
(0053) ;               modified.
(0054) ;          
(0055) ;               Page Pointer Registers Modified: 
(0056) ;               CUR_PP
(0057) ;
(0058) _LoadConfigInit:
(0059)  LoadConfigInit:
(0060)     RAM_PROLOGUE RAM_USE_CLASS_4
(0061)     
(0062) 	mov		[Port_1_Data_SHADE], 0h
    0242: 55 1B 00 MOV   [27],0
(0063) 
(0064) 	lcall	LoadConfig_p1
    0245: 7C 02 49 LCALL 0x0249
(0065) 
(0066)     RAM_EPILOGUE RAM_USE_CLASS_4
(0067)     ret
    0248: 7F       RET   
(0068) 
(0069) ;---------------------------------------------------------------------------
(0070) ; Load Configuration p1
(0071) ;
(0072) ;    Load configuration registers for p1.
(0073) ;    IO Bank 0 registers a loaded first,then those in IO Bank 1.
(0074) ;
(0075) ;       INPUTS: None.
(0076) ;      RETURNS: Nothing.
(0077) ; SIDE EFFECTS: Registers are volatile: the CPU A and X registers may be
(0078) ;               modified as may the Page Pointer registers!
(0079) ;               In the large memory model currently only the page
(0080) ;               pointer registers listed below are modified.  This does
(0081) ;               not guarantee that in future implementations of this
(0082) ;               function other page pointer registers will not be
(0083) ;               modified.
(0084) ;          
(0085) ;               Page Pointer Registers Modified: 
(0086) ;               CUR_PP
(0087) ;
(0088) _LoadConfig_p1:
(0089)  LoadConfig_p1:
(0090)     RAM_PROLOGUE RAM_USE_CLASS_4
(0091)     lcall   LoadConfigTBL_p1            ; Call load config table routine
    0249: 7C 01 EA LCALL 0x01EA
(0092) 
(0093) 
(0094)     RAM_EPILOGUE RAM_USE_CLASS_4
(0095)     ret
    024C: 7F       RET   
    024D: 30       HALT  
FILE: .\debug.asm
(0001) export debug_glimpse
(0002) export _debug_glimpse
(0003) export  debug_turn_on_led
(0004) export  _debug_turn_on_led
(0005) export  debug_turn_off_led
(0006) export  _debug_turn_off_led
(0007) export DELAY_SHORT_TIME
(0008) export _DELAY_SHORT_TIME
(0009) 
(0010) include "memory.inc"
(0011) INCLUDE "m8c.inc"
(0012) area UserModules (ROM, REL)
(0013) 
(0014) EXPORT TIME_TEMP
(0015)  TIME_TEMP:                          BLK   1    ;Receive temp when using SPIS
(0016)  
(0017) .SECTION
(0018) ;-----------------------------------------------------------------------------
(0019) ;  FUNCTION NAME: glimpse
(0020) ;
(0021) ;  DESCRIPTION:
(0022) ;    used in debug for the LED light
(0023) ;-----------------------------------------------------------------------------
(0024)  debug_glimpse:
(0025) _debug_glimpse:
(0026)     RAM_PROLOGUE RAM_USE_CLASS_1
(0027)     MOV REG[08H],01H
    024E: 62 08 01 MOV   REG[8],1
(0028)    	MOV  REG[P0DATA],F7H
    0251: 62 00 F7 MOV   REG[0],247
(0029)    	call DELAY_SHORT_TIME
    0254: 90 5F    CALL  0x02B5
(0030)  	call DELAY_SHORT_TIME
    0256: 90 5D    CALL  0x02B5
(0031)  	call DELAY_SHORT_TIME
    0258: 90 5B    CALL  0x02B5
(0032)    	
(0033)  	MOV  REG[P0DATA],08H
    025A: 62 00 08 MOV   REG[0],8
(0034)  	call DELAY_SHORT_TIME
    025D: 90 56    CALL  0x02B5
(0035)  	call DELAY_SHORT_TIME
    025F: 90 54    CALL  0x02B5
(0036)  	call DELAY_SHORT_TIME
    0261: 90 52    CALL  0x02B5
(0037)     	
(0038)  	MOV  REG[P0DATA],F7H
    0263: 62 00 F7 MOV   REG[0],247
(0039)  	call DELAY_SHORT_TIME
    0266: 90 4D    CALL  0x02B5
(0040)   	call DELAY_SHORT_TIME
    0268: 90 4B    CALL  0x02B5
(0041)  	call DELAY_SHORT_TIME
    026A: 90 49    CALL  0x02B5
(0042)  	
(0043)  	MOV  REG[P0DATA],08H
    026C: 62 00 08 MOV   REG[0],8
(0044)  	call DELAY_SHORT_TIME
    026F: 90 44    CALL  0x02B5
(0045)  	call DELAY_SHORT_TIME
    0271: 90 42    CALL  0x02B5
(0046)  	call DELAY_SHORT_TIME
    0273: 90 40    CALL  0x02B5
(0047)  	
(0048)  	MOV  REG[P0DATA],F7H
    0275: 62 00 F7 MOV   REG[0],247
(0049)  	call DELAY_SHORT_TIME
    0278: 90 3B    CALL  0x02B5
(0050)   	call DELAY_SHORT_TIME
    027A: 90 39    CALL  0x02B5
(0051)  	call DELAY_SHORT_TIME
    027C: 90 37    CALL  0x02B5
(0052)  	
(0053)  	MOV  REG[P0DATA],08H
    027E: 62 00 08 MOV   REG[0],8
(0054)  	call DELAY_SHORT_TIME
    0281: 90 32    CALL  0x02B5
(0055)  	call DELAY_SHORT_TIME
    0283: 90 30    CALL  0x02B5
(0056)  	call DELAY_SHORT_TIME
    0285: 90 2E    CALL  0x02B5
(0057)  	
(0058)  	MOV  REG[P0DATA],F7H
    0287: 62 00 F7 MOV   REG[0],247
(0059)  	call DELAY_SHORT_TIME
    028A: 90 29    CALL  0x02B5
(0060)   	call DELAY_SHORT_TIME
    028C: 90 27    CALL  0x02B5
(0061)  	call DELAY_SHORT_TIME
    028E: 90 25    CALL  0x02B5
(0062)  	
(0063)  	MOV  REG[P0DATA],08H
    0290: 62 00 08 MOV   REG[0],8
(0064)  	call DELAY_SHORT_TIME
    0293: 90 20    CALL  0x02B5
(0065)  	call DELAY_SHORT_TIME
    0295: 90 1E    CALL  0x02B5
(0066)  	call DELAY_SHORT_TIME
    0297: 90 1C    CALL  0x02B5
(0067)  	
(0068)  	MOV  REG[P0DATA],F7H
    0299: 62 00 F7 MOV   REG[0],247
(0069)  	call DELAY_SHORT_TIME
    029C: 90 17    CALL  0x02B5
(0070)   	call DELAY_SHORT_TIME
    029E: 90 15    CALL  0x02B5
(0071)  	call DELAY_SHORT_TIME
    02A0: 90 13    CALL  0x02B5
(0072)  	
(0073)  	MOV  REG[P0DATA],08H
    02A2: 62 00 08 MOV   REG[0],8
(0074)  	call DELAY_SHORT_TIME
    02A5: 90 0E    CALL  0x02B5
(0075)  	call DELAY_SHORT_TIME
    02A7: 90 0C    CALL  0x02B5
(0076)  	call DELAY_SHORT_TIME
    02A9: 90 0A    CALL  0x02B5
(0077)  	
(0078)  	MOV  REG[P0DATA],F7H
    02AB: 62 00 F7 MOV   REG[0],247
(0079)  	call DELAY_SHORT_TIME
    02AE: 90 05    CALL  0x02B5
(0080)   	call DELAY_SHORT_TIME
    02B0: 90 03    CALL  0x02B5
(0081)  	call DELAY_SHORT_TIME
    02B2: 90 01    CALL  0x02B5
(0082)     RAM_EPILOGUE RAM_USE_CLASS_1
(0083)     RET
    02B4: 7F       RET   
(0084) .ENDSECTION
(0085) 
(0086) 
(0087) .SECTION
(0088) ;-----------------------------------------------------------------------------
(0089) ;  FUNCTION NAME: DELAY_SHORT_TIME
(0090) ;
(0091) ;  DESCRIPTION:
(0092) ;    used in debug for the LED light for delay
(0093) ;-----------------------------------------------------------------------------
(0094)  DELAY_SHORT_TIME:
(0095) _DELAY_SHORT_TIME:
(0096)     RAM_PROLOGUE RAM_USE_CLASS_1
(0097) 	
(0098) 	MOV	[TIME_TEMP],FFH
    02B5: 55 4D FF MOV   [delay_counter+1],255
(0099) 	LOOP_TIME1:
(0100) 	MOV A,FFH	
    02B8: 50 FF    MOV   A,255
(0101) 	LOOP_TIME2:
(0102) 		NOP
    02BA: 40       NOP   
(0103) 		NOP 
    02BB: 40       NOP   
(0104) 		NOP
    02BC: 40       NOP   
(0105) 		NOP
    02BD: 40       NOP   
(0106) 		NOP
    02BE: 40       NOP   
(0107) 		DEC A
    02BF: 78       DEC   A
(0108)  		cmp A, 00h
    02C0: 39 00    CMP   A,0
(0109)  		JNZ LOOP_TIME2
    02C2: BF F7    JNZ   0x02BA
(0110)   	DEC	[TIME_TEMP]
    02C4: 7A 4D    DEC   [delay_counter+1]
(0111)  	MOV	A,[TIME_TEMP]
    02C6: 51 4D    MOV   A,[delay_counter+1]
(0112)  	CMP	A,00H
    02C8: 39 00    CMP   A,0
(0113)  	JNZ	LOOP_TIME1	
    02CA: BF ED    JNZ   0x02B8
(0114)     RAM_EPILOGUE RAM_USE_CLASS_1
(0115)     RET
    02CC: 7F       RET   
(0116) .ENDSECTION
(0117) 
(0118) .SECTION
(0119) ;-----------------------------------------------------------------------------
(0120) ;  FUNCTION NAME: turn_on_led
(0121) ;
(0122) ;  DESCRIPTION:
(0123) ;    used in debug for the LED light
(0124) ;-----------------------------------------------------------------------------
(0125)  debug_turn_on_led:
(0126) _debug_turn_on_led:
(0127)     RAM_PROLOGUE RAM_USE_CLASS_1
(0128)     MOV REG[08H],01H
    02CD: 62 08 01 MOV   REG[8],1
(0129)    	MOV  REG[P0DATA],F7H
    02D0: 62 00 F7 MOV   REG[0],247
(0130)     RAM_EPILOGUE RAM_USE_CLASS_1
(0131)     RET
    02D3: 7F       RET   
(0132) .ENDSECTION
(0133) 
(0134) .SECTION
(0135) ;-----------------------------------------------------------------------------
(0136) ;  FUNCTION NAME: turn_off_led
(0137) ;
(0138) ;  DESCRIPTION:
(0139) ;    used in debug for the LED light
(0140) ;-----------------------------------------------------------------------------
(0141)  debug_turn_off_led:
(0142) _debug_turn_off_led:
(0143)     RAM_PROLOGUE RAM_USE_CLASS_1
(0144)     MOV REG[08H],01H
    02D4: 62 08 01 MOV   REG[8],1
(0145)    	MOV  REG[P0DATA],08H
    02D7: 62 00 08 MOV   REG[0],8
(0146)     RAM_EPILOGUE RAM_USE_CLASS_1
(0147)     RET
    02DA: 7F       RET   
FILE: .\int_func.asm
(0001) ;;*****************************************************************************
(0002) ;;*****************************************************************************
(0003) ;;  FILENAME: int_func.asm
(0004) ;;-----------------------------------------------------------------------------
(0005) ;;*****************************************************************************
(0006) ;;*****************************************************************************
(0007) 
(0008) include "m8c.inc"
(0009) include "memory.inc"
(0010) ;include "int_func.inc"
(0011) 
(0012) ;-----------------------------------------------
(0013) ;  Global Symbols
(0014) ;-----------------------------------------------
(0015) export   int0_initialize
(0016) export  _int0_initialize
(0017) export   int1_initialize
(0018) export  _int1_initialize
(0019) 
(0020) export   SET_INT0_NEW
(0021) export  _SET_INT0_NEW
(0022) 
(0023) export   GET_INT0_NEW
(0024) export  _GET_INT0_NEW
(0025) 
(0026) export   SET_INT1_NEW
(0027) export  _SET_INT1_NEW
(0028) 
(0029) export   GET_INT1_NEW
(0030) export  _GET_INT1_NEW
(0031) 
(0032) export   INT1_GET_BUTT
(0033) export  _INT1_GET_BUTT
(0034) export   INT1_GET_X
(0035) export  _INT1_GET_X
(0036) export   INT1_GET_Y
(0037) export  _INT1_GET_Y
(0038) export   INT1_GET_Z
(0039) export  _INT1_GET_Z
(0040) 
(0041) export   INT0_GET_DATA_KB_00
(0042) export  _INT0_GET_DATA_KB_00
(0043) export   INT0_GET_DATA_KB_01
(0044) export  _INT0_GET_DATA_KB_01
(0045) export   INT0_GET_DATA_KB_02
(0046) export  _INT0_GET_DATA_KB_02
(0047) export   INT0_GET_DATA_KB_03
(0048) export  _INT0_GET_DATA_KB_03
(0049) export   INT0_GET_DATA_KB_04
(0050) export  _INT0_GET_DATA_KB_04
(0051) export   INT0_GET_DATA_KB_05
(0052) export  _INT0_GET_DATA_KB_05
(0053) export   INT0_GET_DATA_KB_06
(0054) export  _INT0_GET_DATA_KB_06
(0055) export   INT0_GET_DATA_KB_07
(0056) export  _INT0_GET_DATA_KB_07
(0057) 
(0058) ;-----------------------------------------------
(0059) ;  Constant Definitions
(0060) ;-----------------------------------------------
(0061) area UserModules (ROM, REL)
(0062) 
(0063) .SECTION
(0064) ;-----------------------------------------------------------------------------
(0065) ;  FUNCTION NAME: int0_initialize
(0066) ;
(0067) ;  DESCRIPTION:
(0068) ;    initialize int0
(0069) ;-----------------------------------------------------------------------------
(0070) ;
(0071) ;  ARGUMENTS:  none
(0072) ;
(0073) ;  RETURNS:  none
(0074) ;
(0075) ;-----------------------------------------------------------------------------
(0076)  int0_initialize:
(0077) _int0_initialize:
(0078)     RAM_PROLOGUE RAM_USE_CLASS_1
(0079) 	MOV	    [INT0_NEW],00h
    02DB: 55 01 00 MOV   [1],0

⌨️ 快捷键说明

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