source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Src/Boot/BootPrint.asm @ 95

Last change on this file since 95 was 95, checked in by aitotat, 13 years ago

Changes to XTIDE Universal BIOS:

  • Smaller boot sector loading string.
  • Cleaned boot code a bit.
File size: 1.8 KB
Line 
1; Project name  :   XTIDE Universal BIOS
2; Description   :   Functions for printing boot related strings.
3
4; Section containing code
5SECTION .text
6
7;--------------------------------------------------------------------
8; BootPrint_TryToBootFromDL
9;   Parameters:
10;       DL:     Drive to boot from (translated, 00h or 80h)
11;       DS:     RAMVARS segment
12;   Returns:
13;       Nothing
14;   Corrupts registers:
15;       AX, SI
16;--------------------------------------------------------------------
17ALIGN JUMP_ALIGN
18BootPrint_TryToBootFromDL:
19    push    bp
20    mov     bp, sp
21
22    mov     ax, g_szHDD
23    test    dl, 80h
24    eCMOVZ  ax, g_szFDD
25    push    ax
26
27    call    DriveXlate_ToOrBack
28    push    dx                  ; Push untranslated drive number
29    call    DriveXlate_ToOrBack
30    push    dx                  ; Push translated drive number
31
32    mov     si, g_szTryToBoot
33    jmp     BootMenuPrint_FormatCSSIfromParamsInSSBP
34
35
36;--------------------------------------------------------------------
37; BootPrint_BootSectorResultStringFromBX
38;   Parameters:
39;       CS:BX:  Ptr to "found" or "not found"
40;   Returns:
41;       Nothing
42;   Corrupts registers:
43;       AX, SI
44;--------------------------------------------------------------------
45ALIGN JUMP_ALIGN
46BootPrint_BootSectorResultStringFromBX:
47    push    bp
48    mov     bp, sp
49    ePUSH_T ax, g_szBootSector
50    push    bx          ; "found" or "not found"
51    mov     si, g_szSectRead
52    jmp     BootMenuPrint_FormatCSSIfromParamsInSSBP
53
54
55;--------------------------------------------------------------------
56; BootPrint_FailedToLoadFirstSector
57;   Parameters:
58;       AH:     INT 13h error code
59;   Returns:
60;       Nothing
61;   Corrupts registers:
62;       AX, BX, SI
63;--------------------------------------------------------------------
64ALIGN JUMP_ALIGN
65BootPrint_FailedToLoadFirstSector:
66    push    bp
67    mov     bp, sp
68    eMOVZX  bx, ah
69    push    bx                  ; Push INT 13h error code
70    mov     si, g_szReadError
71    jmp     BootMenuPrint_FormatCSSIfromParamsInSSBP
Note: See TracBrowser for help on using the repository browser.