Changeset 46 for trunk/BOOTCODE/SETUP
- Timestamp:
- Apr 12, 2014, 8:23:32 AM (12 years ago)
- Location:
- trunk/BOOTCODE/SETUP
- Files:
-
- 2 edited
-
MAIN.ASM (modified) (21 diffs)
-
PART_SET.ASM (modified) (28 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BOOTCODE/SETUP/MAIN.ASM
r40 r46 24 24 ENDIF 25 25 26 LocMENU_RoutinePtr equ 027 LocMENU_VariablePtr equ 228 LocMENU_ItemNamePtr equ 429 LocMENU_ItemHelpPtr equ 630 LocMENU_ItemPack equ 8 ; only if VariablePtr>026 ;~ LocMENU_RoutinePtr equ 0 27 ;~ LocMENU_VariablePtr equ 2 28 ;~ LocMENU_ItemNamePtr equ 4 29 ;~ LocMENU_ItemHelpPtr equ 6 30 ;~ LocMENU_ItemPack equ 8 ; only if VariablePtr>0 31 31 32 32 SETUP_UpperFixString db 'SETUP ',0 ; AddOn for "AiR-BOOT SETUP vX.XX" … … 86 86 87 87 88 test CFG_AutoEnterSetup, 188 test byte ptr [CFG_AutoEnterSetup], 1 89 89 jnz SCES_ForceEnter 90 mov al, SETUP_KeysOnEntry90 mov al, [SETUP_KeysOnEntry] 91 91 test al, Keys_Flags_EnterSetup 92 92 IFDEF ReleaseCode … … 100 100 101 101 SETUP_Main Proc Near Uses si es bp 102 mov SETUP_ExitEvent, 0102 mov byte ptr [SETUP_ExitEvent], 0 103 103 xor al, al ; -PARTITION SETUP PreDefines- 104 mov PartSetup_UpperPart, al ; Upper-Partition == 0105 mov PartSetup_ActivePart, al ; Active-Partition == 0104 mov [PartSetup_UpperPart], al ; Upper-Partition == 0 105 mov [PartSetup_ActivePart], al ; Active-Partition == 0 106 106 107 107 ; Setup PartitionPointers-Table...again (needed when re-entering setup) … … 118 118 ; CurMenu: Left Side 0-6, Right Side 8-14 (Bit 3!) 119 119 SETUP_MenuTask Proc Near ; the main-menu routine 120 cmp SETUP_ExitEvent, 1120 cmp byte ptr [SETUP_ExitEvent], 1 121 121 jne SMT_NoImmediateExit 122 122 ret … … 132 132 jne SMT_NotMainMenu 133 133 call FX_EndScreenLeft ; Do FX, if requested... 134 test CFG_PasswordSetup, 1134 test byte ptr [CFG_PasswordSetup], 1 135 135 jz SMT_NotMainMenu 136 136 mov ax, 0ABABh … … 202 202 mov ch, dh 203 203 call SETUP_SwitchToSelectedItem ; Calculates SI for Item-No (CH) 204 mov ax, word ptrds:[si+LocMENU_RoutinePtr]205 mov bx, word ptrds:[si+LocMENU_VariablePtr]204 mov ax, ds:[si+LocMENU_RoutinePtr] 205 mov bx, ds:[si+LocMENU_VariablePtr] 206 206 or bx, bx ; VarPtr ? 207 207 jnz SMT_DoNotExecute … … 210 210 call ax ; Call to CodePtr 211 211 call SETUP_DrawMenuOnScreen ; Redraw after return 212 cmp SETUP_ExitEvent, 1212 cmp byte ptr [SETUP_ExitEvent], 1 213 213 je SMT_ExitEvent 214 214 SMT_DoNotExecute: … … 226 226 mov ch, dh 227 227 call SETUP_SwitchToSelectedItem ; Calculates SI for Item-No (CH) 228 mov ax, word ptrds:[si+LocMENU_RoutinePtr]229 mov bx, word ptrds:[si+LocMENU_VariablePtr]228 mov ax, ds:[si+LocMENU_RoutinePtr] 229 mov bx, ds:[si+LocMENU_VariablePtr] 230 230 or bx, bx ; VarPtr ? =0 No ItemPack 231 231 jnz SMT_DoItemPack … … 272 272 mov ch, dh 273 273 call SETUP_SwitchToSelectedItem ; Calculates SI for Item-No (CH) 274 mov bx, word ptrds:[si+LocMENU_ItemHelpPtr]274 mov bx, ds:[si+LocMENU_ItemHelpPtr] 275 275 or bx, bx ; Help-Ptr available ? 276 276 jz SMT_NoHelpAvailable … … 883 883 mov cx, 0E05h 884 884 call VideoIO_Color 885 mov EnterPwd_Location, 0E26h886 mov EnterPwd_DefinePwd, 1885 mov word ptr [EnterPwd_Location], 0E26h 886 mov word ptr [EnterPwd_DefinePwd], 1 887 887 jmp SLEP_JumpToInputProcess 888 888 … … 927 927 ; DL - location of cursor (first=0) 928 928 SLEP_Loop: 929 mov cx, EnterPwd_Location929 mov cx, [EnterPwd_Location] 930 930 call VideoIO_Locate 931 931 push si … … 990 990 or dl, dl 991 991 jnz SLEP_GotSomePassword 992 cmp EnterPwd_DefinePwd, 1992 cmp word ptr [EnterPwd_DefinePwd], 1 993 993 je SLEP_GotSomePassword 994 994 mov cx, 8 … … 1044 1044 SEMSAES_DoThis: 1045 1045 xor al, al 1046 mov CFG_AutoEnterSetup, al1047 add CFG_LastTimeEditLow, 11048 adc CFG_LastTimeEditHi, 0 ; Update Time-Stamp1046 mov byte ptr [CFG_AutoEnterSetup], al 1047 add word ptr [CFG_LastTimeEditLow], 1 1048 adc word ptr [CFG_LastTimeEditHi], 0 ; Update Time-Stamp 1049 1049 IFDEF ReleaseCode 1050 1050 call DriveIO_SaveConfiguration 1051 1051 ENDIF 1052 mov SETUP_ExitEvent, 1 ; Exit and continue boot process1052 mov byte ptr [SETUP_ExitEvent], 1 ; Exit and continue boot process 1053 1053 SEMSAES_UserAbort: 1054 1054 ret … … 1060 1060 jnz SEMEWS_UserAbort 1061 1061 ; If we were forced to enter Setup, save configuration anyway... 1062 test CFG_AutoEnterSetup, 11062 test byte ptr [CFG_AutoEnterSetup], 1 1063 1063 jz SEMEWS_DoThis 1064 1064 jmp SEMEWS_DoThis ; Cross-Jump to SaveAndExitSetup! … … 1068 1068 call DriveIO_LoadConfiguration ; This is *NOT* IPT nor HideConfig 1069 1069 ENDIF 1070 mov SETUP_ExitEvent, 1 ; Exit and continue boot process1070 mov byte ptr [SETUP_ExitEvent], 1 ; Exit and continue boot process 1071 1071 SEMEWS_UserAbort: 1072 1072 ret … … 1270 1270 SMCP_AlreadyGotSelection: 1271 1271 ; We use BL in here for tracking how many selections left 1272 mov bl, CFG_Partitions1272 mov bl, [CFG_Partitions] 1273 1273 cmp dl, 0FEh 1274 1274 jb SMCP_DoneAdjust 1275 1275 je SMCP_AdjustContinueBIOS 1276 cmp CFG_IncludeFloppy, 01276 cmp byte ptr [CFG_IncludeFloppy], 0 1277 1277 jne SMCP_DoneAdjust 1278 1278 dec dl ; No Floppy? -> Try Resume-BIOS 1279 1279 SMCP_AdjustContinueBIOS: 1280 cmp CFG_ResumeBIOSbootSeq, 01280 cmp byte ptr [CFG_ResumeBIOSbootSeq], 0 1281 1281 jne SMCP_DoneAdjust 1282 1282 xor dl, dl ; No Resume-BIOS? -> Start partition 0 … … 1291 1291 SMCP_Inc_RejectPartition: 1292 1292 inc dl ; Increase Selection No 1293 cmp dl, CFG_Partitions1293 cmp dl, [CFG_Partitions] 1294 1294 jb SMCP_Inc_ModifyDone 1295 1295 cmp dl, 0FFh 1296 1296 je SMCP_Inc_TryFloppy 1297 1297 mov dl, 0FEh ; Try Resume-BIOS 1298 cmp CFG_ResumeBIOSbootSeq, 01298 cmp byte ptr [CFG_ResumeBIOSbootSeq], 0 1299 1299 jne SMCP_Inc_ModifyDone 1300 1300 inc dl ; Try Floppy 1301 1301 SMCP_Inc_TryFloppy: 1302 cmp CFG_IncludeFloppy, 01302 cmp byte ptr [CFG_IncludeFloppy], 0 1303 1303 jne SMCP_Inc_ModifyDone 1304 cmp CFG_Partitions, 01304 cmp byte ptr [CFG_Partitions], 0 1305 1305 je SMCP_NoBootable 1306 1306 inc dl ; Now start at partition 0 again … … 1325 1325 cmp dl, 0FFh 1326 1326 jb SMCP_Dec_TryResumeBIOS 1327 cmp CFG_IncludeFloppy, 01327 cmp byte ptr [CFG_IncludeFloppy], 0 1328 1328 jne SMCP_Dec_ModifyDone 1329 1329 dec dl 1330 1330 SMCP_Dec_TryResumeBIOS: 1331 cmp CFG_ResumeBIOSbootSeq, 01331 cmp byte ptr [CFG_ResumeBIOSbootSeq], 0 1332 1332 jne SMCP_Dec_ModifyDone 1333 1333 SMCP_Dec_TryPartition: 1334 mov dl, CFG_Partitions1334 mov dl, [CFG_Partitions] 1335 1335 or dl, dl 1336 1336 jz SMCP_NoBootable … … 1347 1347 SMCP_GotSelection: 1348 1348 pop bx 1349 mov ds:[bx], dl ; neue Partition setzen1349 mov ds:[bx], dl ; Set new partition 1350 1350 add si, LocIPT_Name ; Location of Name 1351 1351 push cs … … 1564 1564 SETUPMAGIC_ChangeFloppyDisplay Proc Near Uses cx dx si es di 1565 1565 call SETUPMAGIC_EnableDisable ; forward call 1566 cmp CFG_PartDefault, 0FFh ; Default-Selection is us?1566 cmp byte ptr [CFG_PartDefault], 0FFh ; Default-Selection is us? 1567 1567 jne SMCFD_Done 1568 1568 xor ch, ch … … 1590 1590 jnz SMCBBS_Enabled 1591 1591 mov si, offset TXT_SETUP_MAGIC_Disabled 1592 cmp CFG_PartDefault, 0FEh ; Default-Selection is us?1592 cmp byte ptr [CFG_PartDefault], 0FEh ; Default-Selection is us? 1593 1593 jne SMCBBS_CopyThiz 1594 1594 mov CFG_PartDefault, dl ; Reset Default-Selection to 1st part -
trunk/BOOTCODE/SETUP/PART_SET.ASM
r45 r46 602 602 call VideoIO_Locate ; Goes to CX 603 603 604 mov ChangePartNameSave, 0 ; Don't save to BR / LVM Sector604 mov byte ptr [ChangePartNameSave], 0 ; Don't save to BR / LVM Sector 605 605 606 606 ; We compare, if our IPT contains the same partition name as in BR or LVM … … 612 612 mov bh,0 613 613 614 cmp [PartitionVolumeLetters+bx], 0 ; ==0 means not supported by LVM614 cmp byte ptr [PartitionVolumeLetters+bx], 0 ; ==0 means not supported by LVM 615 615 je PSCPN_NotLVMSupported 616 616 … … 618 618 ; Load LVM-Sector here and seek to PartitionName 619 619 ; Set CurPartition_Location information of destination partition 620 mov ax, wptr[si+LocIPT_AbsolutePartTable]621 mov wptr[CurPartition_Location+0], ax622 mov ax, wptr[si+LocIPT_AbsolutePartTable+2]623 mov wptr[CurPartition_Location+2], ax624 mov ah, b ptr [si+LocIPT_LocationPartTable+0]625 mov al, [si+LocIPT_Drive]626 mov wptr[CurPartition_Location+4], ax627 mov ax, wptr[si+LocIPT_LocationPartTable+1]628 mov wptr[CurPartition_Location+6], ax620 mov ax, [si+LocIPT_AbsolutePartTable] 621 mov [CurPartition_Location+0], ax 622 mov ax, [si+LocIPT_AbsolutePartTable+2] 623 mov [CurPartition_Location+2], ax 624 mov ah, byte ptr [si+LocIPT_LocationPartTable+0] 625 mov al, byte ptr [si+LocIPT_Drive] 626 mov [CurPartition_Location+4], ax 627 mov ax, [si+LocIPT_LocationPartTable+1] 628 mov [CurPartition_Location+6], ax 629 629 mov di, si ; Put SI into DI 630 630 call DriveIO_LoadLVMSector 631 631 jnc PSCPN_LVMGotError ; Security again, if problem -> halt 632 632 push dx 633 mov ax, wptr[di+LocIPT_AbsoluteBegin]634 mov dx, wptr[di+LocIPT_AbsoluteBegin+2]633 mov ax, [di+LocIPT_AbsoluteBegin] 634 mov dx, [di+LocIPT_AbsoluteBegin+2] 635 635 call LVM_SearchForPartition 636 636 pop dx … … 657 657 ; Load Boot-Record... 658 658 push dx 659 mov ax, wptr[si+LocIPT_AbsoluteBegin+0]660 mov bx, wptr[si+LocIPT_AbsoluteBegin+2]659 mov ax, [si+LocIPT_AbsoluteBegin+0] 660 mov bx, [si+LocIPT_AbsoluteBegin+2] 661 661 mov cx, [si+LocIPT_LocationBegin+1] 662 662 mov dh, [si+LocIPT_LocationBegin+0] … … 696 696 697 697 ; Do no synchronization initially. 698 mov [SyncLvmLabels],0698 mov byte ptr [SyncLvmLabels],0 699 699 700 700 ; SI = IPT_Enty, DI points to LVM VolumeName. … … 729 729 repe cmpsb ; Compare V and P labels 730 730 jnz LVM_Labels_not_equal 731 mov [SyncLvmLabels],1 ; Same so set flag for later731 mov byte ptr [SyncLvmLabels],1 ; Same so set flag for later 732 732 LVM_Labels_not_equal: 733 733 pop di … … 744 744 jne PSCPN_LetUserEditPartName ; -> No BR/LVM Changing/Saving 745 745 746 mov ChangePartNameSave, 1 ; Remember, so we will save to BR746 mov byte ptr [ChangePartNameSave], 1 ; Remember, so we will save to BR 747 747 748 748 ; SI = IPT_Enty, DI points to LVM PartitionName. … … 754 754 jnc PSCPN_AllDone ; Did user abort ? 755 755 756 test ChangePartNameSave, 1756 test byte ptr [ChangePartNameSave], 1 757 757 jz PSCPN_AllDone ; Actually we just skip BR/LVM-Save 758 758 … … 763 763 mov bh,0 764 764 765 cmp [PartitionVolumeLetters+bx], 0 ; ==0 means not supported by LVM765 cmp byte ptr [PartitionVolumeLetters+bx], 0 ; ==0 means not supported by LVM 766 766 je PSCPN_SaveBootRecord 767 767 … … 814 814 815 815 ; See if LVM-labels need to be synced. 816 test [SyncLvmLabels],1816 test byte ptr [SyncLvmLabels],1 817 817 jz LVM_no_sync_labels 818 818 … … 869 869 ; If Partition Selected Left-Side -> go Right-Sided Window 870 870 ; otherwise Left-Sided. 871 mov PartSetup_ActivePart, dl871 mov [PartSetup_ActivePart], dl 872 872 mov ax, 0102h 873 873 and dl, 1 … … 875 875 mov ax, 002Ah 876 876 PHSM_FirstStep: 877 mov PartSetup_HiddenX, al878 mov PartSetup_HiddenAdd, ah877 mov [PartSetup_HiddenX], al 878 mov [PartSetup_HiddenAdd], ah 879 879 880 880 ; Draw Menu... 881 881 xor dx, dx 882 mov PartSetup_HiddenUpper, dl882 mov [PartSetup_HiddenUpper], dl 883 883 call PARTHIDESETUP_DrawMenuBase 884 884 call PARTHIDESETUP_RefreshPartitions … … 919 919 PHSM_KeyESC: 920 920 ; Collect Hide-Partition-Config and put it into Hide-Table 921 mov dl, PartSetup_ActivePart921 mov dl, [PartSetup_ActivePart] 922 922 923 923 IFDEF AUX_DEBUG … … 977 977 call VideoIO_Color 978 978 mov bh, 05h 979 mov bl, PartSetup_HiddenX979 mov bl, [PartSetup_HiddenX] 980 980 mov dh, 10h 981 981 mov dl, bl 982 982 add dl, 25h 983 add dl, PartSetup_HiddenAdd983 add dl, [PartSetup_HiddenAdd] 984 984 push bx 985 985 call VideoIO_MakeWindow … … 1010 1010 ; --- Make Window-Footer - "State when booting..." at bottom right frame-line 1011 1011 mov dh, 10h 1012 mov dl, PartSetup_HiddenX1012 mov dl, [PartSetup_HiddenX] 1013 1013 add dl, 25h 1014 add dl, PartSetup_HiddenAdd; Location 16, HiddenX->right aligned1014 add dl, [PartSetup_HiddenAdd] ; Location 16, HiddenX->right aligned 1015 1015 mov si, offset TXT_SETUP_HideFeature2 1016 1016 call GetLenOfString ; CX - Length of HideFeature2 1017 1017 sub dl, cl ; Adjust Position 1018 1018 push dx 1019 mov dl, PartSetup_ActivePart1019 mov dl, [PartSetup_ActivePart] 1020 1020 call PART_GetPartitionPointer ; Holt den Pointer der Partition (DL) nach SI 1021 1021 pop dx … … 1080 1080 ; Draw all partitions to Hidden-Setup aka Dynamic Content-Draw 1081 1081 PARTHIDESETUP_RefreshPartitions Proc Near Uses dx 1082 mov dl, PartSetup_HiddenUpper1082 mov dl, [PartSetup_HiddenUpper] 1083 1083 mov dh, 8 1084 1084 PHSRP_Loop: … … 1095 1095 call VideoIO_Color 1096 1096 mov cx, 0603h ; 6, +3 1097 add cl, PartSetup_HiddenX1098 mov dl, PartSetup_HiddenUpper1097 add cl, [PartSetup_HiddenX] 1098 mov dl, [PartSetup_HiddenUpper] 1099 1099 call PARTSETUP_UpperScrollMarker 1100 1100 add cl, 29 1101 add cl, PartSetup_HiddenAdd; 6, +291101 add cl, [PartSetup_HiddenAdd] ; 6, +29 1102 1102 call PARTSETUP_UpperScrollMarker 1103 1103 mov cx, 0F03h ; 15, +3 1104 add cl, PartSetup_HiddenX1104 add cl, [PartSetup_HiddenX] 1105 1105 add dl, 8 ; add 8 -> points to last partition 1106 mov dh, CFG_Partitions; Limit1106 mov dh, [CFG_Partitions] ; Limit 1107 1107 call PARTSETUP_LowerScrollMarker 1108 1108 add cl, 29 1109 add cl, PartSetup_HiddenAdd; 6, +291109 add cl, [PartSetup_HiddenAdd] ; 6, +29 1110 1110 call PARTSETUP_LowerScrollMarker 1111 1111 ret … … 1115 1115 local NoOfPart :byte 1116 1116 mov ch, dl 1117 sub ch, PartSetup_HiddenUpper1117 sub ch, [PartSetup_HiddenUpper] 1118 1118 add ch, 7 1119 1119 mov cl, 2 1120 add cl, PartSetup_HiddenX1120 add cl, [PartSetup_HiddenX] 1121 1121 ; We got location 1122 1122 mov NoOfPart, dl … … 1130 1130 pop cx 1131 1131 1132 cmp dl, CFG_Partitions1132 cmp dl, [CFG_Partitions] 1133 1133 jae PHSDPI_NoData 1134 1134 … … 1222 1222 xor dh, dh 1223 1223 PHSBCB_NoUnderflow: 1224 cmp dh, CFG_Partitions1224 cmp dh, [CFG_Partitions] 1225 1225 jb PHSBCB_NoOverflow 1226 mov dh, CFG_Partitions1226 mov dh, [CFG_Partitions] 1227 1227 dec dh 1228 1228 PHSBCB_NoOverflow: … … 1230 1230 1231 1231 ; Do we need to scroll ? 1232 mov al, PartSetup_HiddenUpper1232 mov al, [PartSetup_HiddenUpper] 1233 1233 cmp dl, al 1234 1234 jb PHSBCB_YesScrolling … … 1238 1238 mov al, dl 1239 1239 sub al, 7 1240 mov PartSetup_HiddenUpper, al1240 mov [PartSetup_HiddenUpper], al 1241 1241 call PARTHIDESETUP_RefreshPartitions 1242 1242 jmp PHSBCB_NoScrolling 1243 1243 PHSBCB_YesScrolling: 1244 1244 mov al, dl 1245 mov PartSetup_HiddenUpper, al1245 mov [PartSetup_HiddenUpper], al 1246 1246 call PARTHIDESETUP_RefreshPartitions 1247 1247 PHSBCB_NoScrolling: … … 1263 1263 mov bh, cl ; Color to BH 1264 1264 ; First calculate location of bar 1265 cmp dl, PartSetup_HiddenUpper1265 cmp dl, [PartSetup_HiddenUpper] 1266 1266 jb PHSRCP_NotInWindowView 1267 1267 mov ch, dl 1268 sub ch, PartSetup_HiddenUpper; CH - Position relative to HiddenUpper1268 sub ch, [PartSetup_HiddenUpper] ; CH - Position relative to HiddenUpper 1269 1269 cmp ch, 8 ; 8 - Maximum Total in Window 1270 1270 jae PHSRCP_NotInWindowView 1271 1271 add ch, 7 1272 1272 mov cl, 26 1273 add cl, PartSetup_HiddenX1274 add cl, PartSetup_HiddenAdd1273 add cl, [PartSetup_HiddenX] 1274 add cl, [PartSetup_HiddenAdd] 1275 1275 1276 1276 mov bl, 10 ; Length of Bar is 10 … … 1315 1315 ; each points to a partition. 1316 1316 ; 3Fh is end-marker / maximum entries = CFG_Partitions 1317 mov cl, CFG_Partitions1317 mov cl, [CFG_Partitions] 1318 1318 mov bx,di ; Pointer to hidden-parts entry for this partition. 1319 1319 mov ch,0 ; Start index in hidden-parts entry for this partition. … … 1374 1374 mov si, offset PartitionTable 1375 1375 xor ch, ch ; Partition index 1376 mov cl, CFG_Partitions; Nr. of partitions in IPT1376 mov cl, [CFG_Partitions] ; Nr. of partitions in IPT 1377 1377 mov ah,0 ; Next hide-index to write. 1378 1378 … … 1523 1523 mov bh,0 1524 1524 1525 mov dl, b ptr [DriveLetters+bx]1525 mov dl, byte ptr [DriveLetters+bx] 1526 1526 1527 1527 push bx … … 1625 1625 call VideoIO_Color 1626 1626 mov bh, 06h 1627 mov bl, PartSetup_HiddenX1627 mov bl, [PartSetup_HiddenX] 1628 1628 mov dh, 0Ah 1629 1629 mov dl, bl … … 1698 1698 push dx 1699 1699 mov cx, 0805h ; Position 8, 5 1700 add cl, PartSetup_HiddenX1700 add cl, [PartSetup_HiddenX] 1701 1701 call VideoIO_Locate 1702 1702 add cl, 6 ; Everything centered (12/2)
Note:
See TracChangeset
for help on using the changeset viewer.
