Changeset 592 in xtideuniversalbios for trunk/Assembly_Library/Src/Util/Math.asm
- Timestamp:
- Jun 25, 2018, 10:29:27 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Util/Math.asm
r589 r592 33 33 ; AX 34 34 ;-------------------------------------------------------------------- 35 %ifndef EXCLUDE_FROM_XTIDE _UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG35 %ifndef EXCLUDE_FROM_XTIDECFG 36 36 ALIGN JUMP_ALIGN 37 37 Math_DivQWatSSBPbyCX: 38 %if 139 xor dx, dx40 mov ax, [bp+6] ; Load highest divident WORD to DX:AX41 div cx42 mov [bp+6], ax ; Store quotient43 44 mov ax, [bp+4]45 div cx46 mov [bp+4], ax47 48 mov ax, [bp+2]49 div cx50 mov [bp+2], ax51 52 mov ax, [bp]53 div cx54 mov [bp], ax55 ret56 %else ; ~157 ; This is about half the size compared to the above code but it's not tested which is why it's commented away.58 38 push di 59 39 mov di, 6 … … 65 45 dec di 66 46 dec di 67 jns .Next47 jns SHORT .Next 68 48 pop di 69 49 ret 70 %endif ; 171 50 %endif 72 51 … … 83 62 ; Nothing 84 63 ;-------------------------------------------------------------------- 85 %ifndef EXCLUDE_FROM_XTIDECFG 64 %ifndef EXCLUDE_FROM_XTIDECFG OR EXCLUDE_FROM_BIOSDRVS 86 65 ALIGN JUMP_ALIGN 87 66 Math_DivDXAXbyCX:
Note:
See TracChangeset
for help on using the changeset viewer.