Changeset 592 in xtideuniversalbios for trunk/Assembly_Library/Src/Util/Size.asm
- Timestamp:
- Jun 25, 2018, 10:29:27 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Util/Size.asm
r580 r592 70 70 jae SHORT Size_DivideSizeInBXDXAXby1024andIncrementMagnitudeInCX 71 71 add sp, BYTE 2 ; Clean return address from stack 72 xchg si, cx ; CX = Remainder (0...1023), SI = Magnitude73 72 74 73 ; Convert remainder to tenths 75 xchg bx, ax ; Store AX 76 mov al, 5 ; AH = 0 77 mul cx ; DX:AX = remainder * (10 / 2) 78 %ifdef USE_186 79 shr ax, 9 ; Divide AX by (1024 / 2) 80 %else 81 shr ax, 1 82 mov al, ah 83 cbw 84 %endif 85 xchg cx, ax ; CX = tenths 86 xchg ax, bx 74 mov bx, 640 75 xchg bx, ax ; BX = Size, AX = (10 / 1024) * 65536 76 mul si ; DX = Remainder * (10 / 1024) 77 xchg dx, ax 78 xchg cx, ax ; CX = Tenths, AX = Magnitude 79 xchg bx, ax ; AX = Size, BX = Magnitude 87 80 88 81 ; Convert magnitude to character 89 mov dl, [cs: si+.rgbMagnitudeToChar]82 mov dl, [cs:bx+.rgbMagnitudeToChar] 90 83 91 84 pop si … … 154 147 ; Nothing 155 148 ;-------------------------------------------------------------------- 156 %ifdef EXCLUDE_FROM_X TIDE_UNIVERSAL_BIOS149 %ifdef EXCLUDE_FROM_XUB 157 150 %ifdef USE_386 158 151 %define EXCLUDE
Note:
See TracChangeset
for help on using the changeset viewer.