Changeset 181 in xtideuniversalbios for trunk/Configurator/Src/Libraries/math.asm
- Timestamp:
- Nov 13, 2011, 3:38:40 PM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Configurator/Src/Libraries/math.asm
r78 r181 1 ; File name : math.asm2 1 ; Project name : Math library 3 ; Created date : 7.10.2009 4 ; Last update : 4.1.2011 5 ; Author : Tomi Tilli, 6 ; : Krister Nordvall (optimizations) 7 ; Description : ASM library to for math related functions. 2 ; Description : ASM library for math related functions. 8 3 9 4 ;--------------- Equates ----------------------------- … … 27 22 ;-------------------------------------------------------------------- 28 23 ; Macro to select lesser of two unsigned operands. 29 ; 24 ; 30 25 ; MIN_U 31 26 ; Parameters: … … 48 43 ;-------------------------------------------------------------------- 49 44 ; Macro to select greater of two unsigned operands. 50 ; 45 ; 51 46 ; MAX_U 52 47 ; Parameters: … … 69 64 ;-------------------------------------------------------------------- 70 65 ; Macro to select lesser and greater of two unsigned operands. 71 ; 66 ; 72 67 ; MINMAX_U 73 68 ; Parameters: … … 82 77 %macro MINMAX_U 2 83 78 cmp %1, %2 ; Is %1 smaller? 84 jb e%%Return ; If so, return79 jb %%Return ; If so, return 85 80 xchg %1, %2 ; Exchange operands 86 81 ALIGN JUMP_ALIGN … … 93 88 ; Multiplies unsigned 32-bit integer by unsigned 16-bit integer. 94 89 ; Result is unsigned 32-bit integer, so overflow is possible. 95 ; 90 ; 96 91 ; Math_MulDWbyW 97 92 ; Parameters: … … 130 125 ;-------------------------------------------------------------------- 131 126 ; Divide a 32-bit unsigned integer so that quotient can be 32-bit. 132 ; 127 ; 133 128 ; Math_DivDWbyW 134 129 ; Parameters: … … 157 152 ;-------------------------------------------------------------------- 158 153 ; Converts remainder to tenths. 159 ; 154 ; 160 155 ; Math_RemToTenths 161 156 ; Parameters:
Note:
See TracChangeset
for help on using the changeset viewer.