汇编手册的宏定义很简单,而且后面的参数 P1 P2 啊这些都有用到,
add3 .macro P1, P2, P3, ADDRP
MOV ACC, P1
ADD ACC, P2
ADD ACC, P3
ADD ACC, ADDRP
.endm
为什么下面的宏定义里面就没有任何关于m,n这些参数的应用。
ADCDRV_8ch_INIT .macro m,n,p,q,r,s,t,u
;=============================
_ADCDRV_8ch_RltPtrA .usect "ADCDRV_8ch_Section",2,1,1 ; output terminal 1
_ADCDRV_8ch_RltPtrB .usect "ADCDRV_8ch_Section",2,1,1 ; output terminal 2
_ADCDRV_8ch_RltPtrC .usect "ADCDRV_8ch_Section",2,1,1 ; output terminal 3
_ADCDRV_8ch_RltPtrD .usect "ADCDRV_8ch_Section",2,1,1 ; output terminal 4
_ADCDRV_8ch_RltPtrE .usect "ADCDRV_8ch_Section",2,1,1 ; output terminal 5
_ADCDRV_8ch_RltPtrF .usect "ADCDRV_8ch_Section",2,1,1 ; output terminal 6
_ADCDRV_8ch_RltPtrG .usect "ADCDRV_8ch_Section",2,1,1 ; output terminal 7
_ADCDRV_8ch_RltPtrH .usect "ADCDRV_8ch_Section",2,1,1 ; output terminal 8
; publish Terminal Pointers for access from the C environment
.def _ADCDRV_8ch_RltPtrA
.def _ADCDRV_8ch_RltPtrB
.def _ADCDRV_8ch_RltPtrC
.def _ADCDRV_8ch_RltPtrD
.def _ADCDRV_8ch_RltPtrE
.def _ADCDRV_8ch_RltPtrF
.def _ADCDRV_8ch_RltPtrG
.def _ADCDRV_8ch_RltPtrH
MOVL XAR2, #ZeroNet ; "ZeroNet" is address to a location initialised to 0
MOVW DP, #_ADCDRV_8ch_RltPtrA
MOVL @_ADCDRV_8ch_RltPtrA, XAR2 ; zero output terminal pointer
MOVL @_ADCDRV_8ch_RltPtrB, XAR2 ; zero output terminal pointer
MOVL @_ADCDRV_8ch_RltPtrC, XAR2 ; zero output terminal pointer
MOVL @_ADCDRV_8ch_RltPtrD, XAR2 ; zero output terminal pointer
MOVL @_ADCDRV_8ch_RltPtrE, XAR2 ; zero output terminal pointer
MOVL @_ADCDRV_8ch_RltPtrF, XAR2 ; zero output terminal pointer
MOVL @_ADCDRV_8ch_RltPtrG, XAR2 ; zero output terminal pointer
MOVL @_ADCDRV_8ch_RltPtrH, XAR2 ; zero output terminal pointer
.endm
|
|