📄 examplescfg.lst
字号:
262 .asg 01H, _gNumHeap
263 .asg DARAM, _SEGZERO
264 .asg DARAM, _MALLOCSEG
265 000003 MEM_config _gNumHeap, _SEGZERO, _MALLOCSEG
1
TMS320C55x COFF Assembler Version 2.04 Tue Apr 15 17:20:23 2003
Copyright (c) 1996-2001 Texas Instruments Incorporated
examplescfg.s55 PAGE 8
1 ;
1 ; Proceed only if there are heaps declared.
1 ;
1 .if 01H
1 .global _MEM ; Pointer to configuration
1 ; parameters
1 .global _MEM_memtab ; Array of memory heaps
1 .global __MEM_NUMSEGMENTS ; Number of memory heaps
1
1 ;
1 ; The following two .bss/.cinit sets make configured values
1 ; readable in the established SPOX manner, e.g.,
1 ; MEM->MALLOCSEG.
1 ;
1
1 ; Allocate and initialize MEM_config
1
1 000003 C55_allocateObject isIntAligned , MEM_config, INTSIZE, .mem
2 000003 CHK_nargs "CINIT", section
2
2 .var objSize ; Explicitly decalate a variable
2 ; so that it limits the scope
2 ; to the macro
2 .eval 1, objSize ; This is the size of
2 ; .object
2 .if (1 = 2) ; Does the Obj require alignment
2 .if (objSize & 0x1) ; if the cinit size is odd
2 .eval objSize + 1, objSize ; Make it even
2 .endif
2 MEM_config .usect ":section:", objSize, 0, 1 ; allocate object at
2 ; even boundary
2 .else
2 000000 MEM_config .usect ".mem", 1, 0, 0
2 ; allocate object at any
2 ; boundary.
2 ; Note that the last parameter
2 ; is a flag that represents
2 ; if the object has alignment
2 ; requirment or not.
2 .endif
2
1 000003 C55_cinitHeader CINITALIGN, isIntAligned, MEM_config,INTSIZE, DATAPAGE
2 000003 CHK_nargs "CINIT", page
2 .var cinitSize ; Explicitly decalate a variable
2 ; so that it limits the scope
2 ; to the macro
2 .eval 1, cinitSize ; This is the size of
2 ; cinit records.
2 .if (1 = 2) ; Does the Obj require alignment
2 .if (:objSize: & 0x1) ; if the cinit size is odd
2 .eval cinitSize + 1, cinitSize ; Make it even
2 .endif
2 .endif
2
2
TMS320C55x COFF Assembler Version 2.04 Tue Apr 15 17:20:23 2003
Copyright (c) 1996-2001 Texas Instruments Incorporated
examplescfg.s55 PAGE 9
2 000000 .sect ".cinit"
2 .align CINITALIGN ; Create the cinit header
2 000000 0001 .field 1 ; size
2 000001 0000- .field MEM_config, 24 ; address
000002 0000
2 000002 0000 .field DATAPAGE, 8 ; page
2 .eval 0, offset ; initialize the offset to 0
1 000003 C55_cinitBegin isIntAligned
2 000003 CHK_nargs "CINIT", isObjectAligned
2 000003 C55_alignIfRequired isObjectAligned
3 000003 CHK_nargs "CINIT", isObjectAligned
3
3 .if (1 = 2) ; Does the obj requir
3 ; alignment
3 .if (offset & 0x1) ; if the object is at
3 ; odd offset
3 .word 0xdead ; create a dead word
3 .eval offset + 1, offset
3 ; increase the offset
3 .endif
3 .endif
1 ;; If MALLOCSEG = MEM_NULL then put in an err value in for MALLOCSEG$idx
1 .if ($symcmp("DARAM", "MEM_NULL") == 0)
1 C55_cinitInt -1
1 .else
1 000003 C55_cinitInt DARAM$idx
2 000003 CHK_nargs "CINIT", value
2 000003 0000 .word DARAM$idx ; Fill in the value
2 .eval 0 + 1, offset ; Increase the offset
2 ; corrresponding size
2 ; of dataPtr.
1 .endif
1 000004 C55_cinitEnd isIntAligned
2 000004 CHK_nargs "CINIT", isObjectAligned
2 000004 C55_alignIfRequired isObjectAligned
3 000004 CHK_nargs "CINIT", isObjectAligned
3
3 .if (1 = 2) ; Does the obj requir
3 ; alignment
3 .if (offset & 0x1) ; if the object is at
3 ; odd offset
3 .word 0xdead ; create a dead word
3 .eval offset + 1, offset
3 ; increase the offset
3 .endif
3 .endif
1
1
1 ; initialize _MEM
1
1 000004 C55_cinitHeader CINITALIGN, isDataPtrAligned, _MEM, DATAPTRSIZE, DATAPAGE
2 000004 CHK_nargs "CINIT", page
2 .var cinitSize ; Explicitly decalate a variable
2 ; so that it limits the scope
2 ; to the macro
TMS320C55x COFF Assembler Version 2.04 Tue Apr 15 17:20:23 2003
Copyright (c) 1996-2001 Texas Instruments Incorporated
examplescfg.s55 PAGE 10
2 .eval 1, cinitSize ; This is the size of
2 ; cinit records.
2 .if (1 = 2) ; Does the Obj require alignment
2 .if (:objSize: & 0x1) ; if the cinit size is odd
2 .eval cinitSize + 1, cinitSize ; Make it even
2 .endif
2 .endif
2
2
2 000004 .sect ".cinit"
2 .align CINITALIGN ; Create the cinit header
2 000004 0001 .field 1 ; size
2 000005 0000! .field _MEM, 24 ; address
000006 0000
2 000006 0000 .field DATAPAGE, 8 ; page
2 .eval 0, offset ; initialize the offset to 0
1 000007 C55_cinitBegin isDataPtrAligned
2 000007 CHK_nargs "CINIT", isObjectAligned
2 000007 C55_alignIfRequired isObjectAligned
3 000007 CHK_nargs "CINIT", isObjectAligned
3
3 .if (1 = 2) ; Does the obj requir
3 ; alignment
3 .if (offset & 0x1) ; if the object is at
3 ; odd offset
3 .word 0xdead ; create a dead word
3 .eval offset + 1, offset
3 ; increase the offset
3 .endif
3 .endif
1 000007 C55_cinitDataPtr MEM_config
2 000007 CHK_nargs "CINIT", value
2 .if (__large_model)
2 ; compilaton
2 .if (offset & 0x1) ; if at odd offset
2 .word 0xdead ; fill in the hole
2 .eval offset + 1, offset
2 ; increase the offset
2 ; for hole filled.
2 .endif
2 .xlong :value: ; Fill in the value
2 .eval offset + 2, offset ; Increase the offset
2 ; corrresponding size
2 ; of dataPtr.
2 .else
2 000007 0000% .word MEM_config & 0xffff ; If in near mode just
2 ; fill the value.
2 .eval 0 + 1, offset ; increase the offset
2 ; coressponding to
2 ; that of data ptr.
2 .endif
1 000008 C55_cinitEnd isDataPtrAligned
2 000008 CHK_nargs "CINIT", isObjectAligned
2 000008 C55_alignIfRequired isObjectAligned
3 000008 CHK_nargs "CINIT", isObjectAligned
TMS320C55x COFF Assembler Version 2.04 Tue Apr 15 17:20:23 2003
Copyright (c) 1996-2001 Texas Instruments Incorporated
examplescfg.s55 PAGE 11
3
3 .if (1 = 2) ; Does the obj requir
3 ; alignment
3 .if (offset & 0x1) ; if the object is at
3 ; odd offset
3 .word 0xdead ; create a dead word
3 .eval offset + 1, offset
3 ; increase the offset
3 .endif
3 .endif
1
1
1 ;
1 ; This declares space for the array of configured heaps, the
1 ; .cinit parts are defined for each task in MEM_Obj. This
1 ; space has to be reserved NOW, before the MEM_Obj macro is
1 ; called and the elements of the table are defined.
1 ;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -