Last change
on this file since 205 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
|
Line | |
---|
1 | ; Project name : XTIDE Universal BIOS
|
---|
2 | ; Description : Functions for printing boot related strings.
|
---|
3 |
|
---|
4 | ; Section containing code
|
---|
5 | SECTION .text
|
---|
6 |
|
---|
7 | ;--------------------------------------------------------------------
|
---|
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 | ;--------------------------------------------------------------------
|
---|
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:
|
---|
36 | ; AX, SI, DI
|
---|
37 | ;--------------------------------------------------------------------
|
---|
38 | ALIGN JUMP_ALIGN
|
---|
39 | BootPrint_TryToBootFromDL:
|
---|
40 | push bp
|
---|
41 | mov bp, sp
|
---|
42 |
|
---|
43 | mov ax, g_szHDD
|
---|
44 | test dl, dl
|
---|
45 | js SHORT .NotFDD
|
---|
46 | mov ax, g_szFDD
|
---|
47 | .NotFDD:
|
---|
48 | push ax
|
---|
49 |
|
---|
50 | call DriveXlate_ToOrBack
|
---|
51 | push dx ; Push untranslated drive number
|
---|
52 | call DriveXlate_ToOrBack
|
---|
53 | push dx ; Push translated drive number
|
---|
54 |
|
---|
55 | mov si, g_szTryToBoot
|
---|
56 | jmp short BootPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay
|
---|
57 |
|
---|
58 |
|
---|
59 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.