Changeset 58723 in vbox for trunk/src/VBox/Devices/BiosCommonCode/support.asm
- Timestamp:
- Nov 17, 2015 3:30:27 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 104154
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/BiosCommonCode/support.asm
r56292 r58723 22 22 public __U4D 23 23 public __U4M 24 public __U8LS 25 public __U8RS 24 26 ifndef VBOX_PC_BIOS 25 27 public __I4D … … 43 45 ; @param cx:bx Divisor. 44 46 ; @returns dx:ax Quotient. 45 ; cx:bx Rem inder.47 ; cx:bx Remainder. 46 48 ; 47 49 __U4D: … … 59 61 mov cx, bx 60 62 61 div ecx ; eax:edx / ecx -> eax=quotient, edx=rem inder.63 div ecx ; eax:edx / ecx -> eax=quotient, edx=remainder. 62 64 63 65 mov bx, dx … … 84 86 ; @param cx:bx Divisor. 85 87 ; @returns dx:ax Quotient. 86 ; cx:bx Rem inder.88 ; cx:bx Remainder. 87 89 ; 88 90 __I4D: … … 100 102 mov cx, bx 101 103 102 idiv ecx ; eax:edx / ecx -> eax=quotient, edx=rem inder.104 idiv ecx ; eax:edx / ecx -> eax=quotient, edx=remainder. 103 105 104 106 mov bx, dx … … 157 159 ifndef VBOX_PC_BIOS 158 160 ;; 159 ; 32-bit unsigned multiplication. 160 ; memset taking a far pointer. 161 ; 32-bit signed multiplication. 161 162 ; 162 163 ; @param dx:ax Factor 1. … … 198 199 199 200 ;; 201 ; 64-bit left shift. 202 ; 203 ; @param ax:bx:cx:dx Value. 204 ; @param si Shift count. 205 ; @returns ax:bx:cx:dx Shifted value. 206 ; si is zeroed 207 ; 208 __U8LS: 209 210 test si, si 211 jz u8ls_quit 212 u8ls_rot: 213 shl dx, 1 214 rcl cx, 1 215 rcl bx, 1 216 rcl ax, 1 217 dec si 218 jnz u8ls_rot 219 u8ls_quit: 220 ret 221 222 223 ;; 224 ; 64-bit unsigned right shift. 225 ; 226 ; @param ax:bx:cx:dx Value. 227 ; @param si Shift count. 228 ; @returns ax:bx:cx:dx Shifted value. 229 ; si is zeroed 230 ; 231 __U8RS: 232 233 test si, si 234 jz u8rs_quit 235 u8rs_rot: 236 shr ax, 1 237 rcr bx, 1 238 rcr cx, 1 239 rcr dx, 1 240 dec si 241 jnz u8rs_rot 242 u8rs_quit: 243 ret 244 245 246 ;; 200 247 ; memset taking a far pointer. 201 248 ; … … 221 268 222 269 ;; 223 ; mem settaking far pointers.270 ; memcpy taking far pointers. 224 271 ; 225 272 ; cx, es may be modified; si, di are preserved
Note:
See TracChangeset
for help on using the changeset viewer.