Mercurial > public > hwos_code
comparison src/math.inc @ 623:c40025d8e750
3.03 beta released
author | heinrichsweikamp |
---|---|
date | Mon, 03 Jun 2019 14:01:48 +0200 |
parents | ca4556fb60b9 |
children | cd58f7fc86db |
comparison
equal
deleted
inserted
replaced
622:02d1386429a6 | 623:c40025d8e750 |
---|---|
1 ;============================================================================= | 1 ;============================================================================= |
2 ; | 2 ; |
3 ; File math.inc REFACTORED VERSION V2.99d | 3 ; File math.inc combined next generation V3.03.2 |
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 ; converts hi:lo in minutes to hours (up:hi) and minutes (lo) | 11 extern convert_time ; convert hi:lo in minutes to hours (up:hi) and minutes (lo) |
12 ; also usable for conversion of seconds to minutes and seconds | 12 ; also usable for conversion of seconds to minutes and seconds |
13 ; trashes xA, xB, xC | 13 ; trashes xA, xB, xC |
14 | 14 |
15 extern div16 ; divA:2 = divA:2 / 2^WREG | 15 extern div16 ; divA:2 = divA:2 / 2^WREG |
16 ; trashes WREG | 16 ; trashes WREG |
22 ; sets neg_flag if result is < 0 | 22 ; sets neg_flag if result is < 0 |
23 ; trashes WREG | 23 ; trashes WREG |
24 | 24 |
25 extern subU16 ; sub_c:2 = sub_a:2 - sub_b:2 with UNSIGNED values | 25 extern subU16 ; sub_c:2 = sub_a:2 - sub_b:2 with UNSIGNED values |
26 ; sets neg_flag if result is < 0 | 26 ; sets neg_flag if result is < 0 |
27 ; trashes WREG | |
28 | |
29 extern cmpU16 ; sub_a:2 - sub_b:2 with UNSIGNED values | |
30 ; sets neg_flag if result is < 0, but does not store result itself | |
27 ; trashes WREG | 31 ; trashes WREG |
28 | 32 |
29 extern mult16x16 ; xC:4 = xA:2 * xB:2 with UNSIGNED values | 33 extern mult16x16 ; xC:4 = xA:2 * xB:2 with UNSIGNED values |
30 ; trashes PRODL, PRODH, WREG | 34 ; trashes PRODL, PRODH, WREG |
31 | 35 |