📄 hook.h62
字号:
;
; Copyright 2003 by Texas Instruments Incorporated.
; All rights reserved. Property of Texas Instruments Incorporated.
; Restricted rights to use, duplicate or disclose this code are
; granted through contract.
;
;
; "@(#) DSP/BIOS 4.90.270 12-18-03 (barracuda-o04)"
;
; ======== hook.h62 ========
;
;
.if ($isdefed("HOOK_") = 0) ; prevent multiple includes of this file
HOOK_ .set 1
.include std.h62
;
;# ======== HOOK_config ========
; Static configuration of the HOOK module
;
;#
;# Preconditions:
;# none
;#
;# Postconditions:
;# none
;#
;
.asg "", HOOK_config$regs
HOOK_config .macro knl_index
.if (HOOK$ == 1)
.def __HOOK_initFxnTable
.def __HOOK_createFxnTable
.def __HOOK_deleteFxnTable
.def __HOOK_exitFxnTable
.def __HOOK_readyFxnTable
.def __HOOK_switchFxnTable
.endif
.asg 0, HOOK$index
.eval :knl_index:, HOOK$knl_index
.def __HOOK_knlId
.bss __HOOK_knlId, 1 * STD_TARGWORDMAUS, STD_TARGWORDMAUS
.sect ".cinit"
.align STD_TARGALIGN
.word 1 * STD_TARGWORDMAUS
.word __HOOK_knlId
.word HOOK$knl_index
.endm
;
;# ======== HOOK_Obj ========
;
;#
;# Preconditions:
;# none
;#
;# Postconditions:
;# none
;#
;
.asg "", HOOK_Obj$regs
HOOK_Obj .macro cflag, name, id, initFxn, createFxn, deleteFxn, exitFxn, callSwitch, switchFxn, callReady, readyFxn
.def :name:
:name: .set HOOK$index
.asg HOOK$index, index
.sect ".cinit"
.align STD_TARGALIGN
.word 1 * STD_TARGWORDMAUS
.word __HOOK_initFxnTable + (index * STD_TARGWORDMAUS)
.word :initFxn:
.sect ".cinit"
.align STD_TARGALIGN
.word 1 * STD_TARGWORDMAUS
.word __HOOK_createFxnTable + (index * STD_TARGWORDMAUS)
.word :createFxn:
.sect ".cinit"
.align STD_TARGALIGN
.word 1 * STD_TARGWORDMAUS
.word __HOOK_deleteFxnTable + (index * STD_TARGWORDMAUS)
.word :deleteFxn:
.sect ".cinit"
.align STD_TARGALIGN
.word 1 * STD_TARGWORDMAUS
.word __HOOK_exitFxnTable + (index * STD_TARGWORDMAUS)
.word :exitFxn:
.sect ".cinit"
.align STD_TARGALIGN
.word 1 * STD_TARGWORDMAUS
.word __HOOK_readyFxnTable + (index * STD_TARGWORDMAUS)
.if (:callReady:)
.word :readyFxn:
.else
.word -1
.endif
.sect ".cinit"
.align STD_TARGALIGN
.word 1 * STD_TARGWORDMAUS
.word __HOOK_switchFxnTable + (index * STD_TARGWORDMAUS)
.if (:callSwitch:)
.word :switchFxn:
.else
.word -1
.endif
.eval HOOK$index+1, HOOK$index
.endm
;
;# ======== HOOK_end ========
; Invoked at the end of all other configuration
; declarations.
;
;#
;# Preconditions:
;# none
;#
;# Postconditions:
;# none
;#
;
.asg "", HOOK_end$regs
HOOK_end .macro
; expand only if HOOK is enabled.
.if (HOOK$ == 1)
.bss __HOOK_initFxnTable, HOOK$index * STD_TARGWORDMAUS, STD_TARGWORDMAUS
.bss __HOOK_createFxnTable, HOOK$index * STD_TARGWORDMAUS, STD_TARGWORDMAUS
.bss __HOOK_deleteFxnTable, HOOK$index * STD_TARGWORDMAUS, STD_TARGWORDMAUS
.bss __HOOK_exitFxnTable, HOOK$index * STD_TARGWORDMAUS, STD_TARGWORDMAUS
.bss __HOOK_readyFxnTable, HOOK$index * STD_TARGWORDMAUS, STD_TARGWORDMAUS
.bss __HOOK_switchFxnTable, HOOK$index * STD_TARGWORDMAUS, STD_TARGWORDMAUS
.endif
;
; always define _HOOK_NUMHOOKS
;
.def __HOOK_NUMHOOKS
.bss __HOOK_NUMHOOKS, 1 * STD_TARGWORDMAUS, STD_TARGWORDMAUS
.sect ".cinit"
.align STD_TARGALIGN
.word 1 * STD_TARGWORDMAUS
.word __HOOK_NUMHOOKS
.word HOOK$index
.endm
;
;# ======== HOOK_init ========
; Runtime initialization of the HOOK module
;
;#
;# Preconditions:
;# none
;#
;# Postconditions:
;# none
;#
;
.asg "", HOOK_init$regs
HOOK_init .macro
; only expand if the HOOK module is configured
.if (HOOK$ = 1)
.ref __HOOK_doInit
mvkl __HOOK_doInit, a0
mvkh __HOOK_doInit, a0
b a0
mvkl init_ret, b3
mvkh init_ret, b3
nop 3
init_ret:
.endif
.endm
;
;# ======== HOOK_startup ========
;
;#
;# Preconditions:
;# none
;#
;# Postconditions:
;# none
;#
.asg "", HOOK_startup$regs
HOOK_startup .macro
; only expand if the HOOK module is configured
.if (HOOK$ = 1)
.endif
.endm
.endif ; if HOOK_ is not defined
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -