Changeset 88 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot/BootPrint.asm
- Timestamp:
- Jan 27, 2011, 8:14:13 AM (13 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootPrint.asm
r87 r88 1 ; Project name : IDEBIOS1 ; Project name : XTIDE Universal BIOS 2 2 ; Description : Functions for printing boot related strings. 3 3 … … 6 6 7 7 ;-------------------------------------------------------------------- 8 ; Prints trying to boot string.9 ;10 8 ; BootPrint_TryToBootFromDL 11 9 ; Parameters: … … 15 13 ; Nothing 16 14 ; Corrupts registers: 17 ; AX, CX, SI, DI15 ; AX, SI 18 16 ;-------------------------------------------------------------------- 19 17 ALIGN JUMP_ALIGN 20 18 BootPrint_TryToBootFromDL: 21 push dx22 ePUSH_T ax, BootPrint_PopDxAndReturn ; Return address19 push bp 20 mov bp, sp 23 21 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 26 27 call DriveXlate_ToOrBack 27 28 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 35 31 36 32 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 44 34 45 35 46 36 ;-------------------------------------------------------------------- 47 ; Prints message that valid boot sector has been found.48 ;49 37 ; BootPrint_BootSectorLoaded 50 38 ; Parameters: … … 53 41 ; Nothing 54 42 ; Corrupts registers: 55 ; AX, CX,SI43 ; AX, SI 56 44 ;-------------------------------------------------------------------- 57 45 ALIGN JUMP_ALIGN 58 46 BootPrint_BootSectorLoaded: 59 push dx60 ePUSH_T ax, BootPrint_PopDxAndReturn ; Return address61 47 push bp 48 mov bp, sp 49 ePUSH_T ax, g_szBootSector 62 50 ePUSH_T ax, g_szFound 63 jmp SHORT BootPrint_MsgCodeShared 64 51 jmp SHORT PrintBootSectorResult 65 52 66 53 ;-------------------------------------------------------------------- 67 ; Prints message that first sector is not boot sector.68 ;69 54 ; BootPrint_FirstSectorNotBootable 70 55 ; Parameters: … … 73 58 ; Nothing 74 59 ; Corrupts registers: 75 ; AX, CX, DX,SI60 ; AX, SI 76 61 ;-------------------------------------------------------------------- 77 62 ALIGN JUMP_ALIGN 78 63 BootPrint_FirstSectorNotBootable: 64 push bp 65 mov bp, sp 66 ePUSH_T ax, g_szBootSector 79 67 ePUSH_T ax, g_szNotFound 80 BootPrint_MsgCodeShared: 81 ePUSH_T ax, g_szBootSector 68 PrintBootSectorResult: 82 69 mov si, g_szSectRead 83 mov dh, 4 ; 4 bytes pushed to stack 84 jmp PrintString_JumpToFormat 70 jmp BootMenuPrint_FormatCSSIfromParamsInSSBP 85 71 86 72 87 73 ;-------------------------------------------------------------------- 88 ; Prints error code for failed first sector read attempt.89 ;90 74 ; BootPrint_FailedToLoadFirstSector 91 75 ; Parameters: … … 94 78 ; Nothing 95 79 ; Corrupts registers: 96 ; AX, CX, DX,SI80 ; AX, CX, SI 97 81 ;-------------------------------------------------------------------- 98 82 ALIGN JUMP_ALIGN 99 83 BootPrint_FailedToLoadFirstSector: 84 push bp 85 mov bp, sp 100 86 eMOVZX cx, ah ; Error code to CX 101 87 push cx ; Push INT 13h error code 102 88 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.