Changeset 40 for trunk/BOOTCODE/SETUP
- Timestamp:
- Apr 11, 2014, 9:58:17 PM (12 years ago)
- Location:
- trunk/BOOTCODE/SETUP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BOOTCODE/SETUP/MAIN.ASM
r38 r40 30 30 LocMENU_ItemPack equ 8 ; only if VariablePtr>0 31 31 32 SETUP_UpperFixString : db 'SETUP ',0 ; AddOn fr "AiR-BOOT SETUP vX.XX"33 34 Include SETUP \MENUS.ASM ; Menu structures35 Include SETUP \PART_SET.ASM ; Partition Setup (in extra file)32 SETUP_UpperFixString db 'SETUP ',0 ; AddOn for "AiR-BOOT SETUP vX.XX" 33 34 Include SETUP/MENUS.ASM ; Menu structures 35 Include SETUP/PART_SET.ASM ; Partition Setup (in extra file) 36 36 37 37 ; CH - Current Item Number … … 69 69 SETUP_SwitchToSelectedItem EndP 70 70 71 SETUP_CheckEnterSETUP Proc Near Uses71 SETUP_CheckEnterSETUP Proc Near 72 72 73 73 … … 117 117 ; In: BP - Pointer to Menu 118 118 ; CurMenu: Left Side 0-6, Right Side 8-14 (Bit 3!) 119 SETUP_MenuTask Proc Near Uses; the main-menu routine119 SETUP_MenuTask Proc Near ; the main-menu routine 120 120 cmp SETUP_ExitEvent, 1 121 121 jne SMT_NoImmediateExit … … 129 129 130 130 mov ax, ds:[bp+1] ; Help Pointer 131 cmp ax, offset TXT_SETUPHELP_M AIN; ask only in main-menu...131 cmp ax, offset TXT_SETUPHELP_Main ; ask only in main-menu... 132 132 jne SMT_NotMainMenu 133 133 call FX_EndScreenLeft ; Do FX, if requested... … … 155 155 cmp ah, Keys_Right 156 156 je SMT_KeyLeftRight 157 cmp ah, Keys_E nter158 je SMT_KeyE nter157 cmp ah, Keys_ENTER 158 je SMT_KeyENTER 159 159 cmp ah, Keys_Plus 160 160 je SMT_KeyPlus … … 199 199 jmp SMT_FixUpModify 200 200 201 SMT_KeyE nter: ; Enters Menu, if no ItemPack available201 SMT_KeyENTER: ; Enters Menu, if no ItemPack available 202 202 mov ch, dh 203 203 call SETUP_SwitchToSelectedItem ; Calculates SI for Item-No (CH) … … 238 238 SMT_KeyEsc: 239 239 mov ax, ds:[bp+1] ; Help Pointer 240 cmp ax, offset TXT_SETUPHELP_M AIN; embarassing? ;-)240 cmp ax, offset TXT_SETUPHELP_Main ; embarassing? ;-) 241 241 jne SMT_ReturnPrev 242 242 jmp SMT_ExitWithoutSaving … … 294 294 ; In: BP - Pointer to Menu 295 295 ; Out: DH - Active Item on Screen 296 SETUP_DrawMenuOnScreen Proc Near Uses296 SETUP_DrawMenuOnScreen Proc Near 297 297 call SETUP_DrawMenuWindow 298 298 mov cx, CLR_MENU_WINDOW_BM … … 396 396 add ch, 6 ; Fix coordinate... 397 397 ; Display the Name and a double-point first 398 push cx si ; BackUp Coordinates and ItemPackPtr 398 ; BackUp Coordinates and ItemPackPtr 399 push cx 400 push si 399 401 push cx 400 402 cmp cl, 40 … … 420 422 call VideoIO_PrintSingleChar ; Write double-point 421 423 mov word ptr TextColorFore, dx 422 pop si cx 424 pop si 425 pop cx 423 426 add cl, 26 ; Fix X-coordinate (for ItemPack) 424 427 call VideoIO_Locate … … 498 501 SETUP_DrawMenuWindow EndP 499 502 500 SETUP_DrawMenuBase Proc Near Uses501 call BOOTMENU_BuildBack Ground503 SETUP_DrawMenuBase Proc Near 504 call BOOTMENU_BuildBackground 502 505 ; -------------------------------------------- Upper Copyright... 503 506 mov cx, 0F00h … … 705 708 ;SETUP_EnterMenu_LinuxCommandLine EndP 706 709 707 SETUP_EnterMenu_DefineMasterPassword Proc Near Uses710 SETUP_EnterMenu_DefineMasterPassword Proc Near 708 711 mov di, offset CFG_MasterPassword 709 712 call SETUP_EnterMenu_DefinePassword … … 711 714 SETUP_EnterMenu_DefineMasterPassword EndP 712 715 713 SETUP_EnterMenu_DefineBootPassword Proc Near Uses716 SETUP_EnterMenu_DefineBootPassword Proc Near 714 717 mov di, offset CFG_BootPassword 715 718 call SETUP_EnterMenu_DefinePassword … … 720 723 721 724 ; [Linux support removed since v1.02] 722 ;SETUP_EnterMenu_EnterLinuxCmdLine Proc Near Uses725 ;SETUP_EnterMenu_EnterLinuxCmdLine Proc Near 723 726 ; mov cx, 0D05h 724 727 ; call VideoIO_Color … … 845 848 mov ax, VideoIO_Page2 846 849 call VideoIO_BackUpTo 847 push ax di 850 push ax 851 push di 848 852 mov ax, 20h ; Space 849 853 mov cx, 16 850 854 rep stosb ; Kill new password 851 855 mov es:[di], ah ; ending NUL 852 pop di ax 856 pop di 857 pop ax 853 858 cmp ax, 0ABABh ; Magic Processing... 854 859 je SLEP_MagicLayOut … … 1039 1044 SEMSAES_DoThis: 1040 1045 xor al, al 1041 mov CFG_AutoEnterS ETUP, al1046 mov CFG_AutoEnterSetup, al 1042 1047 add CFG_LastTimeEditLow, 1 1043 1048 adc CFG_LastTimeEditHi, 0 ; Update Time-Stamp … … 1055 1060 jnz SEMEWS_UserAbort 1056 1061 ; If we were forced to enter Setup, save configuration anyway... 1057 test CFG_AutoEnterS ETUP, 11062 test CFG_AutoEnterSetup, 1 1058 1063 jz SEMEWS_DoThis 1059 1064 jmp SEMEWS_DoThis ; Cross-Jump to SaveAndExitSetup! … … 1072 1077 ; Out: Non-Zero Flag set -> User is sure 1073 1078 ; Destroyed: None 1074 SETUP_Warning_AreYouSure Proc Near Uses1079 SETUP_Warning_AreYouSure Proc Near 1075 1080 mov cx, 0C04h 1076 1081 call VideoIO_Color … … 1167 1172 1168 1173 ; Cur Value in DL, Maximum Value in DH. Add/Sub in CL 1169 SETUPMAGIC_InternalCheckUp Proc Near Uses1174 SETUPMAGIC_InternalCheckUp Proc Near 1170 1175 or cl, cl ; CL==0? -> Decrease 1171 1176 jz SMICU_Substract ; otherwise -> Increase … … 1222 1227 mov al, dl 1223 1228 call VideoIO_PrintByteDynamicNumber 1224 push ds es 1225 pop ds es ; Pseudo-(XCHG DS, ES) 1229 ; Pseudo-(XCHG DS, ES) 1230 push ds 1231 push es 1232 pop ds 1233 pop es 1234 1226 1235 mov di, si 1227 1236 add di, LocMENU_ItemPack ; ES:DI - ItemPack 1228 1237 mov si, 4000 ; DS:SI - Screen Page 1 1229 push es di 1238 push es 1239 push di 1230 1240 mov cx, 4 1231 1241 SMCBD_Loop: … … 1233 1243 stosb 1234 1244 loop SMCBD_Loop ; okay we got it...trick! 1235 pop si ds ; DS:SI - ItemPack 1245 ; DS:SI - ItemPack 1246 pop si 1247 pop ds 1236 1248 mov cx, 12 1237 1249 call GetLenOfName ; Gets the length of the number … … 1299 1311 call PART_GetPartitionPointer 1300 1312 mov ax, ds:[si+LocIPT_Flags] 1301 test ax, Flags_Boot Able1313 test ax, Flags_Bootable 1302 1314 jz SMCP_Inc_RejectPartition 1303 1315 jmp SMCP_GotSelection … … 1330 1342 call PART_GetPartitionPointer 1331 1343 mov ax, ds:[si+LocIPT_Flags] 1332 test ax, Flags_Boot Able1344 test ax, Flags_Bootable 1333 1345 jz SMCP_Dec_RejectPartition 1334 1346 -
trunk/BOOTCODE/SETUP/MENUS.ASM
r38 r40 69 69 SETUP_MainMenu: 70 70 db 0 ; Where Current Item will get saved 71 dw offset TXT_SETUPHELP_M AIN; Pointer to help information71 dw offset TXT_SETUPHELP_Main ; Pointer to help information 72 72 ; The Menu-Items start here... 73 73 dw offset SETUP_EnterMenu_PartitionSetup, 0 … … 103 103 SETUP_BasicOptions: 104 104 db 0 ; Where Current Item will get saved 105 dw offset TXT_SETUPHELP_S UBMENU; Pointer to help info105 dw offset TXT_SETUPHELP_SubMenu ; Pointer to help info 106 106 ; The Menu-Items start here... 107 107 dw offset SETUPMAGIC_ChangeDefaultSelection, offset CFG_PartDefault … … 135 135 dw 0, 0 136 136 dw offset SETUPMAGIC_EnableDisable, offset CFG_ProtectMBR 137 dw offset TXT_SETUP_M BRprotection, offset TXT_SETUPHELP_MBRprotection137 dw offset TXT_SETUP_MbrProtection, offset TXT_SETUPHELP_MbrProtection 138 138 dw 6 dup (0) 139 139 dw offset SETUPMAGIC_EnableDisable, offset CFG_IgnoreWriteToMBR 140 dw offset TXT_SETUP_IgnoreM BRwrites, offset TXT_SETUPHELP_IGNOREMBRWRITES140 dw offset TXT_SETUP_IgnoreMbrWrites, offset TXT_SETUPHELP_IgnoreMbrWrites 141 141 dw 6 dup (0) 142 142 dw 0, 0 … … 151 151 SETUP_AdvancedOptions: 152 152 db 0 ; Where Current Item will get saved 153 dw offset TXT_SETUPHELP_S UBMENU; Pointer to help info153 dw offset TXT_SETUPHELP_SubMenu ; Pointer to help info 154 154 ; The Menu-Items start here... 155 155 dw offset SETUPMAGIC_ChangeBootMenu, offset CFG_BootMenuActive … … 163 163 ; Separator Line 164 164 dw 0, 0 165 dw offset TXT_SETUP_S ECURITYOPTIONS, 0165 dw offset TXT_SETUP_SecurityOptions, 0 166 166 dw offset SETUPMAGIC_EnableDisable, offset CFG_PasswordSetup 167 167 dw offset TXT_SETUP_PasswordedSetup, offset TXT_SETUPHELP_PasswordedSetup … … 198 198 SETUP_ExtendedBootOptions: 199 199 db 0 ; Where Current Item will get saved 200 dw offset TXT_SETUPHELP_S UBMENU; Pointer to help information200 dw offset TXT_SETUPHELP_SubMenu ; Pointer to help information 201 201 ; The Menu-Items start here... 202 202 ; [Linux support removed since v1.02] -
trunk/BOOTCODE/SETUP/PART_SET.ASM
r38 r40 25 25 26 26 ; This here is called from Menu in AIR-BSET.asm 27 PARTSETUP_Main Proc Near Uses27 PARTSETUP_Main Proc Near 28 28 ; Build Fixed Content... 29 29 call PARTSETUP_DrawMenuBase … … 53 53 cmp ah, Keys_F1 54 54 je PSM_KeyF1 55 cmp ah, Keys_E nter55 cmp ah, Keys_ENTER 56 56 je PSM_KeyENTER 57 57 ; Flags-Change … … 110 110 jmp PSM_MainLoop 111 111 112 ; Disabling editing for type 0x35 is currently implemented 113 ; in PARTSETUP_ChangePartitionName. 112 114 PSM_KeyENTER: 113 115 call PARTSETUP_ChangePartitionName … … 120 122 PSM_KeyBootAble: 121 123 call PART_GetPartitionPointer ; Gets Partition (DL) Pointer -> SI 124 ; See if this is an eCS LVM Volume. 125 ; In that case, we don't allow it to be made bootable. 126 ; We also show a popup to inform the user. 127 call PARTSETUP_IsType35 128 je PSM_KeyBootAble_istype35 129 130 PSM_KeyBootAble_notype35: 122 131 mov al, [si+LocIPT_Flags] 123 xor al, Flags_Boot Able132 xor al, Flags_Bootable 124 133 mov [si+LocIPT_Flags], al 125 134 call PARTSETUP_DrawPartitionInfo 126 135 call PARTSETUP_BuildChoiceBar 136 PSM_KeyBootAble_istype35: 127 137 jmp PSM_MainLoop 128 138 … … 164 174 PARTSETUP_Main EndP 165 175 176 177 ; See if this is a partition of type 0x35 and display error 178 ; when user tries to set it as bootable. 179 ; IN: SI = Pointer to partition 180 ; OUT: ZF = Set if 0x35, clear otherwise 181 PARTSETUP_IsType35 Proc Near 182 mov al, [si+LocIPT_SystemID] 183 cmp al, 35h 184 jne PARTSETUP_IsType35_end 185 pushf 186 pusha 187 ; Cannot boot LVM-Data partitions 188 mov cx, 0C04h 189 mov si, offset TXT_SETUP_NoBootType35 190 call SETUP_ShowErrorBox 191 popa 192 call PARTSETUP_DrawMenuBase 193 call PARTSETUP_RefreshPartitions 194 call PARTSETUP_BuildChoiceBar 195 popf 196 PARTSETUP_IsType35_end: 197 ret 198 PARTSETUP_IsType35 EndP 199 200 166 201 ; Draw all standard-things for Partition Setup, dynamic content not included. 167 202 PARTSETUP_DrawMenuBase Proc Near Uses dx … … 251 286 call VideoIO_FixedPrint 252 287 253 mov si, offset TXT_SETUPHELP_P ARTSETUP288 mov si, offset TXT_SETUPHELP_PartSetup 254 289 call SETUP_DrawMenuHelp 255 290 ret … … 370 405 mov cl, 11 371 406 call VideoIO_FixedPrint 372 pop si cx 407 pop si 408 pop cx 373 409 374 410 ; Display "Flags" field aka "BVHL" … … 379 415 mov bh, bl 380 416 mov al, TXT_SETUP_FlagLetterBootable 381 and bl, Flags_Boot Able417 and bl, Flags_Bootable 382 418 call PARTSETUP_DrawOneFlag 383 419 mov bl, bh … … 429 465 ; DH - New Active (to be activated) 430 466 ; Destroyed: None 431 PARTSETUP_BuildChoiceBar Proc Near Uses467 PARTSETUP_BuildChoiceBar Proc Near 432 468 cmp dl, dh 433 469 je PSBCB_SkipRetrace … … 666 702 cmp byte ptr [si+LocIPT_SystemID], 035h 667 703 jnz no_type_35h 704 705 ; Cannot boot LVM-Data partitions 706 pusha 707 mov cx, 0C04h 708 mov si, offset TXT_SETUP_NoEditType35 709 call SETUP_ShowErrorBox 710 popa 711 712 668 713 jmp PSCPN_AllDone 669 714 no_type_35h: 670 715 671 716 mov cx, 11 ; Partition-Name-Length = 11 Bytes 672 push si di 717 push si 718 push di 673 719 add si, LocIPT_Name ; DS:SI -> Partition-Name 674 720 repz cmpsb 675 pop di si 721 pop di 722 pop si 676 723 jne PSCPN_LetUserEditPartName ; -> No BR/LVM Changing/Saving 677 724 … … 741 788 742 789 ; ----------------------------------------------[LVM SAVE PARTITION NAME]--- 743 ; Copy 11 bytes from IPT into LVM Partit onName, back-padd with zero's790 ; Copy 11 bytes from IPT into LVM PartitionName, back-padd with zero's 744 791 mov cx, 11 745 792 push si … … 848 895 cmp ah, Keys_F1 849 896 je PHSM_KeyF1 850 cmp ah, Keys_E nter897 cmp ah, Keys_ENTER 851 898 je PHSM_KeyToogle 852 899 cmp ah, Keys_Plus … … 958 1005 sub dl, cl ; Adjust position 959 1006 sub dl, 2 960 push cx si ; SI == Label Field 1007 push cx 1008 push si ; SI == Label Field 961 1009 mov cx, dx 962 1010 call VideoIO_Locate … … 965 1013 mov si, offset TXT_SETUP_HideFeature2 966 1014 call VideoIO_Print 967 pop si cx 1015 pop si 1016 pop cx 968 1017 call VideoIO_FixedPrint 969 1018 mov al, '>' … … 1134 1183 ; DH - New Active (to be activated) 1135 1184 ; Destroyed: None 1136 PARTHIDESETUP_BuildChoiceBar Proc Near Uses1185 PARTHIDESETUP_BuildChoiceBar Proc Near 1137 1186 cmp dl, dh 1138 1187 je PHSBCB_SkipRetrace … … 1265 1314 mov di, offset HidePartitionTable 1266 1315 add di, ax ; We got the pointer 1267 push di di 1316 push di 1317 push di 1268 1318 mov cx, LocIPT_MaxPartitions 1269 1319 mov al, 0FFh … … 1367 1417 cmp ah, Keys_ESC 1368 1418 je PSDLS_KeyDONE 1369 cmp ah, Keys_E nter1419 cmp ah, Keys_ENTER 1370 1420 je PSDLS_KeyDONE 1371 1421 ; Direct-Letter-Input
Note:
See TracChangeset
for help on using the changeset viewer.
