comparison 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
comparison
equal deleted inserted replaced
603:00b24fb4324d 604:ca4556fb60b9
1 ;============================================================================= 1 ;=============================================================================
2 ; 2 ;
3 ; File math.inc 3 ; File math.inc REFACTORED VERSION V2.99d
4 ; 4 ;
5 ; 5 ;
6 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. 6 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved.
7 ;============================================================================= 7 ;=============================================================================
8 ; HISTORY 8 ; HISTORY
9 ; 2011-08-03 : [mH] moving from OSTC code 9 ; 2011-08-03 : [mH] moving from OSTC code
10 10
11 extern convert_time 11 extern convert_time ; converts hi:lo in minutes to hours (up:hi) and minutes (lo)
12 extern div16 12 ; also usable for conversion of seconds to minutes and seconds
13 extern sub16 13 ; trashes xA, xB, xC
14 extern subU16 14
15 extern mult16x16 15 extern div16 ; divA:2 = divA:2 / 2^WREG
16 extern div16x16 16 ; trashes WREG
17 extern div32x16 17
18 ; extern isr_mult16x16 18 extern mult16 ; divA:2 = divA:2 * 2^WREG
19 extern isr_shift_C31 19 ; trashes WREG
20 extern isr_unsigned_mult16x16 20
21 extern isr_signed_mult16x16 21 extern sub16 ; sub_c:2 = sub_a:2 - sub_b:2 with SIGNED values
22 ; sets neg_flag if result is < 0
23 ; trashes WREG
24
25 extern subU16 ; sub_c:2 = sub_a:2 - sub_b:2 with UNSIGNED values
26 ; sets neg_flag if result is < 0
27 ; trashes WREG
28
29 extern mult16x16 ; xC:4 = xA:2 * xB:2 with UNSIGNED values
30 ; trashes PRODL, PRODH, WREG
31
32 extern div16x16 ; xC:2 = xA:2 / xB:2 with xA as remainder
33 ; trashes xB, WREG
34
35 extern div32x16 ; xC:4 = xC:4 / xB:2 with xA as remainder
36 ; trashes WREG
37
38 extern isr_shift_C31 ; 24 bit shift, repeated WREG times,
39 ; dedicated to a specific usage
40
41 extern isr_unsigned_mult16x16 ; isr_xC = isr_xA * _isr_xB with UNSIGNED values
42 ; trashes PRODL, PRODH, WREG
43
44 extern isr_signed_mult16x16 ; isr_xC = isr_xA * _isr_xB with SIGNED values
45 ; trashes PRODL, PRODH, WREG