Changeset 96 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Boot
- Timestamp:
- Jan 28, 2011, 4:29:42 PM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Boot
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
r92 r96 19 19 BootMenuPrint_TitleStrings: 20 20 mov si, ROMVARS.szTitle 21 call PrintNullTerminatedStringFromCSSIandSetCF22 call BootMenuPrint_Newline21 call BootMenuPrint_NullTerminatedStringFromCSSIandSetCF 22 CALL_DISPLAY_LIBRARY PrintNewlineCharacters 23 23 mov si, ROMVARS.szVersion 24 jmp PrintNullTerminatedStringFromCSSIandSetCF25 26 27 ;-------------------------------------------------------------------- 28 ; BootMenuPrint_ Newline24 jmp BootMenuPrint_NullTerminatedStringFromCSSIandSetCF 25 26 27 ;-------------------------------------------------------------------- 28 ; BootMenuPrint_ClearScreen 29 29 ; Parameters: 30 30 ; Nothing … … 35 35 ;-------------------------------------------------------------------- 36 36 ALIGN JUMP_ALIGN 37 BootMenuPrint_Newline:38 CALL_DISPLAY_LIBRARY PrintNewlineCharacters39 ret40 41 42 ;--------------------------------------------------------------------43 ; BootMenuPrint_ClearScreen44 ; Parameters:45 ; Nothing46 ; Returns:47 ; Nothing48 ; Corrupts registers:49 ; AX50 ;--------------------------------------------------------------------51 ALIGN JUMP_ALIGN52 37 BootMenuPrint_ClearScreen: 53 push di54 38 mov ax, ' ' | (MONO_NORMAL<<8) 55 39 CALL_DISPLAY_LIBRARY ClearScreenWithCharInALandAttrInAH 56 pop di57 ret58 59 60 ;--------------------------------------------------------------------61 ; Translates and prints drive number.62 ;63 ; BootMenuPrint_TranslatedDriveNumber64 ; Parameters:65 ; DL: Untranslated drive number66 ; DS: RAMVARS segment67 ; Returns:68 ; Nothing69 ; Corrupts registers:70 ; AX, DI71 ;--------------------------------------------------------------------72 ALIGN JUMP_ALIGN73 BootMenuPrint_TranslatedDriveNumber:74 push dx75 push bx76 77 call DriveXlate_ToOrBack78 eMOVZX ax, dl ; Drive number to AL79 CALL_DISPLAY_LIBRARY PrintWordFromAXwithBaseInBX80 mov al, ' ' ; Print space81 CALL_DISPLAY_LIBRARY PrintCharacterFromAL82 83 pop bx84 pop dx85 40 ret 86 41 … … 155 110 .HardDiskMenuitemForForeignDrive: 156 111 mov si, g_szforeignHD 157 jmp PrintNullTerminatedStringFromCSSIandSetCF112 jmp BootMenuPrint_NullTerminatedStringFromCSSIandSetCF 158 113 159 114 … … 365 320 366 321 ;-------------------------------------------------------------------- 367 ; PrintNullTerminatedStringFromCSSIandSetCF322 ; BootMenuPrint_NullTerminatedStringFromCSSIandSetCF 368 323 ; Parameters: 369 324 ; CS:SI: Ptr to NULL terminated string to print … … 374 329 ;-------------------------------------------------------------------- 375 330 ALIGN JUMP_ALIGN 376 PrintNullTerminatedStringFromCSSIandSetCF:331 BootMenuPrint_NullTerminatedStringFromCSSIandSetCF: 377 332 CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI 378 333 stc -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm
r88 r96 20 20 ALIGN JUMP_ALIGN 21 21 BootMenuPrintCfg_ForOurDrive: 22 call BootMenuPrintCfg_HeaderAndChangeLine 22 mov si, g_szCfgHeader 23 call BootMenuPrint_NullTerminatedStringFromCSSIandSetCF 23 24 call BootMenuPrintCfg_GetPointers 24 call BootMenuPrintCfg_PushAndFormatCfgString 25 jmp BootMenuPrint_Newline 25 ; Fall to PushAndFormatCfgString 26 26 27 27 28 28 ;-------------------------------------------------------------------- 29 ; Prints configuration header and changes for printing values. 30 ; 31 ; BootMenuPrintCfg_HeaderAndChangeLine 32 ; Parameters: 33 ; Nothing 34 ; Returns: 35 ; Nothing 36 ; Corrupts registers: 37 ; AX, SI, DI 38 ;-------------------------------------------------------------------- 39 ALIGN JUMP_ALIGN 40 BootMenuPrintCfg_HeaderAndChangeLine: 41 mov si, g_szCfgHeader 42 call PrintNullTerminatedStringFromCSSIandSetCF 43 jmp BootMenuPrint_Newline 44 45 46 ;-------------------------------------------------------------------- 47 ; Return all necessary pointers to drive information structs. 48 ; 49 ; BootMenuPrintCfg_GetPointers 50 ; Parameters: 51 ; DS:DI: Ptr to DPT 52 ; Returns: 53 ; DS:DI: Ptr to DPT 54 ; ES:BX: Ptr to BOOTNFO 55 ; CS:SI: Ptr to IDEVARS 56 ; Corrupts registers: 57 ; AX, DL 58 ;-------------------------------------------------------------------- 59 ALIGN JUMP_ALIGN 60 BootMenuPrintCfg_GetPointers: 61 mov dl, [di+DPT.bDrvNum] ; Load Drive number to DL 62 call BootInfo_GetOffsetToBX ; ES:BX now points... 63 LOAD_BDA_SEGMENT_TO es, ax ; ...to BOOTNFO 64 mov al, [di+DPT.bIdeOff] 65 xchg si, ax ; CS:SI now points to IDEVARS 66 ret 67 68 69 ;-------------------------------------------------------------------- 70 ; Pushes all string formatting parameters and prints 71 ; formatted configuration string. 72 ; 73 ; BootMenuPrintCfg_PushAndFormatCfgString 29 ; PushAndFormatCfgString 74 30 ; Parameters: 75 31 ; DS:DI: Ptr to DPT … … 82 38 ;-------------------------------------------------------------------- 83 39 ALIGN JUMP_ALIGN 84 BootMenuPrintCfg_PushAndFormatCfgString:40 PushAndFormatCfgString: 85 41 push bp 86 87 42 mov bp, sp 88 43 ; Fall to first push below … … 97 52 ; Nothing (jumps to next push below) 98 53 ; Corrupts registers: 99 ; AX , DX54 ; AX 100 55 ;-------------------------------------------------------------------- 101 56 PushAddressingMode: 102 mov dx, bx ; Backup BX to DX57 xchg ax, bx 103 58 mov bx, MASK_DPT_ADDR ; Load addressing mode mask 104 59 and bl, [di+DPT.bFlags] ; Addressing mode now in BX 105 60 push WORD [cs:bx+.rgszAddressingModeString] 106 mov bx, dx61 xchg bx, ax 107 62 jmp SHORT .NextPush 108 63 ALIGN WORD_ALIGN … … 208 163 209 164 ;-------------------------------------------------------------------- 210 ; Prints formatted configuration string from parameters pushed to stack. 211 ; 212 ; BootMenuPrintCfg_ValuesFromStack 165 ; PrintValuesFromStack 213 166 ; Parameters: 214 167 ; Stack: All formatting parameters … … 218 171 ; AX, SI, DI 219 172 ;-------------------------------------------------------------------- 220 BootMenuPrintCfg_ValuesFromStack:173 PrintValuesFromStack: 221 174 mov si, g_szCfgFormat 222 jmp PrintNullTerminatedStringFromCSSIandSetCF 175 jmp BootMenuPrint_NullTerminatedStringFromCSSIandSetCF 176 177 178 ;-------------------------------------------------------------------- 179 ; BootMenuPrintCfg_GetPointers 180 ; Parameters: 181 ; DS:DI: Ptr to DPT 182 ; Returns: 183 ; DS:DI: Ptr to DPT 184 ; ES:BX: Ptr to BOOTNFO 185 ; CS:SI: Ptr to IDEVARS 186 ; Corrupts registers: 187 ; AX, DL 188 ;-------------------------------------------------------------------- 189 ALIGN JUMP_ALIGN 190 BootMenuPrintCfg_GetPointers: 191 mov dl, [di+DPT.bDrvNum] ; Load Drive number to DL 192 call BootInfo_GetOffsetToBX ; ES:BX now points... 193 LOAD_BDA_SEGMENT_TO es, ax ; ...to BOOTNFO 194 mov al, [di+DPT.bIdeOff] 195 xchg si, ax ; CS:SI now points to IDEVARS 196 ret -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootVars.asm
r90 r96 62 62 cli ; Disable interrupts 63 63 LOAD_BDA_SEGMENT_TO ss, sp 64 ; eLSS sp, ss:BOOTVARS.dwPostStack ; Expanded macro to remove65 ; unneeded CLI instruction66 64 %ifndef USE_386 67 65 mov sp, [ss:BOOTVARS.dwPostStack]
Note:
See TracChangeset
for help on using the changeset viewer.