📄 gpio.asm
字号:
;*******************************************************************************
;* TMS320C55x C/C++ Codegen PC Version 2.56 *
;* Date/Time created: Fri Apr 28 11:24:16 2006 *
;*******************************************************************************
.mmregs
.cpl_on
.arms_on
.c54cm_off
.asg AR6, FP
.asg XAR6, XFP
.asg DPH, MDP
.model call=c55_std
.model mem=large
.noremark 5549 ; code avoids SE CPU_28
.noremark 5558 ; code avoids SE CPU_33
.noremark 5570 ; code avoids SE CPU_40
.noremark 5571 ; code avoids SE CPU_41
.noremark 5573 ; code avoids SE CPU_43
.noremark 5584 ; code avoids SE CPU_47
.noremark 5599 ; code avoids SE CPU_55
.noremark 5503 ; code avoids SE CPU_84 MMR write
.noremark 5505 ; code avoids SE CPU_84 MMR read
.noremark 5673 ; code avoids SE CPU_89
.noremark 5002 ; code respects overwrite rules
;*******************************************************************************
;* GLOBAL FILE PARAMETERS *
;* *
;* Architecture : TMS320C55x *
;* Optimization : Always Choose Smaller Code Size *
;* Memory : Large Model (23-Bit Data Pointers) *
;* Calls : Normal Library ASM calls *
;* Debug Info : Optimized TI Debug Information *
;*******************************************************************************
.sect ".cinit"
.align 1
.field IR_1,16
.field _myConfig+0,24
.field 0,8
.field 0,16 ; _myConfig._iai @ 0
.field 1,16 ; _myConfig._iob @ 16
.field 24,16 ; _myConfig._pllmult @ 32
.field 1,16 ; _myConfig._div @ 48
IR_1: .set 4
.sect ".text"
.global _myConfig
.bss _myConfig,4,0,0
; c:\ti\c5500\cgtools\bin\acp55.exe -@C:\DOCUME~1\ZHANGM~1\LOCALS~1\Temp\TI3028_4
.sect ".text"
.align 4
;*******************************************************************************
;* FUNCTION NAME: _CSL_init *
;* *
;* Function Uses Regs : T0,SP,M40,SATA,SATD,RDM,FRCT,SMUL *
;* Stack Frame : Compact (No Frame Pointer) *
;* Total Frame Size : 2 words *
;* (2 return address/alignment) *
;*******************************************************************************
_CSL_init:
;----------------------------------------------------------------------
; 107 | static inline void CSL_init(void) {
; 109 | #if (CHIP_5510)
; 110 | CSL5510_LIB_();
; 111 | #elif (CHIP_5510PG1_0)
; 112 | CSL5510_PG1_LIB_();
; 113 | #elif (CHIP_5510PG1_2)
; 114 | CSL5510_PG1_2_LIB_();
; 116 | #elif (CHIP_5510PG2_0)
; 117 | CSL5510_PG2_0_LIB_();
; 118 | #elif (CHIP_5510PG2_1)
; 119 | CSL5510_PG2_1_LIB_();
; 120 | #elif (CHIP_5510PG2_2)
; 121 | CSL5510_PG2_2_LIB_();
; 123 | #elif (CHIP_5509)
;----------------------------------------------------------------------
AADD #-1, SP
;----------------------------------------------------------------------
; 124 | CSL5509_LIB_();
; 125 | #elif (CHIP_5509A)
; 126 | CSL5509A_LIB_();
; 127 | #elif (CHIP_5502)
; 128 | CSL5502_LIB_();
; 129 | #endif
;----------------------------------------------------------------------
CALL #_CSL5509_LIB_ ; |124|
; call occurs [#_CSL5509_LIB_] ; |124|
;----------------------------------------------------------------------
; 132 | _CSL_init(0); // Call _CSL_init with 0 for operating system
; 133 | // flag
;----------------------------------------------------------------------
MOV #0, T0
CALL #__CSL_init ; |132|
; call occurs [#__CSL_init] ; |132|
AADD #1, SP
RET
; return occurs
.sect ".text"
.align 4
.global _main
;----------------------------------------------------------------------
; 41 | main()
;----------------------------------------------------------------------
;*******************************************************************************
;* FUNCTION NAME: _main *
;* *
;* Function Uses Regs : AR0,XAR0,AR1,AR3,AR5,AR7,SP,CARRY,M40,SATA,SATD,RDM, *
;* FRCT,SMUL *
;* Save On Entry Regs : AR5,AR7 *
;* Stack Frame : Compact (No Frame Pointer) *
;* Total Frame Size : 4 words *
;* (1 return address/alignment) *
;* (1 local values) *
;* (2 register save area) *
;*******************************************************************************
_main:
PSHBOTH XAR5
PSHBOTH XAR7
AADD #-1, SP
;----------------------------------------------------------------------
; 43 | int i = 0;
;----------------------------------------------------------------------
MOV #0, *SP(#0) ; |43|
;----------------------------------------------------------------------
; 45 | CSL_init();
;----------------------------------------------------------------------
CALL #_CSL_init ; |45|
; call occurs [#_CSL_init] ; |45|
;----------------------------------------------------------------------
; 48 | PLL_config(&myConfig);
;----------------------------------------------------------------------
AMOV #_myConfig, XAR0 ; |48|
CALL #_PLL_config ; |48|
; call occurs [#_PLL_config] ; |48|
;----------------------------------------------------------------------
; 51 | GPIO_RSET(IODIR,0xFF);
;----------------------------------------------------------------------
MOV #13312, AR3 ; |51|
MOV #255, port(*AR3) ; |51|
;----------------------------------------------------------------------
; 52 | for(i = 0;i<0x1;i++)
;----------------------------------------------------------------------
MOV #13313, AR7 ; |55|
MOV #0, *SP(#0) ; |52|
MOV *SP(#0), AR1 ; |52|
MOV #13313, AR5 ; |59|
BCC L2,AR1 > #0 ; |52|
; branch occurs ; |52|
L1:
;----------------------------------------------------------------------
; 55 | GPIO_RSET(IODATA,0xff);
;----------------------------------------------------------------------
MOV #255, port(*AR7) ; |55|
;----------------------------------------------------------------------
; 57 | delay();
;----------------------------------------------------------------------
CALL #_delay ; |57|
; call occurs [#_delay] ; |57|
;----------------------------------------------------------------------
; 59 | GPIO_RSET(IODATA,0x0);
;----------------------------------------------------------------------
MOV #0, port(*AR5) ; |59|
;----------------------------------------------------------------------
; 60 | delay();
;----------------------------------------------------------------------
CALL #_delay ; |60|
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -