Tool/software: TI C/C++ Compiler
How can I place some assembly code at an exact memory location in flash? I need the code below in exact memory lotion, specifically in 0x9B54
__divu: .asmfunc stack_usage(RETADDRSZ) __remu: CLR.W R14 ; Initialize the remainder MOV.W R12,R15 ; Copy dividend for shifting MOV.W #1,R12 ; Walk 1 across for looping, also hold quotient div_loop: RLA.W R15 ; Shift dividend into remainder RLC.W R14 CMP.W R13,R14 ; If current remainder > divisor, subtract JNC set_quotient_bit SUB.W R13,R14 set_quotient_bit: RLC.W R12 ; Set quotient bit (in carry),adv loop bit JNC div_loop RET .endasmfunc
The reason I need it is because I messed up my boot strap loader and it uses this function. So if I upgrade the firmware the system will fail, unless it has this function in exact location.