Last change
on this file since 194 was 192, checked in by gregli@…, 13 years ago |
Optimized away some long jumps, by rearranging routines within files, and file order within main.asm. Also added some 'relay' entry points for popular destinations, so that a short jump can go to an existing short jump and then on to the final destination, instead of using a long jump - clearly space over speed optimization. All 'relay's are limited to the UI code, and will not have an impact on IDE operational performance.
|
File size:
1.4 KB
|
Rev | Line | |
---|
[88] | 1 | ; Project name : XTIDE Universal BIOS
|
---|
[3] | 2 | ; Description : Functions for printing boot related strings.
|
---|
| 3 |
|
---|
| 4 | ; Section containing code
|
---|
| 5 | SECTION .text
|
---|
| 6 |
|
---|
| 7 | ;--------------------------------------------------------------------
|
---|
[192] | 8 | ; BootPrint_FailedToLoadFirstSector
|
---|
| 9 | ; Parameters:
|
---|
| 10 | ; AH: INT 13h error code
|
---|
| 11 | ; Returns:
|
---|
| 12 | ; Nothing
|
---|
| 13 | ; Corrupts registers:
|
---|
| 14 | ; AX, CX, SI, DI
|
---|
| 15 | ;--------------------------------------------------------------------
|
---|
| 16 | ALIGN JUMP_ALIGN
|
---|
| 17 | BootPrint_FailedToLoadFirstSector:
|
---|
| 18 | push bp
|
---|
| 19 | mov bp, sp
|
---|
| 20 | eMOVZX cx, ah
|
---|
| 21 | push cx ; Push INT 13h error code
|
---|
| 22 | mov si, g_szReadError
|
---|
| 23 |
|
---|
| 24 | BootPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay:
|
---|
| 25 | jmp short BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay
|
---|
| 26 |
|
---|
| 27 |
|
---|
| 28 | ;--------------------------------------------------------------------
|
---|
[3] | 29 | ; BootPrint_TryToBootFromDL
|
---|
| 30 | ; Parameters:
|
---|
| 31 | ; DL: Drive to boot from (translated, 00h or 80h)
|
---|
| 32 | ; DS: RAMVARS segment
|
---|
| 33 | ; Returns:
|
---|
| 34 | ; Nothing
|
---|
| 35 | ; Corrupts registers:
|
---|
[120] | 36 | ; AX, SI, DI
|
---|
[3] | 37 | ;--------------------------------------------------------------------
|
---|
| 38 | ALIGN JUMP_ALIGN
|
---|
| 39 | BootPrint_TryToBootFromDL:
|
---|
[88] | 40 | push bp
|
---|
| 41 | mov bp, sp
|
---|
[3] | 42 |
|
---|
[95] | 43 | mov ax, g_szHDD
|
---|
[128] | 44 | test dl, dl
|
---|
| 45 | js SHORT .NotFDD
|
---|
| 46 | mov ax, g_szFDD
|
---|
| 47 | .NotFDD:
|
---|
[95] | 48 | push ax
|
---|
[88] | 49 |
|
---|
[3] | 50 | call DriveXlate_ToOrBack
|
---|
| 51 | push dx ; Push untranslated drive number
|
---|
[88] | 52 | call DriveXlate_ToOrBack
|
---|
| 53 | push dx ; Push translated drive number
|
---|
[3] | 54 |
|
---|
| 55 | mov si, g_szTryToBoot
|
---|
[192] | 56 | jmp short BootPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay
|
---|
[3] | 57 |
|
---|
| 58 |
|
---|
[192] | 59 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.