Changeset 130 in xtideuniversalbios
- Timestamp:
- Mar 4, 2011, 5:54:41 PM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/XTIDE_Universal_BIOS/Src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm
r128 r130 24 24 cmp cx, BYTE NO_ITEM_SELECTED 25 25 je SHORT BootMenu_DisplayAndReturnSelection ; Clear screen and display menu 26 ; Fall t hrough to BootMenu_ConvertMenuitemFromCXtoDriveInDX26 ; Fall to BootMenu_GetDriveToDXforMenuitemInCX 27 27 28 28 ;-------------------------------------------------------------------- 29 ; BootMenu_ ConvertMenuitemFromCXtoDriveInDX29 ; BootMenu_GetDriveToDXforMenuitemInCX 30 30 ; Parameters: 31 31 ; CX: Index of menuitem selected from Boot Menu … … 37 37 ;-------------------------------------------------------------------- 38 38 ALIGN JUMP_ALIGN 39 BootMenu_ ConvertMenuitemFromCXtoDriveInDX:39 BootMenu_GetDriveToDXforMenuitemInCX: 40 40 mov dx, cx ; Copy menuitem index to DX 41 41 call FloppyDrive_GetCountToCX … … 107 107 108 108 ;-------------------------------------------------------------------- 109 ; BootMenu_ ConvertAsciiHotkeyFromALtoMenuitemInCX109 ; BootMenu_GetMenuitemToAXforAsciiHotkeyInAL 110 110 ; Parameters: 111 ; AL: ASCII hotkey starting from upper case 'A'111 ; AL: ASCII hotkey 112 112 ; Returns: 113 ; CX: Menuitem index113 ; AX: Menuitem index 114 114 ; Corrupts registers: 115 ; AX115 ; CX 116 116 ;-------------------------------------------------------------------- 117 117 ALIGN JUMP_ALIGN 118 BootMenu_ConvertAsciiHotkeyFromALtoMenuitemInCX: 118 BootMenu_GetMenuitemToAXforAsciiHotkeyInAL: 119 call Char_ALtoUpperCaseLetter 119 120 call BootMenu_GetLetterForFirstHardDiskToCL 121 xor ah, ah 120 122 cmp al, cl ; Letter is for Hard Disk? 121 123 jae SHORT .StartFromHardDiskLetter 122 124 sub al, 'A' ; Letter to Floppy Drive menuitem 123 xchg ax, cx ; Menuitem index to CX124 125 ret 125 126 ALIGN JUMP_ALIGN … … 127 128 sub al, cl ; Hard Disk index 128 129 call FloppyDrive_GetCountToCX 129 add cx, ax ; Menuitem index130 add ax, cx ; Menuitem index 130 131 ret 131 132 … … 188 189 BootMenu_IsDriveInSystem: 189 190 test dl, dl ; Floppy drive? 190 jns SHORT .IsFloppyDriveI sInSystem191 jns SHORT .IsFloppyDriveInSystem 191 192 call RamVars_GetHardDiskCountFromBDAtoCX ; Hard Disk count to CX 192 193 or cl, 80h ; Set Hard Disk bit to CX 193 194 jmp SHORT .CompareDriveNumberToDriveCount 194 .IsFloppyDriveI sInSystem:195 .IsFloppyDriveInSystem: 195 196 call FloppyDrive_GetCountToCX 196 197 .CompareDriveNumberToDriveCount: -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm
r128 r130 86 86 call RamVars_GetSegmentToDS 87 87 call DriveXlate_Reset 88 call BootMenu_ ConvertMenuitemFromCXtoDriveInDX88 call BootMenu_GetDriveToDXforMenuitemInCX 89 89 call DriveXlate_SetDriveToSwap 90 90 pop ax ; Update previous item … … 107 107 ALIGN JUMP_ALIGN 108 108 .CheckDriveHotkeys: 109 call BootMenu_ ConvertAsciiHotkeyFromALtoMenuitemInCX110 cmp cx, [bp+MENUINIT.wItems]109 call BootMenu_GetMenuitemToAXforAsciiHotkeyInAL 110 cmp ax, [bp+MENUINIT.wItems] 111 111 jae SHORT .EventCompleted ; Invalid key 112 xchg ax, cx113 112 CALL_MENU_LIBRARY HighlightItemFromAX 114 113 ; Fall to .ItemSelectedFromCX … … 150 149 ; CF: set since event processed 151 150 ;-------------------------------------------------------------------- 152 ALIGN JUMP_ALIGN153 151 .RefreshItemOrInformationWithJumpTableInCSBX: 154 152 cmp cl, NO_ITEM_HIGHLIGHTED … … 156 154 157 155 call RamVars_GetSegmentToDS 158 call BootMenu_ ConvertMenuitemFromCXtoDriveInDX156 call BootMenu_GetDriveToDXforMenuitemInCX 159 157 test dl, dl ; Floppy drive? 160 158 jns SHORT .DrawFloppyDrive -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
r128 r130 4 4 ; Section containing code 5 5 SECTION .text 6 7 ;-------------------------------------------------------------------- 8 ; BootMenuPrint_ClearScreen 9 ; Parameters: 10 ; Nothing 11 ; Returns: 12 ; Nothing 13 ; Corrupts registers: 14 ; AX, DI 15 ;-------------------------------------------------------------------- 16 ALIGN JUMP_ALIGN 17 BootMenuPrint_ClearScreen: 18 call BootMenuPrint_InitializeDisplayContext 19 xor ax, ax 20 CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX 21 mov ax, ' ' | (MONO_NORMAL<<8) 22 CALL_DISPLAY_LIBRARY ClearScreenWithCharInALandAttrInAH 23 ret 24 25 26 ;-------------------------------------------------------------------- 27 ; BootMenuPrint_InitializeDisplayContext 28 ; Parameters: 29 ; Nothing 30 ; Returns: 31 ; Nothing 32 ; Corrupts registers: 33 ; AX, DI 34 ;-------------------------------------------------------------------- 35 ALIGN JUMP_ALIGN 36 BootMenuPrint_InitializeDisplayContext: 37 CALL_DISPLAY_LIBRARY InitializeDisplayContext 38 ret 39 6 40 7 41 ;-------------------------------------------------------------------- … … 40 74 pop di 41 75 stc 42 ret43 44 45 ;--------------------------------------------------------------------46 ; BootMenuPrint_ClearScreen47 ; Parameters:48 ; Nothing49 ; Returns:50 ; Nothing51 ; Corrupts registers:52 ; AX, DI53 ;--------------------------------------------------------------------54 ALIGN JUMP_ALIGN55 BootMenuPrint_ClearScreen:56 mov ax, ' ' | (MONO_NORMAL<<8)57 CALL_DISPLAY_LIBRARY ClearScreenWithCharInALandAttrInAH58 76 ret 59 77 -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootPrint.asm
r128 r130 37 37 38 38 ;-------------------------------------------------------------------- 39 ; BootPrint_BootSectorResultStringFrom BX39 ; BootPrint_BootSectorResultStringFromAX 40 40 ; Parameters: 41 ; CS: BX: Ptr to "found" or "not found"41 ; CS:AX: Ptr to "found" or "not found" 42 42 ; Returns: 43 43 ; Nothing 44 44 ; Corrupts registers: 45 ; AX, SI, DI45 ; AX, CX, SI, DI 46 46 ;-------------------------------------------------------------------- 47 47 ALIGN JUMP_ALIGN 48 BootPrint_BootSectorResultStringFrom BX:48 BootPrint_BootSectorResultStringFromAX: 49 49 push bp 50 50 mov bp, sp 51 ePUSH_T ax, g_szBootSector52 push bx ; "found" or "not found"51 ePUSH_T cx, g_szBootSector 52 push ax ; "found" or "not found" 53 53 mov si, g_szSectRead 54 54 jmp BootMenuPrint_FormatCSSIfromParamsInSSBP … … 62 62 ; Nothing 63 63 ; Corrupts registers: 64 ; AX, BX, SI, DI64 ; AX, CX, SI, DI 65 65 ;-------------------------------------------------------------------- 66 66 ALIGN JUMP_ALIGN … … 68 68 push bp 69 69 mov bp, sp 70 eMOVZX bx, ah71 push bx ; Push INT 13h error code70 eMOVZX cx, ah 71 push cx ; Push INT 13h error code 72 72 mov si, g_szReadError 73 73 jmp BootMenuPrint_FormatCSSIfromParamsInSSBP -
trunk/XTIDE_Universal_BIOS/Src/Boot/BootSector.asm
r128 r130 28 28 jne SHORT .FirstHardDiskSectorNotBootable 29 29 .AlwaysBootFromFloppyDriveForBooterGames: 30 mov bx, g_szFound31 call BootPrint_BootSectorResultStringFrom BX30 mov ax, g_szFound 31 call BootPrint_BootSectorResultStringFromAX 32 32 stc 33 33 ret … … 37 37 ret 38 38 .FirstHardDiskSectorNotBootable: 39 mov bx, g_szNotFound40 call BootPrint_BootSectorResultStringFrom BX39 mov ax, g_szNotFound 40 call BootPrint_BootSectorResultStringFromAX 41 41 clc 42 42 ret … … 66 66 dec di ; Decrement retry counter 67 67 jnz SHORT .ReadRetryLoop ; Loop while retries left 68 ALIGN JUMP_ALIGN69 68 .Return: 70 69 ret -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19hMenu.asm
r122 r130 20 20 STORE_POST_STACK_POINTER 21 21 SWITCH_TO_BOOT_MENU_STACK 22 CALL_DISPLAY_LIBRARYInitializeDisplayContext22 call BootMenuPrint_InitializeDisplayContext 23 23 call RamVars_GetSegmentToDS 24 24 ; Fall to .ProcessMenuSelectionsUntilBootable … … 34 34 .ProcessMenuSelectionsUntilBootable: 35 35 call BootMenu_DisplayAndReturnSelection 36 call DriveXlate_ToOrBack ; Translate drive number36 call DriveXlate_ToOrBack ; Translate drive number 37 37 call BootSector_TryToLoadFromDriveDL 38 38 jnc SHORT .ProcessMenuSelectionsUntilBootable ; Boot failure, show menu again -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm
r120 r130 70 70 ;-------------------------------------------------------------------- 71 71 Initialize_AndDetectDrives: 72 CALL_DISPLAY_LIBRARYInitializeDisplayContext72 call BootMenuPrint_InitializeDisplayContext 73 73 call DetectPrint_RomFoundAtSegment 74 74 call RamVars_Initialize -
trunk/XTIDE_Universal_BIOS/Src/Strings.asm
r127 r130 34 34 g_szCapacity: db "Capacity : ",NULL 35 35 g_szSizeSingle: db "%s%u.%u %ciB",NULL 36 g_szSizeDual: db "%s% u.%u %ciB / %u.%u %ciB",LF,CR,NULL36 g_szSizeDual: db "%s%4-u.%u %ciB / %4-u.%u %ciB",LF,CR,NULL 37 37 g_szCfgHeader: db "Addr.",SINGLE_VERTICAL,"Block",SINGLE_VERTICAL,"Bus", SINGLE_VERTICAL,"IRQ", SINGLE_VERTICAL,"Reset",LF,CR,NULL 38 g_szCfgFormat: db "%s" ,SINGLE_VERTICAL,"%5 u", SINGLE_VERTICAL,"%c%2u",SINGLE_VERTICAL," %c%c",SINGLE_VERTICAL,"%5x", NULL38 g_szCfgFormat: db "%s" ,SINGLE_VERTICAL,"%5-u", SINGLE_VERTICAL,"%c%2u",SINGLE_VERTICAL," %c%c",SINGLE_VERTICAL,"%5-x", NULL 39 39 g_szLCHS: db "L-CHS",NULL 40 40 g_szPCHS: db "P-CHS",NULL
Note:
See TracChangeset
for help on using the changeset viewer.