Changeset 88 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot/BootPrint.asm


Ignore:
Timestamp:
Jan 27, 2011, 8:14:13 AM (13 years ago)
Author:
aitotat
google:author:
aitotat
Message:

Changes to XTIDE Universal BIOS:

  • Now uses new libraries (untested)
  • Non-working since code size is too large
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Boot/BootPrint.asm

    r87 r88  
    1 ; Project name  :   IDE BIOS
     1; Project name  :   XTIDE Universal BIOS
    22; Description   :   Functions for printing boot related strings.
    33
     
    66
    77;--------------------------------------------------------------------
    8 ; Prints trying to boot string.
    9 ;
    108; BootPrint_TryToBootFromDL
    119;   Parameters:
     
    1513;       Nothing
    1614;   Corrupts registers:
    17 ;       AX, CX, SI, DI
     15;       AX, SI
    1816;--------------------------------------------------------------------
    1917ALIGN JUMP_ALIGN
    2018BootPrint_TryToBootFromDL:
    21     push    dx
    22     ePUSH_T ax, BootPrint_PopDxAndReturn    ; Return address
     19    push    bp
     20    mov     bp, sp
    2321
    24     xor     dh, dh              ; Translated drive number to DX
    25     push    dx                  ; Push translated drive number
     22    mov     ax, g_szHardDrv
     23    test    dl, 80h
     24    eCMOVZ  ax, g_szFloppyDrv
     25    push    ax                  ; "Hard Drive" or "Floppy Drive"
     26
    2627    call    DriveXlate_ToOrBack
    2728    push    dx                  ; Push untranslated drive number
    28 
    29     mov     ax, g_szFloppyDrv   ; Assume "Floppy Drive"
    30     test    dl, 80h             ; Hard Disk?
    31     jz      SHORT .PushHardOrFloppy
    32     add     ax, BYTE g_szHardDrv - g_szFloppyDrv
    33 .PushHardOrFloppy:
    34     push    ax
     29    call    DriveXlate_ToOrBack
     30    push    dx                  ; Push translated drive number
    3531
    3632    mov     si, g_szTryToBoot
    37     mov     dh, 6               ; 6 bytes pushed to stack
    38     jmp     PrintString_JumpToFormat
    39 
    40 ALIGN JUMP_ALIGN
    41 BootPrint_PopDxAndReturn:
    42     pop     dx
    43     ret
     33    jmp     BootMenuPrint_FormatCSSIfromParamsInSSBP
    4434
    4535
    4636;--------------------------------------------------------------------
    47 ; Prints message that valid boot sector has been found.
    48 ;
    4937; BootPrint_BootSectorLoaded
    5038;   Parameters:
     
    5341;       Nothing
    5442;   Corrupts registers:
    55 ;       AX, CX, SI
     43;       AX, SI
    5644;--------------------------------------------------------------------
    5745ALIGN JUMP_ALIGN
    5846BootPrint_BootSectorLoaded:
    59     push    dx
    60     ePUSH_T ax, BootPrint_PopDxAndReturn    ; Return address
    61 
     47    push    bp
     48    mov     bp, sp
     49    ePUSH_T ax, g_szBootSector
    6250    ePUSH_T ax, g_szFound
    63     jmp     SHORT BootPrint_MsgCodeShared
    64 
     51    jmp     SHORT PrintBootSectorResult
    6552
    6653;--------------------------------------------------------------------
    67 ; Prints message that first sector is not boot sector.
    68 ;
    6954; BootPrint_FirstSectorNotBootable
    7055;   Parameters:
     
    7358;       Nothing
    7459;   Corrupts registers:
    75 ;       AX, CX, DX, SI
     60;       AX, SI
    7661;--------------------------------------------------------------------
    7762ALIGN JUMP_ALIGN
    7863BootPrint_FirstSectorNotBootable:
     64    push    bp
     65    mov     bp, sp
     66    ePUSH_T ax, g_szBootSector
    7967    ePUSH_T ax, g_szNotFound
    80 BootPrint_MsgCodeShared:
    81     ePUSH_T ax, g_szBootSector
     68PrintBootSectorResult:
    8269    mov     si, g_szSectRead
    83     mov     dh, 4               ; 4 bytes pushed to stack
    84     jmp     PrintString_JumpToFormat
     70    jmp     BootMenuPrint_FormatCSSIfromParamsInSSBP
    8571
    8672
    8773;--------------------------------------------------------------------
    88 ; Prints error code for failed first sector read attempt.
    89 ;
    9074; BootPrint_FailedToLoadFirstSector
    9175;   Parameters:
     
    9478;       Nothing
    9579;   Corrupts registers:
    96 ;       AX, CX, DX, SI
     80;       AX, CX, SI
    9781;--------------------------------------------------------------------
    9882ALIGN JUMP_ALIGN
    9983BootPrint_FailedToLoadFirstSector:
     84    push    bp
     85    mov     bp, sp
    10086    eMOVZX  cx, ah              ; Error code to CX
    10187    push    cx                  ; Push INT 13h error code
    10288    mov     si, g_szReadError
    103     mov     dh, 2               ; 2 bytes pushed to stack
    104     jmp     PrintString_JumpToFormat
     89    jmp     BootMenuPrint_FormatCSSIfromParamsInSSBP
Note: See TracChangeset for help on using the changeset viewer.