Tool/software: Code Composer Studio
Hey,
Now suppose we have three unsigned int global variable and access using its address available in MAP file during a run time like this
But our problem on 4th line this asm(" MOVL ACC,*XAR6); one its content load ok but original content available in AH (accumulator high) part so how to extract the AH part in Full ACC we do not require an AL(accumulator LOW )part. I have already tried the shifting by 16 but not working can you suggest me proper shifting in inline assembly or another method?
asm(" MOVW DP,#_a"); // load page address
asm(" MOVL ACC,@_a); // load the value in ACC available in a
asm(" MOVL XAR6,ACC);
asm(" MOVL ACC,*XAR6); // Variable value using indirect addressing mode
asm(" MOVW DP,#_b);
asm(" MOVL @_b,ACC); // Transfer the value ACC in another variable
Regards
Yash shah