Hey Darrel, I have a question about N-Bit math as it relates to DT_INTS ASM type interrupt.
Would the ASM part of the N-Bit Math qualify as an assembly interrupt? for instance, can I do math like this in the middle of an asm type interrupt handler, without having to worry? I am not really talking about this code (your degree conversion example) but doing math like this inside an assembly interrupt handler. Or since it is using an include file, I have to worry?
Thanks,Code:ASM MOVE?WP _degree_Total, _Temp1 ; copy degrees to a PVAR MOVE?CP 65535, _Temp2 ; put multiplier in a PVAR MATH_MUL _Temp1, _Temp2, _Temp1 ; Temp1 = DEG * 65535 MOVE?CP 35999, _Temp2 MATH_DIV _Temp1, _Temp2, _Temp1 ; Temp1 = Temp1 / 35999 (16-bit result) MOVE?PP _Temp1, _Temp2 ; copy result to Temp2 MATH_ROR _Temp2 ; rotate right 4 times MATH_ROR _Temp2 MATH_ROR _Temp2 MATH_ROR _Temp2 ; Temp2 is now 12-bits MOVE?PW _Temp1, _Decimal_value_16bit ; copy PVAR's to WORDs MOVE?PW _Temp2, _Decimal_value_12bit ENDASM
Walter




Bookmarks