Changeset 38 for trunk/BOOTCODE/SETUP
- Timestamp:
- Apr 11, 2014, 9:36:56 PM (12 years ago)
- Location:
- trunk/BOOTCODE/SETUP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BOOTCODE/SETUP/MAIN.ASM
r37 r38 30 30 LocMENU_ItemPack equ 8 ; only if VariablePtr>0 31 31 32 SETUP_UpperFixString db 'SETUP ',0 ; AddOn for "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 fr "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 71 SETUP_CheckEnterSETUP Proc Near Uses 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 ; the main-menu routine119 SETUP_MenuTask Proc Near Uses ; 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 296 SETUP_DrawMenuOnScreen Proc Near Uses 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 ; BackUp Coordinates and ItemPackPtr 399 push cx 400 push si 398 push cx si ; BackUp Coordinates and ItemPackPtr 401 399 push cx 402 400 cmp cl, 40 … … 422 420 call VideoIO_PrintSingleChar ; Write double-point 423 421 mov word ptr TextColorFore, dx 424 pop si 425 pop cx 422 pop si cx 426 423 add cl, 26 ; Fix X-coordinate (for ItemPack) 427 424 call VideoIO_Locate … … 501 498 SETUP_DrawMenuWindow EndP 502 499 503 SETUP_DrawMenuBase Proc Near 504 call BOOTMENU_BuildBack ground500 SETUP_DrawMenuBase Proc Near Uses 501 call BOOTMENU_BuildBackGround 505 502 ; -------------------------------------------- Upper Copyright... 506 503 mov cx, 0F00h … … 708 705 ;SETUP_EnterMenu_LinuxCommandLine EndP 709 706 710 SETUP_EnterMenu_DefineMasterPassword Proc Near 707 SETUP_EnterMenu_DefineMasterPassword Proc Near Uses 711 708 mov di, offset CFG_MasterPassword 712 709 call SETUP_EnterMenu_DefinePassword … … 714 711 SETUP_EnterMenu_DefineMasterPassword EndP 715 712 716 SETUP_EnterMenu_DefineBootPassword Proc Near 713 SETUP_EnterMenu_DefineBootPassword Proc Near Uses 717 714 mov di, offset CFG_BootPassword 718 715 call SETUP_EnterMenu_DefinePassword … … 723 720 724 721 ; [Linux support removed since v1.02] 725 ;SETUP_EnterMenu_EnterLinuxCmdLine Proc Near 722 ;SETUP_EnterMenu_EnterLinuxCmdLine Proc Near Uses 726 723 ; mov cx, 0D05h 727 724 ; call VideoIO_Color … … 848 845 mov ax, VideoIO_Page2 849 846 call VideoIO_BackUpTo 850 push ax 851 push di 847 push ax di 852 848 mov ax, 20h ; Space 853 849 mov cx, 16 854 850 rep stosb ; Kill new password 855 851 mov es:[di], ah ; ending NUL 856 pop di 857 pop ax 852 pop di ax 858 853 cmp ax, 0ABABh ; Magic Processing... 859 854 je SLEP_MagicLayOut … … 1044 1039 SEMSAES_DoThis: 1045 1040 xor al, al 1046 mov CFG_AutoEnterS etup, al1041 mov CFG_AutoEnterSETUP, al 1047 1042 add CFG_LastTimeEditLow, 1 1048 1043 adc CFG_LastTimeEditHi, 0 ; Update Time-Stamp … … 1060 1055 jnz SEMEWS_UserAbort 1061 1056 ; If we were forced to enter Setup, save configuration anyway... 1062 test CFG_AutoEnterS etup, 11057 test CFG_AutoEnterSETUP, 1 1063 1058 jz SEMEWS_DoThis 1064 1059 jmp SEMEWS_DoThis ; Cross-Jump to SaveAndExitSetup! … … 1077 1072 ; Out: Non-Zero Flag set -> User is sure 1078 1073 ; Destroyed: None 1079 SETUP_Warning_AreYouSure Proc Near 1074 SETUP_Warning_AreYouSure Proc Near Uses 1080 1075 mov cx, 0C04h 1081 1076 call VideoIO_Color … … 1172 1167 1173 1168 ; Cur Value in DL, Maximum Value in DH. Add/Sub in CL 1174 SETUPMAGIC_InternalCheckUp Proc Near 1169 SETUPMAGIC_InternalCheckUp Proc Near Uses 1175 1170 or cl, cl ; CL==0? -> Decrease 1176 1171 jz SMICU_Substract ; otherwise -> Increase … … 1227 1222 mov al, dl 1228 1223 call VideoIO_PrintByteDynamicNumber 1229 ; Pseudo-(XCHG DS, ES) 1230 push ds 1231 push es 1232 pop ds 1233 pop es 1234 1224 push ds es 1225 pop ds es ; Pseudo-(XCHG DS, ES) 1235 1226 mov di, si 1236 1227 add di, LocMENU_ItemPack ; ES:DI - ItemPack 1237 1228 mov si, 4000 ; DS:SI - Screen Page 1 1238 push es 1239 push di 1229 push es di 1240 1230 mov cx, 4 1241 1231 SMCBD_Loop: … … 1243 1233 stosb 1244 1234 loop SMCBD_Loop ; okay we got it...trick! 1245 ; DS:SI - ItemPack 1246 pop si 1247 pop ds 1235 pop si ds ; DS:SI - ItemPack 1248 1236 mov cx, 12 1249 1237 call GetLenOfName ; Gets the length of the number … … 1311 1299 call PART_GetPartitionPointer 1312 1300 mov ax, ds:[si+LocIPT_Flags] 1313 test ax, Flags_Boot able1301 test ax, Flags_BootAble 1314 1302 jz SMCP_Inc_RejectPartition 1315 1303 jmp SMCP_GotSelection … … 1342 1330 call PART_GetPartitionPointer 1343 1331 mov ax, ds:[si+LocIPT_Flags] 1344 test ax, Flags_Boot able1332 test ax, Flags_BootAble 1345 1333 jz SMCP_Dec_RejectPartition 1346 1334 -
trunk/BOOTCODE/SETUP/MENUS.ASM
r37 r38 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
r37 r38 25 25 26 26 ; This here is called from Menu in AIR-BSET.asm 27 PARTSETUP_Main Proc Near 27 PARTSETUP_Main Proc Near Uses 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 implemented113 ; in PARTSETUP_ChangePartitionName.114 112 PSM_KeyENTER: 115 113 call PARTSETUP_ChangePartitionName … … 122 120 PSM_KeyBootAble: 123 121 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_IsType35128 je PSM_KeyBootAble_istype35129 130 PSM_KeyBootAble_notype35:131 122 mov al, [si+LocIPT_Flags] 132 xor al, Flags_Boot able123 xor al, Flags_BootAble 133 124 mov [si+LocIPT_Flags], al 134 125 call PARTSETUP_DrawPartitionInfo 135 126 call PARTSETUP_BuildChoiceBar 136 PSM_KeyBootAble_istype35:137 127 jmp PSM_MainLoop 138 128 … … 174 164 PARTSETUP_Main EndP 175 165 176 177 ; See if this is a partition of type 0x35 and display error178 ; when user tries to set it as bootable.179 ; IN: SI = Pointer to partition180 ; OUT: ZF = Set if 0x35, clear otherwise181 PARTSETUP_IsType35 Proc Near182 mov al, [si+LocIPT_SystemID]183 cmp al, 35h184 jne PARTSETUP_IsType35_end185 pushf186 pusha187 ; Cannot boot LVM-Data partitions188 mov cx, 0C04h189 mov si, offset TXT_SETUP_NoBootType35190 call SETUP_ShowErrorBox191 popa192 call PARTSETUP_DrawMenuBase193 call PARTSETUP_RefreshPartitions194 call PARTSETUP_BuildChoiceBar195 popf196 PARTSETUP_IsType35_end:197 ret198 PARTSETUP_IsType35 EndP199 200 201 166 ; Draw all standard-things for Partition Setup, dynamic content not included. 202 167 PARTSETUP_DrawMenuBase Proc Near Uses dx … … 286 251 call VideoIO_FixedPrint 287 252 288 mov si, offset TXT_SETUPHELP_P artSetup253 mov si, offset TXT_SETUPHELP_PARTSETUP 289 254 call SETUP_DrawMenuHelp 290 255 ret … … 405 370 mov cl, 11 406 371 call VideoIO_FixedPrint 407 pop si 408 pop cx 372 pop si cx 409 373 410 374 ; Display "Flags" field aka "BVHL" … … 415 379 mov bh, bl 416 380 mov al, TXT_SETUP_FlagLetterBootable 417 and bl, Flags_Boot able381 and bl, Flags_BootAble 418 382 call PARTSETUP_DrawOneFlag 419 383 mov bl, bh … … 465 429 ; DH - New Active (to be activated) 466 430 ; Destroyed: None 467 PARTSETUP_BuildChoiceBar Proc Near 431 PARTSETUP_BuildChoiceBar Proc Near Uses 468 432 cmp dl, dh 469 433 je PSBCB_SkipRetrace … … 702 666 cmp byte ptr [si+LocIPT_SystemID], 035h 703 667 jnz no_type_35h 704 705 ; Cannot boot LVM-Data partitions706 pusha707 mov cx, 0C04h708 mov si, offset TXT_SETUP_NoEditType35709 call SETUP_ShowErrorBox710 popa711 712 713 668 jmp PSCPN_AllDone 714 669 no_type_35h: 715 670 716 671 mov cx, 11 ; Partition-Name-Length = 11 Bytes 717 push si 718 push di 672 push si di 719 673 add si, LocIPT_Name ; DS:SI -> Partition-Name 720 674 repz cmpsb 721 pop di 722 pop si 675 pop di si 723 676 jne PSCPN_LetUserEditPartName ; -> No BR/LVM Changing/Saving 724 677 … … 788 741 789 742 ; ----------------------------------------------[LVM SAVE PARTITION NAME]--- 790 ; Copy 11 bytes from IPT into LVM Partit ionName, back-padd with zero's743 ; Copy 11 bytes from IPT into LVM PartitonName, back-padd with zero's 791 744 mov cx, 11 792 745 push si … … 895 848 cmp ah, Keys_F1 896 849 je PHSM_KeyF1 897 cmp ah, Keys_E NTER850 cmp ah, Keys_Enter 898 851 je PHSM_KeyToogle 899 852 cmp ah, Keys_Plus … … 1005 958 sub dl, cl ; Adjust position 1006 959 sub dl, 2 1007 push cx 1008 push si ; SI == Label Field 960 push cx si ; SI == Label Field 1009 961 mov cx, dx 1010 962 call VideoIO_Locate … … 1013 965 mov si, offset TXT_SETUP_HideFeature2 1014 966 call VideoIO_Print 1015 pop si 1016 pop cx 967 pop si cx 1017 968 call VideoIO_FixedPrint 1018 969 mov al, '>' … … 1183 1134 ; DH - New Active (to be activated) 1184 1135 ; Destroyed: None 1185 PARTHIDESETUP_BuildChoiceBar Proc Near 1136 PARTHIDESETUP_BuildChoiceBar Proc Near Uses 1186 1137 cmp dl, dh 1187 1138 je PHSBCB_SkipRetrace … … 1314 1265 mov di, offset HidePartitionTable 1315 1266 add di, ax ; We got the pointer 1316 push di 1317 push di 1267 push di di 1318 1268 mov cx, LocIPT_MaxPartitions 1319 1269 mov al, 0FFh … … 1417 1367 cmp ah, Keys_ESC 1418 1368 je PSDLS_KeyDONE 1419 cmp ah, Keys_E NTER1369 cmp ah, Keys_Enter 1420 1370 je PSDLS_KeyDONE 1421 1371 ; Direct-Letter-Input
Note:
See TracChangeset
for help on using the changeset viewer.
