Mercurial > public > hwos_code
diff src/math.inc @ 604:ca4556fb60b9
bump to 2.99beta, work on 3.00 stable
author | heinrichsweikamp |
---|---|
date | Thu, 22 Nov 2018 19:47:26 +0100 |
parents | 11d4fc797f74 |
children | c40025d8e750 |
line wrap: on
line diff
--- a/src/math.inc Thu Oct 11 21:06:29 2018 +0200 +++ b/src/math.inc Thu Nov 22 19:47:26 2018 +0100 @@ -1,6 +1,6 @@ ;============================================================================= ; -; File math.inc +; File math.inc REFACTORED VERSION V2.99d ; ; ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. @@ -8,14 +8,38 @@ ; HISTORY ; 2011-08-03 : [mH] moving from OSTC code - extern convert_time - extern div16 - extern sub16 - extern subU16 - extern mult16x16 - extern div16x16 - extern div32x16 -; extern isr_mult16x16 - extern isr_shift_C31 - extern isr_unsigned_mult16x16 - extern isr_signed_mult16x16 + extern convert_time ; converts hi:lo in minutes to hours (up:hi) and minutes (lo) + ; also usable for conversion of seconds to minutes and seconds + ; trashes xA, xB, xC + + extern div16 ; divA:2 = divA:2 / 2^WREG + ; trashes WREG + + extern mult16 ; divA:2 = divA:2 * 2^WREG + ; trashes WREG + + extern sub16 ; sub_c:2 = sub_a:2 - sub_b:2 with SIGNED values + ; sets neg_flag if result is < 0 + ; trashes WREG + + extern subU16 ; sub_c:2 = sub_a:2 - sub_b:2 with UNSIGNED values + ; sets neg_flag if result is < 0 + ; trashes WREG + + extern mult16x16 ; xC:4 = xA:2 * xB:2 with UNSIGNED values + ; trashes PRODL, PRODH, WREG + + extern div16x16 ; xC:2 = xA:2 / xB:2 with xA as remainder + ; trashes xB, WREG + + extern div32x16 ; xC:4 = xC:4 / xB:2 with xA as remainder + ; trashes WREG + + extern isr_shift_C31 ; 24 bit shift, repeated WREG times, + ; dedicated to a specific usage + + extern isr_unsigned_mult16x16 ; isr_xC = isr_xA * _isr_xB with UNSIGNED values + ; trashes PRODL, PRODH, WREG + + extern isr_signed_mult16x16 ; isr_xC = isr_xA * _isr_xB with SIGNED values + ; trashes PRODL, PRODH, WREG