Changeset 41653 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Jun 11, 2012 2:41:04 PM (13 years ago)
- Location:
- trunk/src/VBox/Devices/PC/BIOS-new
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/BIOS-new/eltorito.c
r39651 r41653 366 366 bios_dsk->drqp.sect_sz = 512; 367 367 368 bios_dsk->drqp.skip_a = 2048 - nbsectors * 512 L % 2048;368 bios_dsk->drqp.skip_a = 2048 - nbsectors * 512UL % 2048; 369 369 370 370 if (device > BX_MAX_ATA_DEVICES) … … 552 552 553 553 bios_dsk->drqp.skip_b = before * 512; 554 bios_dsk->drqp.skip_a = 2048 - nbsectors * 512 L % 2048 - bios_dsk->drqp.skip_b;554 bios_dsk->drqp.skip_a = 2048 - nbsectors * 512UL % 2048 - bios_dsk->drqp.skip_b; 555 555 556 556 if (device > BX_MAX_ATA_DEVICES) -
trunk/src/VBox/Devices/PC/BIOS-new/support.asm
r41607 r41653 73 73 ret 74 74 75 ;;76 ; 32-bit signed division.77 ;78 ; @param dx:ax Dividend.79 ; @param cx:bx Divisor.80 ; @returns dx:ax Quotient.81 ; cx:bx Reminder.82 ;83 __I4D:84 pushf85 push eax86 push edx87 push ecx88 89 rol eax, 1690 mov ax, dx91 ror eax, 1692 xor edx, edx93 94 shr ecx, 1695 mov cx, bx96 97 idiv ecx ; eax:edx / ecx -> eax=quotient, edx=reminder.98 99 mov bx, dx100 pop ecx101 shr edx, 16102 mov cx, dx103 104 pop edx105 ror eax, 16106 mov dx, ax107 add sp, 2108 pop ax109 rol eax, 16110 111 popf112 ret113 75 114 76 ;; … … 135 97 136 98 mul ecx ; eax * ecx -> edx:eax 137 138 pop ebx139 pop ecx140 141 pop edx142 ror eax, 16143 mov dx, ax144 add sp, 2145 pop ax146 rol eax, 16147 148 popf149 ret150 151 152 ;;153 ; 32-bit unsigned multiplication.154 ;155 ; @param dx:ax Factor 1.156 ; @param cx:bx Factor 2.157 ; @returns dx:ax Result.158 ;159 __I4M:160 pushf161 push eax162 push edx163 push ecx164 push ebx165 166 rol eax, 16167 mov ax, dx168 ror eax, 16169 xor edx, edx170 171 shr ecx, 16172 mov cx, bx173 174 imul ecx ; eax * ecx -> edx:eax175 99 176 100 pop ebx
Note:
See TracChangeset
for help on using the changeset viewer.