Changeset 386 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src
- Timestamp:
- Apr 12, 2012, 2:07:46 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
r376 r386 61 61 push ax ; the hard disks don't ever use it, but it does no harm) 62 62 63 jmp shortBootMenuPrint_RefreshInformation.FormatRelay63 jmp SHORT BootMenuPrint_RefreshInformation.FormatRelay 64 64 65 65 ;-------------------------------------------------------------------- … … 76 76 BootMenuPrint_TitleStrings: 77 77 mov si, ROMVARS.szTitle 78 call BootMenuPrint_NullTerminatedStringFromCSSIandSetCF78 call DetectPrint_NullTerminatedStringFromCSSIandSetCF 79 79 CALL_DISPLAY_LIBRARY PrintNewlineCharacters 80 80 mov si, ROMVARS.szVersion 81 ; Fall to BootMenuPrint_NullTerminatedStringFromCSSIandSetCF 82 83 ;-------------------------------------------------------------------- 84 ; BootMenuPrint_NullTerminatedStringFromCSSIandSetCF 85 ; Parameters: 86 ; CS:SI: Ptr to NULL terminated string to print 87 ; Returns: 88 ; CF: Set since menu event was handled successfully 89 ; Corrupts registers: 90 ; AX, DI 91 ;-------------------------------------------------------------------- 92 BootMenuPrint_NullTerminatedStringFromCSSIandSetCF: 93 ; 94 ; We send all CSSI strings through the Format routine for the case of 95 ; compressed strings, but this doesn't hurt in the non-compressed case either 96 ; (perhaps a little slower, but shouldn't be noticeable to the user) 97 ; and results in smaller code size. 98 ; 99 push bp 100 mov bp,sp 101 jmp short BootMenuPrint_RefreshInformation.FormatRelay 81 jmp DetectPrint_NullTerminatedStringFromCSSIandSetCF 102 82 103 83 … … 186 166 187 167 .FormatRelay: 188 jmp short BootMenuPrint_FormatCSSIfromParamsInSSBP168 jmp DetectPrint_FormatCSSIfromParamsInSSBP 189 169 190 170 … … 222 202 223 203 test di,di 224 jz short BootMenuPrint_FormatCSSIfromParamsInSSBP204 jz SHORT BootMenuPrint_RefreshInformation.FormatRelay 225 205 226 206 %include "BootMenuPrintCfg.asm" ; inline of code to fill out remainder of information string 227 228 ;;; fall-through to BootMenuPrint_FormatCSSIfromParamsInSSBP 229 230 231 ;-------------------------------------------------------------------- 232 ; BootMenuPrint_FormatCSSIfromParamsInSSBP 233 ; Parameters: 234 ; CS:SI: Ptr to string to format 235 ; BP: SP before pushing parameters 236 ; Returns: 237 ; BP: Popped from stack 238 ; CF: Set since menu event was handled successfully 239 ; Corrupts registers: 240 ; AX, DI 241 ;-------------------------------------------------------------------- 242 BootMenuPrint_FormatCSSIfromParamsInSSBP: 243 CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI 244 stc ; Successful return from menu event 245 pop bp 246 ret 207 jmp DetectPrint_FormatCSSIfromParamsInSSBP 247 208 248 209 … … 371 332 push cx ; Key attribute for last space 372 333 mov si, g_szHotkey 373 374 BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay: 375 jmp SHORT BootMenuPrint_FormatCSSIfromParamsInSSBP 376 377 378 ;-------------------------------------------------------------------- 379 ; BootMenuPrint_InitializeDisplayContext 380 ; Parameters: 381 ; Nothing 382 ; Returns: 383 ; Nothing 384 ; Corrupts registers: 385 ; AX, DI 386 ;-------------------------------------------------------------------- 387 BootMenuPrint_InitializeDisplayContext: 388 CALL_DISPLAY_LIBRARY InitializeDisplayContext 389 ret 334 jmp DetectPrint_FormatCSSIfromParamsInSSBP 390 335 391 336 -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootSector.asm
r376 r386 34 34 ;-------------------------------------------------------------------- 35 35 BootSector_TryToLoadFromDriveDL: 36 call BootPrint_TryToBootFromDL36 call DetectPrint_TryToBootFromDL 37 37 call LoadFirstSectorFromDriveDL 38 38 jc SHORT .FailedToLoadFirstSector … … 46 46 ret 47 47 .FailedToLoadFirstSector: 48 call BootPrint_FailedToLoadFirstSector48 call DetectPrint_FailedToLoadFirstSector 49 49 clc 50 50 ret 51 51 .FirstHardDiskSectorNotBootable: 52 52 mov si, g_szBootSectorNotFound 53 call BootMenuPrint_NullTerminatedStringFromCSSIandSetCF53 call DetectPrint_NullTerminatedStringFromCSSIandSetCF 54 54 clc 55 55 ret -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
r376 r386 43 43 ; Never returns (loads operating system) 44 44 ;-------------------------------------------------------------------- 45 ALIGN JUMP_ALIGN46 45 Int19h_BootLoaderHandler: 47 46 sti … … 92 91 .SelectDriveToBootFrom: 93 92 call RamVars_GetSegmentToDS 93 %ifdef MODULE_BOOT_MENU 94 94 cmp WORD [cs:ROMVARS.wfDisplayBootMenu], BYTE 0 95 95 jne SHORT ProcessBootMenuSelectionsUntilBootableDriveSelected ; Display boot menu 96 %endif 96 97 ; Fall to BootFromDriveAthenTryDriveC 97 98 … … 112 113 113 114 115 %ifdef MODULE_BOOT_MENU 114 116 ;-------------------------------------------------------------------- 115 117 ; ProcessBootMenuSelectionsUntilBootableDriveSelected … … 126 128 ; Fall to Int19hMenu_JumpToBootSector_or_RomBoot 127 129 ; (CF is set or we wouldn't be here, see "jnc" immediately above) 130 %endif 128 131 129 132 ;-------------------------------------------------------------------- … … 143 146 ; Never returns 144 147 ;-------------------------------------------------------------------- 145 ALIGN JUMP_ALIGN146 148 Int19hMenu_JumpToBootSector_or_RomBoot: 147 149 mov cx, es ; Preserve MBR segment (can't push because of stack change) -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r376 r386 199 199 DetectDrives_DriveNotFound: 200 200 mov si, g_szNotFound 201 jmp BootMenuPrint_NullTerminatedStringFromCSSIandSetCF201 jmp DetectPrint_NullTerminatedStringFromCSSIandSetCF 202 202 203 203 … … 219 219 jc SHORT DetectDrives_DriveNotFound 220 220 call BootMenuInfo_CreateForHardDisk 221 jmp shortDetectPrint_DriveNameFromBootnfoInESBX221 jmp SHORT DetectPrint_DriveNameFromBootnfoInESBX -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
r376 r386 22 22 23 23 ;-------------------------------------------------------------------- 24 ; BootMenuPrint_InitializeDisplayContext 25 ; Parameters: 26 ; Nothing 27 ; Returns: 28 ; Nothing 29 ; Corrupts registers: 30 ; AX, DI 31 ;-------------------------------------------------------------------- 32 BootMenuPrint_InitializeDisplayContext: 33 CALL_DISPLAY_LIBRARY InitializeDisplayContext 34 ret 35 36 37 ;-------------------------------------------------------------------- 24 38 ; Prints BIOS name and segment address where it is found. 25 39 ; … … 39 53 push cs ; BIOS segment 40 54 41 DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay: 42 jmp BootMenuPrint_FormatCSSIfromParamsInSSBP 55 jmp DetectPrint_FormatCSSIfromParamsInSSBP 43 56 44 57 … … 122 135 mov si, g_szDetectOuter ; Load SI with default wrapper string "IDE %s at %s: " 123 136 124 jmp short DetectPrint_BootMenuPrint_FormatCSSIfromParamsInSSBP_Relay137 jmp SHORT DetectPrint_FormatCSSIfromParamsInSSBP 125 138 126 139 … … 146 159 pop di 147 160 ret 161 162 ;-------------------------------------------------------------------- 163 ; DetectPrint_FailedToLoadFirstSector 164 ; Parameters: 165 ; AH: INT 13h error code 166 ; Returns: 167 ; Nothing 168 ; Corrupts registers: 169 ; AX, CX, SI, DI 170 ;-------------------------------------------------------------------- 171 DetectPrint_FailedToLoadFirstSector: 172 push bp 173 mov bp, sp 174 eMOVZX cx, ah 175 push cx ; Push INT 13h error code 176 mov si, g_szReadError 177 jmp SHORT DetectPrint_FormatCSSIfromParamsInSSBP 178 179 180 ;-------------------------------------------------------------------- 181 ; DetectPrint_TryToBootFromDL 182 ; Parameters: 183 ; DL: Drive to boot from (translated, 00h or 80h) 184 ; DS: RAMVARS segment 185 ; Returns: 186 ; Nothing 187 ; Corrupts registers: 188 ; AX, SI, DI 189 ;-------------------------------------------------------------------- 190 DetectPrint_TryToBootFromDL: 191 push bp 192 mov bp, sp 193 194 mov ax, g_szHDD 195 test dl, dl 196 js SHORT .NotFDD 197 mov ax, g_szFDD 198 .NotFDD: 199 push ax 200 201 call DriveXlate_ToOrBack 202 push dx ; Push untranslated drive number 203 call DriveXlate_ToOrBack 204 push dx ; Push translated drive number 205 206 mov si, g_szTryToBoot 207 jmp SHORT DetectPrint_FormatCSSIfromParamsInSSBP 208 209 210 ;-------------------------------------------------------------------- 211 ; DetectPrint_NullTerminatedStringFromCSSIandSetCF 212 ; Parameters: 213 ; CS:SI: Ptr to NULL terminated string to print 214 ; Returns: 215 ; CF: Set since menu event was handled successfully 216 ; Corrupts registers: 217 ; AX, DI 218 ;-------------------------------------------------------------------- 219 DetectPrint_NullTerminatedStringFromCSSIandSetCF: 220 ; 221 ; We send all CSSI strings through the Format routine for the case of 222 ; compressed strings, but this doesn't hurt in the non-compressed case either 223 ; (perhaps a little slower, but shouldn't be noticeable to the user) 224 ; and results in smaller code size. 225 ; 226 push bp 227 mov bp,sp 228 ; Fall to BootMenuPrint_FormatCSSIfromParamsInSSBP 229 230 ;-------------------------------------------------------------------- 231 ; DetectPrint_FormatCSSIfromParamsInSSBP 232 ; Parameters: 233 ; CS:SI: Ptr to string to format 234 ; BP: SP before pushing parameters 235 ; Returns: 236 ; BP: Popped from stack 237 ; CF: Set since menu event was handled successfully 238 ; Corrupts registers: 239 ; AX, DI 240 ;-------------------------------------------------------------------- 241 DetectPrint_FormatCSSIfromParamsInSSBP: 242 CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI 243 stc ; Successful return from menu event 244 pop bp 245 ret -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r380 r386 130 130 at ROMVARS.ideVars1+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags, db DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE 131 131 132 at ROMVARS.ideVars2+IDEVARS.wPort, dw DEVICE_XTIDE_DEFAULT_PORT ; Controller Command Block base port133 at ROMVARS.ideVars2+IDEVARS.wPortCtrl, dw DEVICE_XTIDE_DEFAULT_PORTCTRL ; Controller Control Block base port134 at ROMVARS.ideVars2+IDEVARS.bDevice, db DEVICE_ XTIDE_REV1132 at ROMVARS.ideVars2+IDEVARS.wPort, dw 1E8h 133 at ROMVARS.ideVars2+IDEVARS.wPortCtrl, dw 3E8h 134 at ROMVARS.ideVars2+IDEVARS.bDevice, db DEVICE_16BIT_ATA 135 135 at ROMVARS.ideVars2+IDEVARS.bIRQ, db 0 136 136 at ROMVARS.ideVars2+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags, db DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE 137 137 at ROMVARS.ideVars2+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags, db DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE 138 138 139 at ROMVARS.ideVars3+IDEVARS.wPort, dw 168h ; Controller Command Block base port140 at ROMVARS.ideVars3+IDEVARS.wPortCtrl, dw 368h ; Controller Control Block base port139 at ROMVARS.ideVars3+IDEVARS.wPort, dw 168h 140 at ROMVARS.ideVars3+IDEVARS.wPortCtrl, dw 368h 141 141 at ROMVARS.ideVars3+IDEVARS.bDevice, db DEVICE_16BIT_ATA 142 142 at ROMVARS.ideVars3+IDEVARS.bIRQ, db 0 … … 231 231 232 232 ; Boot loader 233 %include "BootPrint.asm" ; For printing boot information234 233 %include "Int19h.asm" ; For Int 19h, Boot Loader 235 234 %include "FloppyDrive.asm" ; Floppy Drive related functions
Note:
See TracChangeset
for help on using the changeset viewer.