Changeset 38 for trunk/BOOTCODE/REGULAR
- Timestamp:
- Apr 11, 2014, 9:36:56 PM (12 years ago)
- Location:
- trunk/BOOTCODE/REGULAR
- Files:
-
- 8 edited
-
BOOTMENU.ASM (modified) (7 diffs)
-
DRIVEIO.ASM (modified) (10 diffs)
-
OTHER.ASM (modified) (3 diffs)
-
PARTMAIN.ASM (modified) (10 diffs)
-
PARTSCAN.ASM (modified) (10 diffs)
-
PASSWORD.ASM (modified) (1 diff)
-
STD_TEXT.ASM (modified) (1 diff)
-
VIDEOIO.ASM (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BOOTCODE/REGULAR/BOOTMENU.ASM
r37 r38 718 718 ; Will Set some Vars after user selected entry to boot... 719 719 ; ...don't select Straight View ! 720 BOOTMENU_SetVarsAfterMenu Proc Near 720 BOOTMENU_SetVarsAfterMenu Proc Near Uses 721 721 ; No Straight View in here...we got filtered view since BootMenu-Startup... 722 722 mov al, CFG_RememberTimed … … 780 780 jz BME_NoTimedBoot 781 781 ; ------------------------------------------------ TIMED BOOT 782 push ax 783 push dx 782 push ax dx 784 783 call TIMER_GetTicCount 785 784 mov dx, word ptr [TimedTimeOut] … … 794 793 cmp al, 0 795 794 jne BME_NoTimeOut 796 pop dx 797 pop ax 795 pop dx ax 798 796 mov dl, Menu_EntryDefault 799 797 and CFG_TimedBootLast, 1 … … 807 805 808 806 BME_NoTimeOut: 809 pop dx 810 pop ax 807 pop dx ax 811 808 BME_NoTimedBoot: 812 809 ; ------------------------------------------------ FLOPPY-NAME TIMER … … 814 811 jz BME_NoFloppyNameTimer 815 812 ; Wait 2 Seconds everytime 816 push ax 817 push dx 813 push ax dx 818 814 call TIMER_GetTicCount 819 815 cmp dx, wptr [FloppyGetNameTimer+2] … … 823 819 BME_ExpiredGetFloppy: 824 820 call BOOTMENU_ResetGetFloppy 825 pop dx 826 pop ax 821 pop dx ax 827 822 jmp BME_RefreshFloppyName 828 823 BME_NoFloppyNameExpired: 829 pop dx 830 pop ax 824 pop dx ax 831 825 BME_NoFloppyNameTimer: 832 826 ; ------------------------------------------------ KEYBOARD … … 854 848 int 16h 855 849 pop dx 856 cmp ah, Keys_E NTER850 cmp ah, Keys_Enter 857 851 je BME_KeyEnter 858 852 cmp ah, Keys_F10 -
trunk/BOOTCODE/REGULAR/DRIVEIO.ASM
r37 r38 153 153 154 154 DriveIO_GetHardDriveCount Proc Near Uses ds si 155 push ds 156 push si 155 push ds si 157 156 push 0040h 158 157 pop ds 159 158 mov si, 0075h 160 159 mov dh, ds:[si] ; 40:75 -> POST: Total Harddiscs == DL 161 pop si 162 pop ds 160 pop si ds 163 161 mov TotalHarddiscs, dh 164 162 ret … … 175 173 mov dl, 80h 176 174 DIOILUT_DriveLoop: 177 push dx 178 push di 175 push dx di 179 176 mov ah, 08h 180 177 int 13h ; DISK - GET DRIVE PARAMETERS … … 193 190 ; bit 16-23 of the LBA address 194 191 DIOILUT_Error: 195 pop di 196 pop dx 192 pop di dx 197 193 mov bptr ds:[di], ah ; Save that value 198 194 inc di ; Go to next BYTE … … 210 206 ; Rousseau: Enhanced to handle sector-numbers 127 and 255 besides 63 for LVM-info sectors. 211 207 ; Ugly, need to cleanup. 212 DriveIO_LVMAdjustToInfoSector Proc Near 208 DriveIO_LVMAdjustToInfoSector Proc Near Uses 213 209 214 210 … … 475 471 DriveIO_LVMAdjustToInfoSector EndP 476 472 477 drive db 'drive : ',0478 before_lvm_adjust db 'before lvm adjust : ',0479 after_lvm_adjust db 'after lvm adjust : ',0480 before_lvm_adjust_log db 'before lvm logical adjust: ',0481 after_lvm_adjust_log db 'after lvm logical adjust : ',0482 spt_used db 'spt used : ',0473 drive: db 'drive : ',0 474 before_lvm_adjust: db 'before lvm adjust : ',0 475 after_lvm_adjust: db 'after lvm adjust : ',0 476 before_lvm_adjust_log: db 'before lvm logical adjust: ',0 477 after_lvm_adjust_log: db 'after lvm logical adjust : ',0 478 spt_used: db 'spt used : ',0 483 479 484 480 … … 555 551 556 552 ; Keeps DS:SI for caller 557 DriveIO_LoadTmpSector Proc Near 553 DriveIO_LoadTmpSector Proc Near Uses 558 554 mov si, offset TmpSector 559 555 call DriveIO_LoadSector ; Uses INT13X if needed … … 562 558 563 559 ; Keeps DS:SI for caller 564 DriveIO_SaveTmpSector Proc Near 560 DriveIO_SaveTmpSector Proc Near Uses 565 561 mov si, offset TmpSector 566 562 call DriveIO_SaveSector … … 630 626 631 627 ; Memory-Block that holds information for LBA-access via INT 13h 632 DriveIO_DAP db 10h ; Size of paket628 DriveIO_DAP: db 10h ; Size of paket 633 629 db 0 ; Reserved 634 630 DriveIO_DAP_NumBlocks dw 0 ; Number of blocks … … 656 652 mov bptr [si+5], dl 657 653 call MBR_Teletype 658 659 ; JWasm: cannot jump to local label in procedure. 660 ; Changed to halt here. 661 ;jmp MBRLE_Halt 662 DriveIO_GotLoadError_halt: 663 jmp DriveIO_GotLoadError_halt 654 jmp MBRLE_Halt 664 655 DriveIO_GotLoadError EndP 665 656 … … 1246 1237 1247 1238 ; Values for sectors per track table corresponding to DriveIO_IsHugeDrive return value. 1248 secs_per_track_table db 63,127,255,255,255,2551239 secs_per_track_table: db 63,127,255,255,255,255 1249 1240 1250 1241 ;db_lmlvm: db 'Load Master LVM -- disk: ',0 -
trunk/BOOTCODE/REGULAR/OTHER.ASM
r37 r38 83 83 GetLenOfStrings EndP 84 84 85 PRECRAP_Main Proc Near 85 PRECRAP_Main Proc Near Uses 86 86 ; First initialize Variable-Area (everything with NUL) 87 87 mov di, offset BeginOfVariables … … 264 264 265 265 MBR_Main_BootThrough: 266 call MBR_Tele type266 call MBR_TeleType 267 267 xor si,si 268 268 call MBR_TeletypeNL … … 357 357 358 358 359 AFTERCRAP_Main Proc Near 359 AFTERCRAP_Main Proc Near Uses 360 360 ; =================================================== 361 361 ; Now get volume label of FloppyDrive, if wanted... -
trunk/BOOTCODE/REGULAR/PARTMAIN.ASM
r37 r38 114 114 call PART_GetPartitionPointer ; Gets SI for partition DL 115 115 mov al, ds:[si+LocIPT_Flags] 116 and al, Flags_Boot able116 and al, Flags_BootAble 117 117 jnz PFUPN_Found 118 118 dec cl … … 290 290 ; In: DL - Number of partition in filtered view 291 291 ; Out: DL - Number of partition in straight view 292 PART_ConvertToStraight Proc Near 292 PART_ConvertToStraight Proc Near Uses 293 293 ;movzx bx, dl 294 294 mov bl,dl ; partition number to bl … … 928 928 929 929 PSP_ForceI13X: 930 push es 931 push di 932 push si 930 push es di si 933 931 934 932 ; Setup ES and FS. … … 954 952 mov wptr es:[di+06], ax 955 953 956 pop si 957 pop di 958 pop es 954 pop si di es 959 955 960 956 … … 1155 1151 jz PSP_NoMBRprotect 1156 1152 ; -------------------------------------------------- INSTALLS MBR-PROTECTION 1157 ; We need DS:SI later... 1158 push ds 1159 push si 1153 push ds si ; We need DS:SI later... 1160 1154 ; First subtract 1024 bytes from Base-Memory... 1161 1155 push ds … … 1201 1195 mov ds:[si+2], dx ; Vector hardcoded at DS:0009 1202 1196 ; MBR-Protection now active :) 1203 ; Restore DS:SI 1204 pop si 1205 pop ds 1197 pop si ds ; Restore DS:SI 1206 1198 1207 1199 … … 1287 1279 mov ax,bx 1288 1280 call VideoIO_PrintHexWord 1289 mov ax,[si+LocIPT_AbsolutePartTable+02]1290 call VideoIO_PrintHexWord1291 mov ax,[si+LocIPT_AbsolutePartTable+00]1292 call VideoIO_PrintHexWord1293 mov al,[ExtendedAbsPosSet]1294 call VideoIO_PrintHexByte1295 1281 popa 1296 1282 … … 1308 1294 1309 1295 ; 1310 ; Update the phys-disk field 1311 ; DI points to PartitionSector 1312 ; BX holds index to phys-disk field 1296 ; Update the phys-drive field 1313 1297 ; 1314 1298 mov al,byte ptr [si+LocIPT_Drive] … … 1683 1667 ;popa 1684 1668 1685 ;~ jmp skip_delay 1686 1687 1688 ; 1689 ; Show "wait dots" 1690 ; 1691 pusha 1692 ; Color white on black 1693 mov ch,7 1694 mov cl,0 1695 call VideoIO_Color 1696 ; Locate cursor for output of debug-info 1697 mov ch,8 1698 mov cl,1 1699 call VideoIO_Locate 1700 1701 ; Print dots with interval. 1702 mov cx,10 1703 print_next_dot: 1704 mov al,'.' 1705 call VideoIO_PrintSingleChar 1706 ; Value 30 is about 1.5 seconds 1707 mov al,1 1669 1670 ; About 1.5 seconds 1671 mov al,30 1708 1672 call TIMER_WaitTicCount 1709 loop print_next_dot1710 popa1711 1712 ;1713 ; Enter here to skip delay.1714 ;1715 skip_delay:1716 1717 1718 1673 1719 1674 ; … … 2122 2077 ; CY = Set if BOOTMGR found, clear if not 2123 2078 ; 2124 ;PART_IsWinBMGR Proc Near Uses ax bx cx dx si di ds es2125 ; 2126 ;; Load specified LBA sector (BX:CX) from the disk in DL2127 ;mov di,ds2128 ;mov si,offset [TmpSector]2129 ;call DriveIO_LoadSectorLBA2130 2131 ;; Point to location of 'BOOTMGR' signature.2132 ;add si,169h2133 2134 ;; DL holds equality status2135 ;xor dl,dl2136 ;cld2137 2138 ;; Load letter into AL, xor with letter will result 0 if the same.2139 ;; Then or to DL.2140 ;; If at the end of the sequence DL is zero, the signature is present.2141 ;lodsb2142 ;xor al,'B'2143 ;or dl,al2144 ;lodsb2145 ;xor al,'O'2146 ;or dl,al2147 ;lodsb2148 ;xor al,'O'2149 ;or dl,al2150 ;lodsb2151 ;xor al,'T'2152 ;or dl,al2153 ;lodsb2154 ;xor al,'M'2155 ;or dl,al2156 ;lodsb2157 ;xor al,'G'2158 ;or dl,al2159 ;lodsb2160 ;xor al,'R'2161 ;or dl,al2162 2163 ;; Assume not present2164 ;clc2165 ;jnz PART_IsWinBMGR_exit2166 2167 ;; BOOTMGR signature found2168 ;stc2169 2170 ;PART_IsWinBMGR_exit:2171 ;ret2172 ;PART_IsWinBMGR Endp2079 PART_IsWinBMGR Proc Near Uses ax bx cx dx si di ds es 2080 2081 ; Load specified LBA sector (BX:CX) from the disk in DL 2082 mov di,ds 2083 mov si,offset [TmpSector] 2084 call DriveIO_LoadSectorLBA 2085 2086 ; Point to location of 'BOOTMGR' signature. 2087 add si,169h 2088 2089 ; DL holds equality status 2090 xor dl,dl 2091 cld 2092 2093 ; Load letter into AL, xor with letter will result 0 if the same. 2094 ; Then or to DL. 2095 ; If at the end of the sequence DL is zero, the signature is present. 2096 lodsb 2097 xor al,'B' 2098 or dl,al 2099 lodsb 2100 xor al,'O' 2101 or dl,al 2102 lodsb 2103 xor al,'O' 2104 or dl,al 2105 lodsb 2106 xor al,'T' 2107 or dl,al 2108 lodsb 2109 xor al,'M' 2110 or dl,al 2111 lodsb 2112 xor al,'G' 2113 or dl,al 2114 lodsb 2115 xor al,'R' 2116 or dl,al 2117 2118 ; Assume not present 2119 clc 2120 jnz PART_IsWinBMGR_exit 2121 2122 ; BOOTMGR signature found 2123 stc 2124 2125 PART_IsWinBMGR_exit: 2126 ret 2127 PART_IsWinBMGR Endp 2173 2128 2174 2129 -
trunk/BOOTCODE/REGULAR/PARTSCAN.ASM
r37 r38 28 28 ; here. 29 29 30 PARTSCAN_ScanForPartitions Proc Near 30 PARTSCAN_ScanForPartitions Proc Near Uses 31 31 ; Reset X-Reference 32 32 call PARTSCAN_ResetXref … … 120 120 ; Falls eine fehlerhafte Partition gefunden wird, wird abgebrochen. 121 121 ; falls eine Extended Partition (DOS) gefunden wird, wird erneut gescannt. 122 PARTSCAN_ScanDriveForPartitions Proc Near 122 PARTSCAN_ScanDriveForPartitions Proc Near Uses 123 123 xor ax, ax 124 124 xor bx, bx ; Location Absoluter Sektor 0 … … 283 283 ; First check, if LVM Information Sector is available and this partition 284 284 ; is supported. 285 push ax 286 push dx 287 push si 288 push di 285 push ax dx si di 289 286 mov si, wptr [PartPtr] 290 287 mov ax, wptr [si+LocBRPT_RelativeBegin] ; Absolute Sector … … 338 335 339 336 PCCTP_NoIbmBm: 340 pop di 341 pop si 342 pop dx 343 pop ax 337 pop di si dx ax 344 338 mov si, offset MBR_NoName_Patched 345 339 xor ah, ah ; no Flags_NoPartName … … 347 341 348 342 PCCTP_CheckBootRecord: 349 pop di 350 pop si 351 pop dx 352 pop ax 343 pop di si dx ax 353 344 test ah, FileSysFlags_NoName ; No-Name-Flag ? -> No Partition Name 354 345 … … 400 391 ; Now compare IPT with current Partition 401 392 mov cx, 15 ; Serial&Name (15-Bytes) 402 push si 403 push di 393 push si di 404 394 repz cmpsb 405 pop di 406 pop si 395 pop di si 407 396 408 397 jne PCCTP_NoMatchYet … … 426 415 ; Now compare IPT with current Partition 427 416 mov cx, 11 ; Name only (11-Bytes) 428 push si 429 push di 417 push si di 430 418 add si, 4 431 419 add di, 4 ; Skip over Serial-Field 432 420 repz cmpsb 433 pop di 434 pop si 421 pop di si 435 422 jne PCCTP_NameNoMatch 436 423 mov cx, [si+0] ; Get Serial … … 501 488 ; Build a standard-Volume Label from FileSystemNamePtr 502 489 ; We have to call SearchFileSysName again because of NTFS 503 push ax 504 push cx 490 push ax cx 505 491 mov al, dh 506 492 call PART_SearchFileSysName ; We want SI here <- FileSystemNamePtr … … 515 501 stosb ; Fill last 3 bytes with "NUL" 516 502 mov si, offset MBR_NoName_Patched 517 pop cx 518 pop ax 503 pop cx ax 519 504 ;======================================================= 520 505 ; LOCATION SEARCH in IPT-Table … … 827 812 PARTSCAN_SyncHideConfigWithXref EndP 828 813 829 ibm_bm_name db 'OS2 BootMgr',0830 ;win_bm_name: db 'BOOTMGR',0814 ibm_bm_name: db 'OS2 BootMgr',0 815 ;win_bm_name: db 'BOOTMGR',0 -
trunk/BOOTCODE/REGULAR/PASSWORD.ASM
r37 r38 142 142 PASSWORD_AskSpecifiedPassword EndP 143 143 144 PasswordSpace db 16 dup (0) ; Space for Password-Encoding...144 PasswordSpace: db 16 dup (0) ; Space for Password-Encoding... 145 145 dw 0BABEh ; All of these 8 bytes are insider 146 146 dw 0FC77h ; jokes. I bet no one will solve -
trunk/BOOTCODE/REGULAR/STD_TEXT.ASM
r37 r38 40 40 ;Copyright db ' AiR-BOOT v1.0.8-internal-beta - ** !! NOT FOR DISTRIBUTION !! **', 0 41 41 ;Copyright db ' AiR-BOOT v1.0.8 - (c) 2012 M. Kiewitz <<Release Candidate>> (build: #18)', 0 42 ;Copyright db ' AiR-BOOT v1.0.8 - (c) 2012 M. Kiewitz <<Release Candidate 1>> (bld: 20120124)', 0 43 Copyright db ' AiR-BOOT v1.0.8 - (c) 2012 M. Kiewitz <<Release Candidate 2>> (bld: 20120214)', 0 42 Copyright db ' AiR-BOOT v1.0.8 - (c) 2012 M. Kiewitz <<Release Candidate 1>> (bld: 20120124)', 0 44 43 ;Copyright db ' AiR-BOOT v1.0.8 - (c) 1998-2012 M. Kiewitz, Dedicated to Gerd Kiewitz', 0 45 46 ; Message in case the user wants to edit the label of a type 0x35 partition47 TXT_SETUP_NoEditType35 db 'The label of an LVM-Data partition cannot be edited', 048 ; Message in case the user wants to make a type 0x35 partition bootable49 TXT_SETUP_NoBootType35 db 'An LVM-Data partition cannot be set bootable', 050 44 51 45 ; Rousseau: switch around -
trunk/BOOTCODE/REGULAR/VIDEOIO.ASM
r37 r38 24 24 ENDIF 25 25 26 VideoIO_WaitRetrace Proc Near Uses ax dx27 mov dx, 3DAh28 VIOWR_Jump1:29 in al, dx30 test al, 831 jnz VIOWR_Jump132 VIOWR_Jump2:33 in al, dx34 test al, 835 jz VIOWR_Jump236 ret37 VideoIO_WaitRetrace EndP26 VideoIO_WaitRetrace Proc Near Uses ax dx 27 mov dx, 3DAh 28 VIOWR_Jump1: 29 in al, dx 30 test al, 8 31 jnz VIOWR_Jump1 32 VIOWR_Jump2: 33 in al, dx 34 test al, 8 35 jz VIOWR_Jump2 36 ret 37 VideoIO_WaitRetrace EndP 38 38 39 39 … … 41 41 ; Holds the current position. Yeah, I know this is in the code area, but who 42 42 ; cares :)) 43 TextPosY db0h44 TextPosX db0h45 TextColorFore db7h46 TextColorBack db0h43 TextPosY db 0h 44 TextPosX db 0h 45 TextColorFore db 7h 46 TextColorBack db 0h 47 47 48 48 ; In: CH - Cursor Column, CL - Cursor Row (Start at 1,1) 49 49 ; Destroyed: None 50 VideoIO_Locate Proc Near Uses cx51 or ch, ch52 jz VIOL_IgnoreY53 dec ch54 mov TextPosY, ch55 VIOL_IgnoreY:56 or cl, cl57 jz VIOL_IgnoreX58 dec cl59 mov TextPosX, cl60 VIOL_IgnoreX:61 ret62 VideoIO_Locate EndP50 VideoIO_Locate Proc Near Uses cx 51 or ch, ch 52 jz VIOL_IgnoreY 53 dec ch 54 mov TextPosY, ch 55 VIOL_IgnoreY: 56 or cl, cl 57 jz VIOL_IgnoreX 58 dec cl 59 mov TextPosX, cl 60 VIOL_IgnoreX: 61 ret 62 VideoIO_Locate EndP 63 63 64 64 ; In: CH - Cursor Column, CL - Center Cursor Row (Start at 1,1) … … 549 549 cmp ah, Keys_ESC 550 550 je VIOLUES_KeyESC 551 cmp ah, Keys_E NTER551 cmp ah, Keys_Enter 552 552 je VIOLUES_KeyENTER 553 553 cmp ah, Keys_Backspace … … 836 836 837 837 ; Disk Info to Dump to AB LogScreen 838 Disk db "DISK ",0839 ;BiosCyls db "Cyls :",0840 BiosHeads db "Heads :",0841 BiosSecs db "Secs :",0842 LvmSecs db "SecsLVM :",0843 BiosLBA db "LBA Secs:",0844 845 846 HugeBootDisk db "Boot Disk is Huge : ",0847 DisksFound db "Disks Found : ",0848 PartitionsFound db "Partitions Found : ",0849 ;AutoStartPart db "Auto Start Partition : ",0850 851 Phase1 db "eCS Install Phase 1 : ",0852 853 854 ShowMenu db "Press TAB to return to the AiR-BOOT Menu",0855 ;ShowBootLog db "Press TAB to see the Boot Log...",0856 857 Yes db "YES",0858 No db "NO",0859 On db "ON",0860 Off db "OFF",0861 None db "NONE",0862 Active db "ACTIVE",0863 NotActive db "NOT ACTIVE",0838 Disk: db "DISK ",0 839 ;BiosCyls: db "Cyls :",0 840 BiosHeads: db "Heads :",0 841 BiosSecs: db "Secs :",0 842 LvmSecs: db "SecsLVM :",0 843 BiosLBA: db "LBA Secs:",0 844 845 846 HugeBootDisk: db "Boot Disk is Huge : ",0 847 DisksFound: db "Disks Found : ",0 848 PartitionsFound: db "Partitions Found : ",0 849 ;AutoStartPart: db "Auto Start Partition : ",0 850 851 Phase1: db "eCS Install Phase 1 : ",0 852 853 854 ShowMenu: db "Press TAB to return to the AiR-BOOT Menu",0 855 ;ShowBootLog: db "Press TAB to see the Boot Log...",0 856 857 Yes: db "YES",0 858 No: db "NO",0 859 On: db "ON",0 860 Off: db "OFF",0 861 None: db "NONE",0 862 Active: db "ACTIVE",0 863 NotActive: db "NOT ACTIVE",0 864 864 865 865 ; New Line for use by MBR_Teletype 866 NL db 0dh, 0ah, 0866 NL: db 0dh, 0ah, 0
Note:
See TracChangeset
for help on using the changeset viewer.
