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

📄 psocconfig.lis

📁 Summary Many control applications require converting some analog input to a digital format. The ADC
💻 LIS
字号:
 0000           ;
 0000           ;  PSoCConfig.asm
 0000           ;
 0000           ;  Version 0.84
 0000           ;  Data: 19 December, 2000
 0000           ;  Copyright Cypress MicroSystems 2000
 0000           ;
 0000           ;  This file is generated by the Device Editor on Application Generation.
 0000           ;  It contains code which loads the configuration data table generated in
 0000           ;  the file PSoCConfigTBL.asm
 0000           ;  
 0000           ;  DO NOT EDIT THIS FILE MANUALLY, AS IT IS OVERWRITTEN!!!
 0000           ;  Edits to this file will not be preserved.
 0000           ;
 0000           
                export LoadConfigInit
                export _LoadConfigInit
                export LoadConfig_adcinc12_asm_example
                export _LoadConfig_adcinc12_asm_example
                
                export NO_SHADOW
                export _NO_SHADOW
                
 0010           FLAG_CFG_MASK:		equ	10h			;M8C flag register REG address bit mask
 00FF           END_CONFIG_TABLE:	equ	ffh			;end of config table indicator	
 0000           
                AREA text(rom, rel)
                
 0000           _LoadConfigInit:
 0000            LoadConfigInit:
 0000           	
 0000 7C0004            lcall   LoadConfig_adcinc12_asm_example
 0003           
 0003 7F                ret
 0004           
 0004           ;
 0004           ; Load Configuration adcinc12_asm_example
 0004           ;
 0004           _LoadConfig_adcinc12_asm_example:
 0004            LoadConfig_adcinc12_asm_example:
 0004 08            push    a
 0005 10            push    x
 0006 7110              or              F, FLAG_CFG_MASK                                                ;set for bank 1
 0008 5000              mov             A, >LoadConfigTBL_adcinc12_asm_example_Bank1    ;load bank 1 table
 000A 5700              mov             X, <LoadConfigTBL_adcinc12_asm_example_Bank1
 000C 900B              call    LoadConfig                                                              ;load the bank 1 values
 000E 70EF              and             F,~FLAG_CFG_MASK                                                ;switch to bank 0
 0010 5000              mov             A, >LoadConfigTBL_adcinc12_asm_example_Bank0    ;load bank 0 table
 0012 5700              mov             X, <LoadConfigTBL_adcinc12_asm_example_Bank0
 0014 9003              call    LoadConfig                                                              ;load the bank 0 values
 0016 20            pop     x
 0017 18            pop     a
 0018 7F                ret
 0019           
 0019           
 0019           ;
 0019           ; LoadConfig
 0019           ;
 0019           ;  This function is not exported.  It assumes that the address of the table
 0019           ;  to be loaded is contained in the X and A registers as if a romx instruction
 0019           ;  is the next instruction to be executed, i.e. lower address in X and uppper
 0019           ;  address in A.  There is no return value.
 0019           ;
 0019           LoadConfig:
 0019 3801              add             SP, 1
 001B           LoadConfigLp:
 001B 10                push    X                                               ;save config table address on stack
 001C 08                push    A
 001D 28                romx                                                    ;load config address
 001E 39FF              cmp             A, END_CONFIG_TABLE             ;check for end of table
 0020 A01A              jz              EndLoadConfig                   ;if so, end of load
 0022 4F                mov             X, SP                                   ;save the address away
 0023 54FD              mov             [X-3], A
 0025 18                pop             A                                               ;retrieve the table address
 0026 20                pop             X
 0027 75                inc             X                                               ;advance to the data byte
 0028 D002              jnc             NoOverFlow1                             ;check for overflow
 002A 74                inc             A                                               ;if so, increment MSB
 002B           NoOverFlow1:	
 002B 10                push    X                                               ;save the config table address again
 002C 08                push    A
 002D 28                romx                                                    ;load the config data
 002E 4F                mov             X, SP                                   ;retrieve the config address
 002F 59FD              mov             X, [X-3]
 0031 6100              mov             reg[X], A                               ;write the config data
 0033 18                pop             A                                               ;retrieve the table address
 0034 20                pop             X
 0035 75                inc             X                                               ;advance to the next address
 0036 D002              jnc             NoOverFlow2                             ;check for overflow
 0038 74                inc             A                                               ;if so, increment MSB
 0039           NoOverFlow2:	
 0039 8FE1              jmp             LoadConfigLp                    ;loop back
 003B           EndLoadConfig:
 003B 18                pop             A                                               ;clean up the stack
 003C 18                pop             A
 003D 38FF              add             SP, -1
 003F 7F                ret
 0040           
 0040           NO_SHADOW:
 0040           _NO_SHADOW:

⌨️ 快捷键说明

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