source: trunk/bootcode/regular/partscan.asm

Last change on this file was 213, checked in by Ben Rietbroek, 8 years ago

Fixed a small problem with too many partitions [v1.1.3-testing]

While no more partitions were scanned if the partition limit had been
reached, the scan-loop continued. This caused the error-box to popup
multiple times.

CAUTION:
This is a testbuild !
AirBoot uses the BIOS to access disks and a small coding error can trash
partition tables or other vital disk structures. You are advised to make
backups of TRACK0 and EBRs before using this testbuild. More info at:
https://rousseaux.github.io/netlabs.air-boot/pdf/AirBoot-v1.1.2-manual.pdf

File size: 44.5 KB
Line 
1; AiR-BOOT (c) Copyright 1998-2008 M. Kiewitz
2;
3; This file is part of AiR-BOOT
4;
5; AiR-BOOT is free software: you can redistribute it and/or modify it under
6; the terms of the GNU General Public License as published by the Free
7; Software Foundation, either version 3 of the License, or (at your option)
8; any later version.
9;
10; AiR-BOOT is distributed in the hope that it will be useful, but WITHOUT ANY
11; WARRANTY: without even the implied warranty of MERCHANTABILITY or FITNESS
12; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13; details.
14;
15; You should have received a copy of the GNU General Public License along with
16; AiR-BOOT. If not, see <http://www.gnu.org/licenses/>.
17;
18;---------------------------------------------------------------------------
19; AiR-BOOT / PARTiTiON SCANNING
20;---------------------------------------------------------------------------
21
22
23IFDEF MODULE_NAMES
24DB 'PARTSCAN',0
25ENDIF
26
27; Note: This is complex code. So make sure that you know what you are doing in
28; here.
29
30PARTSCAN_ScanForPartitions Proc Near
31
32IFDEF AUX_DEBUG
33 IF 1
34 DBG_TEXT_OUT_AUX 'PARTSCAN_ScanForPartitions:'
35 PUSHRF
36 ;~ call DEBUG_DumpRegisters
37 ;~ call AuxIO_DumpParagraph
38 ;~ call AuxIO_TeletypeNL
39 POPRF
40 ENDIF
41ENDIF
42
43 ; Reset X-Reference
44 call PARTSCAN_ResetXref
45
46 mov dh, [TotalHarddiscs]
47 xor al, al
48 mov [NewPartitions], al
49
50 mov byte ptr [CurIO_Scanning], 1 ; Set flag due scanning partitions
51 mov dl, 80h ; Is first harddisc
52 PSSFP_HarddiscLoop:
53
54
55
56; ========================================================= [ Scan Partitions ]
57
58
59 ; Save BIOS disk number
60 push dx
61
62 ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
63 ;!! THIS IS WHERE WE TRY TO DETECT LARGE FLOPPIES !
64 ;!! ---------------------------------------------------------------
65 ;!! This is a quick hack to ignore LARGE FLOPPY removable media.
66 ;!! With LARGE FLOPPY, the boot record will be a BPB instead of
67 ;!! an MBR. To distinguish, it is assumed that the MBR bootable
68 ;!! flag is either 00h or 80h. LARGE FLOPPIES will often have
69 ;!! other values there. So, the block below tests if all 4 entries
70 ;!! result in 0 when first ored together and then anded with 7fh.
71 ;!!
72 ;!! THIS IS NOT BULLET PROOF AND WILL BE ENHANCED IN THE FUTURE
73 ;!!
74 ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
75
76 ; Push the whole shebang
77 pusha
78
79 ; Check if this is a removable drive
80 call DriveIO_CalcDiskInfoPointer ; Pointer to DISKINFO
81 mov ax, [bx+LocDISKINFO_I13X_Flags] ; Get INT13X flags
82 test ax, 04h ; Bit 3=1 if removable
83 clc ; Assume fixed
84
85 ; Fixed drive, so skip further checking for LARGE FLOPPY.
86 ; We *DO* halt on broken partition tables !
87 ; This is needed because AiR-BOOT cannot continue with broken
88 ; tables on truly partitioned disks.
89 je @F
90
91
92 ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
93 ; !! THE DISK IS A REMOVABLE !
94 ; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
95
96
97IFDEF AUX_DEBUG
98 IF 0
99 DBG_TEXT_OUT_AUX 'test bigflop'
100 PUSHRF
101 ;~ call DEBUG_DumpRegisters
102 ;~ call AuxIO_DumpParagraph
103 ;~ call AuxIO_TeletypeNL
104 POPRF
105 ENDIF
106ENDIF
107
108 ; If it has LVM info, it must be partitioned and thus OK
109 mov al, [bx+LocDISKINFO_LVM_Secs] ; Get LVM_SPT
110 test al, al ; See if 0
111 clc ; Assume OK
112 jne @F ; LVM_SPT present, OK
113
114 ; Now load its boot sector and see if AiR-BOOT is there, if so, OK
115 mov si, offset [Scratch] ; Pointer to sector buffer
116 call DriveIO_LoadMBR ; Load it
117 test al, 08h ; AiR-BOOT signature found ?
118 clc ; Assume OK
119 jne @F ; AB found, must be partitioned
120
121 ; A zero sector is also OK -- ready to be partitioned by OS/2 ;)
122 call IsSectorBufferZero ; check if sector is all zeros
123 clc ; Assume OK
124 je @F ; Zero sector, OK
125
126 ; !! NOW WE TEST MBR BOOT FLAGS.
127 ; !! MOST LARGE FLOPPIES WILL HAVE DATA THERE.
128 ; !! NOT BULLET PROOF, NEEDS TO BE IMPROVED.
129 xor ax, ax ; Clear for oring and anding
130 add si, 01beh ; Advance to partition table
131 mov cx, 4 ; Four entries to test
132 cld ; Load upwards
133 __nxt:
134 lodsb ; Load Boot Flag (00h OR 80h)
135 or ah, al ; Merge all bits to AH
136 add si, 16 ; Point to next entry
137 loop __nxt ; Again if still entries to test
138
139 ; A LARGE FLOPPY with 00h or 80h bytes at these 4 locations
140 ; will PASS !!
141 and ah, 7fh ; Strip of potential Boot Flag
142 clc ; Assume OK
143 jz @F ; Good indication this is NOT a BPB, but...
144
145
146 ;!! The Boot Flag bytes were NOT either 00h or 80h, so this is
147 ;!! definintly not a partitioned disk.
148 ;!! SET CY TO INDICATE SKIPPING 'PARTSCAN_ScanDriveForPartitions'
149 stc
150
151 ; End of LARGE FLOPPY test
152 @@:
153
154 ; Restore the whole shebang
155 popa
156
157 ; CARRY IS SET, LARGE FLOPPY OR WHAT -- SKIP IT !!
158 jc @F
159
160 ; This disk should be partitioned, so scan it.
161 ; Broken partitions *DOS* halt AiR-BOOT !
162 call PARTSCAN_ScanDriveForPartitions
163
164 @@:
165
166
167 pop dx
168 inc dl
169 dec dh
170 jnz PSSFP_HarddiscLoop
171 mov byte ptr [CurIO_Scanning], 0 ; Reset flag due scanning complete
172
173IFDEF AUX_DEBUG
174 IF 0
175 PUSHRF
176 call DEBUG_DumpHidePartTables
177 POPRF
178 ENDIF
179ENDIF
180
181 ; Use X-Reference to sync NewPartitionTable with Hide-Config
182 call PARTSCAN_SyncHideConfigWithXref
183
184IFDEF AUX_DEBUG
185 IF 0
186 PUSHRF
187 call DEBUG_DumpHidePartTables
188 POPRF
189 ENDIF
190ENDIF
191
192 ; Now we copy the new IPT over the old one...
193 mov si, offset [NewPartTable]
194 mov di, offset [PartitionTable]
195 ;movzx ax, NewPartitions
196 mov al,NewPartitions
197 mov ah,0
198
199 mov CFG_Partitions, al
200 mov bl, LocIPT_LenOfIPT
201 mul bl
202 mov cx, ax
203 rep movsb
204
205 ; and the New Logical Drive Letter table as well...
206 mov si, offset [NewDriveLetters]
207 mov di, offset [DriveLetters]
208 mov cx, LocIPT_MaxPartitions
209 rep movsb
210
211 ; ...and finally check, if we need to set a Drive-Letter
212 mov dl, [AutoDrvLetter]
213 or dl, dl
214 jz PSSFP_NoAutoDriveLetter
215 ;movzx cx, CFG_Partitions
216 mov cl, [CFG_Partitions]
217 mov ch,0
218
219 or cx, cx
220 jz PSSFP_NoAutoDriveLetter
221 mov si, offset [PartitionTable]
222 mov di, offset [DriveLetters]
223 mov ax, word ptr [AutoDrvLetterSerial+00h]
224 mov bx, word ptr [AutoDrvLetterSerial+02h]
225 PSSFP_AutoDrvLetterLoop:
226 cmp ax, [si+LocIPT_Serial]
227 jne PSSFP_AutoDrvLetterNoMatch
228 cmp bx, [si+LocIPT_Serial+2]
229 jne PSSFP_AutoDrvLetterNoMatch
230 ; We got a match, so set Drive-Letter in DL
231 or bptr [si+LocIPT_Flags], Flags_DriveLetter
232 mov [di], dl
233 PSSFP_AutoDrvLetterNoMatch:
234 add si, LocIPT_LenOfIPT
235 inc di
236 loop PSSFP_AutoDrvLetterLoop
237 mov byte ptr [AutoDrvLetter], 0 ; Disable after processing...
238 PSSFP_NoAutoDriveLetter:
239 ret
240PARTSCAN_ScanForPartitions EndP
241
242
243
244;
245; This function reconnects a forced drive-letter with it's partition
246; when partitions are removed.
247;
248PARTSCAN_UpdateDriveLetters Proc
249
250IFDEF AUX_DEBUG
251 IF 0
252 DBG_TEXT_OUT_AUX 'PARTSCAN_UpdateDriveLetters:'
253 PUSHRF
254 ;~ call DEBUG_DumpRegisters
255 ;~ call AuxIO_DumpParagraph
256 ;~ call AuxIO_TeletypeNL
257 POPRF
258 ENDIF
259ENDIF
260
261 pusha
262 xor bx,bx ; index-pointer
263 xor cx,cx ; counter
264 xor dx,dx ; backup index-pointer
265 mov cl,LocIPT_MaxPartitions ; nr of entries to process
266 mov si,offset [PartitionXref] ; old-new relation table
267 mov di,offset [DriveLetters] ; forced drive-letters table
268
269 ;
270 ; Loop over each entry in the xref-table to see if the partition
271 ; has been removed or has been given a new index in the IPT.
272 ; A removed partition has 0ffh in it's slot and for a partition
273 ; that has a new index in the IPT the value at the slot is different
274 ; from the index of the slot in the xref-table.
275 ;
276 PARTSCAN_UpdateDriveLetters_next_entry:
277 jcxz PARTSCAN_UpdateDriveLetters_done
278 dec cl ; decrement counter
279 mov al,[si+bx] ; get possibly old index for this entry
280 mov dl,bl ; save current index
281 inc bl ; advance index-pointer
282 inc al ; 0ffh will become 0, part removed so continue
283 jz PARTSCAN_UpdateDriveLetters_next_entry
284
285 ;
286 ; If value in slot is the same as the index of the slot then
287 ; the partition has not moved in the IPT.
288 ;
289 dec al ; restore possibly out-of-date index
290 cmp al,dl ; same as array index? then ok, do next
291 je PARTSCAN_UpdateDriveLetters_next_entry
292
293;!
294;! DEBUG_PROBE
295;!
296IFDEF AUX_DEBUGx
297 push 1234h
298 call DEBUG_Probe
299ENDIF
300
301 ;
302 ; The partition has moved in the IPT so we lookup it's forced
303 ; drive-letter at the old location and put it at the new one.
304 ; The old location is identified by the index in the xref-table
305 ; and the new location is identified by the value at that index.
306 ; Thus, when no partitions have been deleted or added, the xref-table
307 ; contains the sequence 0,1,2,3,...,n,0ffh,0ffh, etc.
308 ; The value 0ffh means that no partition is using the slot.
309 ;
310 xor ah,ah ; no drive-letter
311 dec bl ; backup index-pointer one position
312 xchg ah,[di+bx] ; get drive-letter and store zero
313 xchg bl,al ; use slot value as new index
314 mov [di+bx],ah ; store drive-letter
315 xchg al,bl ; restore index-pointer
316 inc bl ; point to next entry
317 jmp PARTSCAN_UpdateDriveLetters_next_entry
318 PARTSCAN_UpdateDriveLetters_done:
319 popa
320 ret
321PARTSCAN_UpdateDriveLetters EndP
322
323
324
325
326; Scannt die Festplatte auf jegliche Partitionstabellen...
327; Falls eine fehlerhafte Partition gefunden wird, wird abgebrochen.
328; falls eine Extended Partition (DOS) gefunden wird, wird erneut gescannt.
329PARTSCAN_ScanDriveForPartitions Proc Near
330
331IFDEF AUX_DEBUG
332 IF 0
333 DBG_TEXT_OUT_AUX 'PARTSCAN_ScanDriveForPartitions:'
334 PUSHRF
335 ;~ call DEBUG_DumpRegisters
336 ;~ call AuxIO_DumpParagraph
337 ;~ call AuxIO_TeletypeNL
338 POPRF
339 ENDIF
340ENDIF
341
342 xor ax, ax
343 xor bx, bx ; Location Absoluter Sektor 0
344 mov cx, 0001h
345 xor dh, dh ; Location Zylinder 0, Side 0, Sektor 1 MBR
346 mov [ExtendedAbsPosSet], al
347 mov wptr [ExtendedAbsPos+0], ax
348 mov wptr [ExtendedAbsPos+2], ax
349 PSSDFP_LoadThisPartition:
350
351 call DriveIO_LoadPartition ; Load a partition record
352
353 jc PSSDFP_InvalidPartition
354
355 ; LVM Support - Reads LVM Information Sector
356 call DriveIO_LoadLVMSector ; Load LVM sector
357
358 call PARTSCAN_ScanPartition
359
360 call DriveIO_SavePartition
361
362 call PARTSCAN_ScanPartitionForExtended
363 jc PSSDFP_LoadThisPartition
364
365 PSSDFP_InvalidPartition:
366 ret
367PARTSCAN_ScanDriveForPartitions EndP
368
369; Scans Current Partition for Extended Partitions, if found, AX,BX,CX,DX will
370; be set to this location and Carry will be set
371PARTSCAN_ScanPartitionForExtended Proc Near Uses si
372
373IFDEF AUX_DEBUG
374 IF 0
375 DBG_TEXT_OUT_AUX 'PARTSCAN_ScanPartitionForExtended:'
376 PUSHRF
377 ;~ call DEBUG_DumpRegisters
378 ;~ call AuxIO_DumpParagraph
379 ;~ call AuxIO_TeletypeNL
380 POPRF
381 ENDIF
382ENDIF
383
384 mov si, offset PartitionSector+446 ; DS:SI - 1st partition entry
385 xor ax, ax
386 PSSPFE_ScanLoop:
387 mov al, [si+LocBRPT_SystemID]
388 cmp al, 5 ; Is Partition EXTENDED ?
389 je PSSPFE_ExtendedPartition
390 cmp al, 0Fh ; Is Partition EXTENDED (M$) ?
391 je PSSPFE_ExtendedPartition
392 jmp PSSPFE_IgnorePartition
393 PSSPFE_ExtendedPartition:
394 mov ax, wptr [si+LocBRPT_RelativeBegin]
395 mov bx, wptr [si+LocBRPT_RelativeBegin+2]
396 add ax, wptr [ExtendedAbsPos+0] ; Adjust...
397 adc bx, wptr [ExtendedAbsPos+2] ; (Shit Design!)
398 test byte ptr [ExtendedAbsPosSet], 1
399 jnz PSSPFE_ExtendedMainKnown
400 mov wptr [ExtendedAbsPos+0], ax
401 mov wptr [ExtendedAbsPos+2], bx
402 mov byte ptr [ExtendedAbsPosSet], 1
403 PSSPFE_ExtendedMainKnown:
404 mov cx, wptr [si+LocBRPT_BeginSector] ; Cylinder/Sector
405 mov dh, bptr [si+LocBRPT_BeginHead] ; Head
406 mov dl, bptr [CurPartition_Location+4] ; Drive
407 stc
408 jmp PSSPFE_EndOfSearch
409 PSSPFE_IgnorePartition:
410 add si, LocBRPT_LenOfEntry
411 cmp si, 500+offset PartitionSector
412 jb PSSPFE_ScanLoop
413 clc
414 PSSPFE_EndOfSearch:
415 ret
416PARTSCAN_ScanPartitionForExtended EndP
417
418; The following routines have NOT *DS* set to CS, so we must address via ES
419PARTSCAN_ScanPartition Proc Near Uses ax si
420
421IFDEF AUX_DEBUG
422 IF 0
423 DBG_TEXT_OUT_AUX 'PARTSCAN_ScanPartition:'
424 PUSHRF
425 ;~ call DEBUG_DumpRegisters
426 ;~ call AuxIO_DumpParagraph
427 ;~ call AuxIO_TeletypeNL
428 POPRF
429 ENDIF
430ENDIF
431
432
433 mov si, offset [PartitionSector+446] ; DS:SI - 1st Partition-Entry
434 PSSP_ScanLoop:
435 mov al, bptr [si+LocBRPT_SystemID]
436 cmp al, 5 ; Is Partition EXTENDED ?
437 je PSSP_IgnorePartition
438 cmp al, 0Fh ; Is Partition EXTENDED (M$-DOS7) ?
439 je PSSP_IgnorePartition
440 cmp al, 0 ; Is Partition EMPTY ?
441 je PSSP_IgnorePartition
442 ; Ignore these partitions, because there are no real Partitions
443
444
445 ; If this flag is set, no scanning should be done.
446 ; So we jump to the epilog which tries to mark a primary on the boot
447 ; disk because we are in an 'overflow' situation and a properly setup
448 ; MBR can do no harm.
449 mov al, cs:[TooManyPartitions]
450 test al, al
451 jnz PSSP_Epilog
452
453
454 ; Check the number of partitions for this iteration of the scan-loop.
455 ; If the maximum has been reached an error-box is shown to the user.
456 cmp word ptr cs:[NewPartitions],LocIPT_MaxPartitions
457 jae PSSP_TooManyPartitions
458
459
460 ;
461 ; The limit has not been reached yet, so check this partition for
462 ; potential adding to the list and jump over the error-box.
463 ;
464 call PARTSCAN_CheckThisPartition
465 jmp PSSP_IgnorePartition
466
467
468 PSSP_TooManyPartitions:
469
470 ; If we are on the second iteration after we encountered too many
471 ; partitions we stop scanning.
472 mov al, cs:[TooManyPartitions]
473 test al, al
474 jnz PSSP_NoMarkPrimary
475
476 ; First time we encountered too many partitions,
477 ; show the error-box.
478 pusha
479 mov cx, 0C04h
480 mov si, offset TXT_TooManyPartitions
481 add si,5 ; We stole this string, so skip new-line and dash.
482 call SETUP_ShowErrorBox
483
484 ; Record that too many partitions are present.
485 mov byte ptr cs:[TooManyPartitions],1
486 popa
487
488 ; Further scanning is aborted.
489 jmp PSSP_Epilog
490
491
492 PSSP_IgnorePartition:
493 ; Only clear the boot-flag on the boot-disk.
494 ; Clearing the boot-flags on other disks would prevent booting them
495 ; from the BIOS. (TRAC ticket #6)
496 cmp dl, [BIOS_BootDisk] ; See if this is boot-disk
497 jne PSSP_Skip_Clear_BootFlag ; Nope, skip clear flag
498 and byte ptr [si+LocBRPT_Flags], 7Fh ; Reset the Active-Flag
499 PSSP_Skip_Clear_BootFlag:
500 add si, LocBRPT_LenOfEntry ; 16 Bytes per partition entry
501 cmp si, 500+offset PartitionSector
502
503
504 ; Next iteration
505 jb PSSP_ScanLoop
506
507
508 PSSP_Epilog:
509
510 ; If we are on first HDD and in primary partition table -> mark primary
511 mov al, [BIOS_BootDisk]
512 cmp bptr [CurPartition_Location+4], al ; Drive
513 jne PSSP_NoMarkPrimary
514 cmp wptr [CurPartition_Location+0], 0
515 jne PSSP_NoMarkPrimary
516 cmp wptr [CurPartition_Location+2], 0 ; Absolute Location
517 jne PSSP_NoMarkPrimary
518 call PART_MarkFirstGoodPrimary
519 PSSP_NoMarkPrimary:
520 ret
521PARTSCAN_ScanPartition EndP
522
523MBR_NoName_Patched db 15 dup (0)
524
525; Will insert this partition into NewPartTable and compare it to our "old"
526; LocIPT-table. If the same partition is found there, Flags&CRC are taken from
527; the old table, otherwise they are generated freshly.
528; Will also fill out PartitionXref to sync HideConfig later
529; In: SI - Points to Partition-Entry (16-Bytes)
530PARTSCAN_CheckThisPartition Proc Near Uses di si
531
532 local PartSystemID:byte, PartTypeFlags:byte
533 local PartCRC:word, PartPtr:word
534
535IFDEF AUX_DEBUG
536 IF 0
537 DBG_TEXT_OUT_AUX 'PARTSCAN_CheckThisPartition:'
538 PUSHRF
539 call DEBUG_DumpRegisters
540 ;~ call AuxIO_DumpParagraph
541 ;~ call AuxIO_TeletypeNL
542 POPRF
543 ENDIF
544ENDIF
545
546
547 mov wptr [PartPtr], si ; Save Pointer to PartitionEntry
548
549 mov al, bptr [si+LocBRPT_SystemID]
550 mov PartSystemID, al
551
552 mov cx, wptr [si+LocBRPT_BeginSector] ; Cylinder/Sector
553 mov dh, bptr [si+LocBRPT_BeginHead] ; Head
554 mov dl, bptr [CurPartition_Location+4] ; Drive
555 mov ax, wptr [si+LocBRPT_RelativeBegin] ; Absolute Sector
556 mov bx, wptr [si+LocBRPT_RelativeBegin+2]
557
558 add ax, wptr [CurPartition_Location+0] ; +Partition-Absolute
559 adc bx, wptr [CurPartition_Location+2] ; sectors
560
561 ; Load the partition sector
562 mov si, offset [TmpSector]
563 call DriveIO_LoadSector
564
565 push si
566 mov bx, 4B4Dh ; Magic 'MK' :)
567 call MBR_GetCheckOfSector
568 mov PartCRC, bx ; Save Partition's-CRC
569
570 ; ------------------------------ Gets internal infos of partition type
571 mov al, PartSystemID
572 call PART_SearchFileSysName
573 ; Replies AH - FileSysFlags, AL - UnhiddenID, SI - FileSystemNamePtr
574 mov di, si
575 mov PartTypeFlags, ah
576 mov PartSystemID, al ; Use Unhidden-ID
577 pop si
578
579 ;================================
580 ; AL - File System ID (Unhidden)
581 ; AH - File System Flags
582 ; SI - Boot-Record of Partition
583 ; DI - File System Name
584 ;================================
585
586 cmp PartSystemID, 07h ; We got IFS here?
587 jne PCCTP_IFSdone
588 ; Check, if 'JFS ' is at DWORD offset 36h ; Rousseau: JFS check (LVM / IPT?)
589 cmp wptr [si+36h], 'FJ'
590 jne PCCTP_IFSnoJFS
591 cmp wptr [si+38h], ' S'
592 jne PCCTP_IFSnoJFS
593 mov PartSystemID, 0FCh ; FC is JFS internally
594 jmp PCCTP_IFSdone
595 PCCTP_IFSnoJFS:
596 ; Check, if 'HPFS' is at DWORD offset 36h
597 cmp wptr [si+36h], 'PH'
598 jne PCCTP_ProbablyNTFS
599 cmp wptr [si+38h], 'SF'
600 je PCCTP_IFSdone ; 07 is HPFS internally
601 PCCTP_ProbablyNTFS:
602 inc PartSystemID ; 08 is NTFS instead of 07
603 PCCTP_IFSdone:
604
605
606 ; First check, if LVM Information Sector is available and this partition
607 ; is supported.
608 push ax
609 push dx
610 push si
611 push di
612 mov si, wptr [PartPtr]
613 mov ax, wptr [si+LocBRPT_RelativeBegin] ; Absolute Sector
614 mov dx, wptr [si+LocBRPT_RelativeBegin+2]
615 add ax, wptr [CurPartition_Location+0] ; +Partition-Absolute
616 adc dx, wptr [CurPartition_Location+2] ; sectors
617
618 mov si, offset [LVMSector]
619
620IFDEF AUX_DEBUG
621 IF 0
622 DBG_TEXT_OUT_AUX 'LVMSector'
623 PUSHRF
624 call DEBUG_DumpRegisters
625 call AuxIO_DumpSector
626 ;~ call AuxIO_DumpParagraph
627 ;~ call AuxIO_TeletypeNL
628 POPRF
629 ENDIF
630ENDIF
631
632 call LVM_SearchForPartition ; Search for DX:AX partition
633
634 jnc PCCTP_CheckBootRecord
635 ; Check, if volume has driveletter assigned and remember it for later
636 mov al, [si+LocLVM_VolumeLetter]
637 or al, al
638 jnz PCCTP_HasVolumeLetter
639 mov al, 1 ; 0 would mean "not LVM supported"
640 PCCTP_HasVolumeLetter:
641 ; Save VolumeLetter in separate table
642 ;movzx bx, NewPartitions ; NewPartitions is one behind here, so
643 mov bl,NewPartitions ; NewPartitions is one behind here, so
644 mov bh,0
645
646 mov [PartitionVolumeLetters+bx], al ; it's already a zero-based offset
647 ; Now copy VolumeID and VolumeName to temporary space
648 mov di, offset MBR_NoName_Patched
649 mov ax, [si+LocLVM_PartitionID]
650 stosw
651 mov ax, [si+LocLVM_PartitionID+2]
652 stosw
653 ; Set Serial-Field to LVM-VolumeID
654
655 push di
656 add si, LocLVM_VolumeName ; Use LVM VolumeName
657 ;add si, LocLVM_PartitionName ; Use LVM PartitionName
658 mov cx, 5
659 rep movsw ; Copy LVM-PartitionName to Temp Space
660 movsb ; (11 bytes in total)
661 pop di
662
663IFDEF AUX_DEBUG
664 IF 0
665 DBG_TEXT_OUT_AUX 'Name'
666 PUSHRF
667 mov si, di
668 call AuxIO_Print
669 ;~ call DEBUG_DumpRegisters
670 ;~ call AuxIO_DumpSector
671 ;~ call AuxIO_DumpParagraph
672 ;~ call AuxIO_TeletypeNL
673 POPRF
674 ENDIF
675ENDIF
676
677 ; Check if this is an IBM-BM partition
678 cmp PartSystemID, 0ah
679 jne PCCTP_NoIbmBm
680
681 ; It is, so override the name given by IBM-BM by one that
682 ; fits in 11 chars.
683 mov si, offset ibm_bm_name
684 mov cx,5
685 rep movsw
686 movsb
687
688
689
690 PCCTP_NoIbmBm:
691 pop di
692 pop si
693 pop dx
694 pop ax
695 mov si, offset MBR_NoName_Patched
696 xor ah, ah ; no Flags_NoPartName
697 jmp PCCTP_NameSearchInIPT
698
699 PCCTP_CheckBootRecord:
700 pop di
701 pop si
702 pop dx
703 pop ax
704
705 test ah, FileSysFlags_NoName ; No-Name-Flag ? -> No Partition Name
706
707 jz PCCTP_ThereIsAName
708 jmp PCCTP_ThereIsNoName ; available
709
710 PCCTP_ThereIsAName:
711
712 ; We check for NTFS (got detected a little bit earlier in this routine)
713 cmp PartSystemID, 08h ; We got IFS/NTFS here?
714 jne PCCTP_IsNoNTFS
715 jmp PCCTP_ThereIsNoName ; NTFS has no volume label
716 PCCTP_IsNoNTFS:
717 add si, 2Bh ; DS:SI - Partition-Name
718 test ah, FileSysFlags_FAT32 ; FAT32 specific name getting ?
719
720 jz PCCTP_ResumeNormal
721
722 add si, 1Ch ; Fix for FAT 32, shiat
723 PCCTP_ResumeNormal:
724 mov cx, 11 ; 11 bytes length
725 call PART_CheckForValidPartName
726 jc PCCTP_ThereIsAName2
727
728 jmp PCCTP_ThereIsNoName
729
730 PCCTP_ThereIsAName2:
731
732 sub si, 4 ; DS:SI -> Serial&Name (15-Bytes)
733 xor ah, ah ; no Flags_NoPartName
734; jmp PCCTP_NameSearchInIPT
735
736 ;=======================================================
737 ; NAME SEARCH in IPT-Table
738 ; DS:SI - Serial&Name of Current Partition (15-Bytes)
739 ; AH - NoPartName-Flag (!MUST! be merged with Flags)
740 ;=======================================================
741 PCCTP_NameSearchInIPT:
742 xor ah, ah ; no Flags_NoPartName cause PartName valid
743 mov di, offset PartitionTable ; ES:DI - IPT-Start
744 mov dl, CFG_Partitions
745 or dl, dl
746 jnz PCCTP_SerialNameCompLoop
747 jmp PCCTP_CompareFailed
748 PCCTP_SerialNameCompLoop:
749 mov al, [di+LocIPT_Flags]
750 test al, Flags_NowFound
751 jnz PCCTP_SerialNameAlreadyFound
752 ; Now compare IPT with current Partition
753 mov cx, 15 ; Serial&Name (15-Bytes)
754 push si
755 push di
756 repz cmpsb
757 pop di
758 pop si
759
760 jne PCCTP_NoMatchYet
761
762 jmp PCCTP_Match
763
764 PCCTP_NoMatchYet:
765
766 PCCTP_SerialNameAlreadyFound:
767 add di, LocIPT_LenOfIPT
768 dec dl
769 jnz PCCTP_SerialNameCompLoop
770
771 ; if we didn't find Serial&Name, let's try Name-only without Serial
772 mov di, offset PartitionTable ; ES:DI - IPT-Start
773 mov dl, CFG_Partitions
774 PCCTP_NameCompLoop:
775 mov al, [di+LocIPT_Flags]
776 test al, Flags_NowFound
777 jnz PCCTP_NameAlreadyFound
778 ; Now compare IPT with current Partition
779 mov cx, 11 ; Name only (11-Bytes)
780 push si
781 push di
782 add si, 4
783 add di, 4 ; Skip over Serial-Field
784 repz cmpsb
785 pop di
786 pop si
787 jne PCCTP_NameNoMatch
788 mov cx, [si+0] ; Get Serial
789 mov [di+0], cx
790 mov cx, [si+2]
791 mov [di+2], cx ; ...and put it into IPT
792 jmp PCCTP_Match
793 PCCTP_NameNoMatch:
794 PCCTP_NameAlreadyFound:
795 add di, LocIPT_LenOfIPT
796 dec dl
797 jnz PCCTP_NameCompLoop
798 PCCTP_NameCompFailed:
799
800 ; So finally we search for Location and PartitionID
801 push si
802 ; Initialize some stuff for Location-Search
803 mov dh, PartSystemID
804 mov si, [PartPtr] ; DS:SI - Cur Partition Table
805 ; Relative Sector to MBR/EPR
806 mov cx, wptr [si+LocBRPT_RelativeBegin]
807 mov bx, wptr [si+LocBRPT_RelativeBegin+2]
808 add cx, [CurPartition_Location+0]
809 add bx, [CurPartition_Location+2]
810 ; BX:CX - Absolute First Sector of Partition on HDD
811 pop si
812 mov di, offset PartitionTable ; ES:DI - IPT-Start
813 mov dl, CFG_Partitions
814 PCCTP_NameLocCompLoop:
815 mov al, [di+LocIPT_Flags]
816 test al, Flags_NowFound
817 jnz PCCTP_NameLocAlreadyFound
818 ; Now compare IPT with current Partition
819 cmp dh, [di+LocIPT_SystemID]
820 jne PCCTP_NameLocMismatch
821 cmp cx, [di+LocIPT_AbsoluteBegin]
822 jne PCCTP_NameLocMismatch
823 cmp bx, [di+LocIPT_AbsoluteBegin+2]
824 jne PCCTP_NameLocMismatch
825 ; We matched location, now copy the current PartitionID and Name to
826 ; the old IPT.
827 push di
828 add di, LocIPT_Serial ; DS:SI - LocIPT-Serial&Name
829 mov cx, 15
830 rep movsb ; Copy 15 bytes
831 pop di
832 jmp PCCTP_Match
833 PCCTP_NameLocMismatch:
834 PCCTP_NameLocAlreadyFound:
835 add di, LocIPT_LenOfIPT
836 dec dl
837 jnz PCCTP_NameLocCompLoop
838 ; None of the searches worked, so forget it...
839 jmp PCCTP_CompareFailed
840
841 PCCTP_ThereIsNoName:
842 ; Try to find this partition by comparing location and PartitionID
843 ; aka LocIPT_AbsoluteBegin:dword and LocIPT_SystemID
844 ; If found, simply go to the normal match-routine, otherwise use the
845 ; File-System-Name to build the Volume-Label for the New IPT Entry.
846 mov dh, PartSystemID
847 mov si, [PartPtr] ; DS:SI - Cur Partition Table
848 ; Relative Sector to MBR/EPR
849 mov cx, wptr [si+LocBRPT_RelativeBegin]
850 mov bx, wptr [si+LocBRPT_RelativeBegin+2]
851 add cx, [CurPartition_Location+0]
852 add bx, [CurPartition_Location+2]
853 ; Build a standard-Volume Label from FileSystemNamePtr
854 ; We have to call SearchFileSysName again because of NTFS
855 push ax
856 push cx
857 mov al, dh
858 call PART_SearchFileSysName ; We want SI here <- FileSystemNamePtr
859 mov di, offset MBR_NoName_Patched
860 xor ax, ax
861 stosw
862 stosw ; Set Serial-Field to "NUL"
863 mov cx, 4
864 rep movsw ; Copy FileSystemName to Temp Space
865 xor ax, ax
866 stosw
867 stosb ; Fill last 3 bytes with "NUL"
868 mov si, offset MBR_NoName_Patched
869 pop cx
870 pop ax
871 ;=======================================================
872 ; LOCATION SEARCH in IPT-Table
873 ; DH - PartitionID of Current Partition
874 ; BX:CX - AbsoluteBegin of Current Partition
875 ; AH - NoPartName-Flag (!MUST! be merged with Flags)
876 ; DS:SI - Serial&Name of Current Partition (15-Bytes)
877 ;=======================================================
878 PCCTP_LocSearchInIPT:
879 mov ah, Flags_NoPartName ;set Flags_NoPartName, PartName invalid
880 mov di, offset PartitionTable ; ES:DI - IPT-Start
881 mov dl, CFG_Partitions
882 or dl, dl
883 jz PCCTP_LocCompFailed
884 PCCTP_LocCompLoop:
885 mov al, [di+LocIPT_Flags]
886 test al, Flags_NowFound
887 jnz PCCTP_LocAlreadyFound
888 ; Now compare IPT with current Partition
889 cmp dh, [di+LocIPT_SystemID]
890 jne PCCTP_LocMismatch
891 cmp cx, [di+LocIPT_AbsoluteBegin]
892 jne PCCTP_LocMismatch
893 cmp bx, [di+LocIPT_AbsoluteBegin+2]
894 jne PCCTP_LocMismatch
895 jmp PCCTP_Match
896 PCCTP_LocMismatch:
897 PCCTP_LocAlreadyFound:
898 add di, LocIPT_LenOfIPT
899 dec dl
900 jnz PCCTP_LocCompLoop
901 PCCTP_LocCompFailed:
902 jmp PCCTP_CompareFailed
903
904 ; ==================================
905 ; =MATCH=, found partition in IPT...
906 ; AH - NoPartName-Flag (!MUST! be merged with Flags)
907 ; DL - IPT Partition Number from Loop (inverted)
908 ; ES:DI - LocIPT-Pointer to found IPT-entry
909 ; ==================================
910 PCCTP_Match:
911 mov ch, ah
912 ; Save the new location of this partition in the Xref-Table
913 ; for converting HideConfig.
914 mov dh, dl
915 mov dl, CFG_Partitions
916 sub dl, dh
917 mov dh, NewPartitions ; is actually a counter
918 call PARTSCAN_DefXref ; DL-IPT-Partition, DH-NewPartition
919
920 ; Get Saved-Flags...
921 mov cl, bptr [di+LocIPT_Flags] ; Use saved Flags
922
923 ; ...and Saved-CRC if available...
924 mov ax, wptr [di+LocIPT_BootRecordCRC]
925 or ax, ax
926 jz PCCTP_UseNewComputedCRC
927 mov PartCRC, ax ; Use saved IPT-CRC
928 PCCTP_UseNewComputedCRC:
929 ; ...and mark partition in IPT as already found
930 or bptr [di+LocIPT_Flags], Flags_NowFound
931 ; ...get Serial&Name from IPT-table...
932 mov si, di
933 add si, LocIPT_Serial ; DS:SI - LocIPT-Serial&Name
934 jmp PCCTP_AddToNew
935
936 ; =================================
937 ; =FAILED= search, not found in IPT
938 ; AH - NoPartName-Flag (!MUST! be merged with Flags)
939 ; DS:SI - Serial&Name of Current Partition (15-Bytes)
940 ; =================================
941 PCCTP_CompareFailed:
942 mov ch, ah
943 ; Insert Default Flags...
944 mov cl, LocIPT_DefaultFlags
945
946 mov al, PartTypeFlags
947 ; May I auto-add partitions ?
948 test byte ptr [CFG_PartitionsDetect], 1
949 jz PCCTP_MayNotAddAny ; add, but non-bootable
950 test al, FileSysFlags_BootAble ; AH kam von SearchFileSysName
951 jnz PCCTP_PerhapsBootAble
952 PCCTP_MayNotAddAny:
953 mov cl, LocIPT_DefaultNonBootFlags
954 PCCTP_PerhapsBootAble:
955
956 ; On FAT32-partitions, default to P-Flag (which means using M$-hack)
957 ; Anyway, this hack has to be globaly activated by the user manually...
958 cmp PartSystemID, 09h ; Hardcoded: FAT32
959 je PCCTP_NeedsExtMShack
960 cmp PartSystemID, 0Bh
961 je PCCTP_NeedsExtMShack
962 cmp PartSystemID, 0Ch
963 je PCCTP_NeedsExtMShack
964 cmp PartSystemID, 0Eh ; FAT16 above 8 GB
965 jne PCCTP_NoExtMShack
966 ; We only get here, when the SystemID seems to be an M$ "invention"...
967 PCCTP_NeedsExtMShack:
968 or cl, Flags_ExtPartMShack
969 PCCTP_NoExtMShack:
970
971 ;================================================
972 ; CL - IPT-Partition-Flags, CH - NoPartName-Flag
973 ; DS:SI - PartSerial&Name (15-Bytes)
974 ;================================================
975 PCCTP_AddToNew:
976 mov al, Flags_NoPartName ; Unset NoPartName
977 not al
978 and cl, al
979 or cl, ch ; CL = Both CL and CH merged
980
981 ; Calculate Pointer to IPT
982 mov di, offset NewPartTable ; ES:DI - NewPartTable
983 ;movzx ax, NewPartitions
984 mov al,NewPartitions
985 mov ah,0
986
987 mov bl, LocIPT_LenOfIPT
988 mul bl
989 add di, ax ; ES:DI - Last+1 Entry of NewPartTable
990
991 ; Now finally write this partition to our IPT
992 ;=============================================
993 push cx
994 mov cx, 15 ; Copy Serial&Name...
995 rep movsb
996 pop cx
997
998 mov si, [PartPtr] ; DS:SI - Cur Partition Entry
999 mov al, bptr [CurPartition_Location+4] ; Drive
1000 stosb
1001 mov al, PartSystemID ; Unhidden SystemID
1002 stosb
1003 mov al, cl ; Partition-Flags from register...
1004 stosb
1005 mov ax, PartCRC ; BootRecordCRC...
1006 stosw
1007 mov al, bptr [si+LocBRPT_BeginHead]
1008 stosb
1009 mov ax, wptr [si+LocBRPT_BeginSector] ; Cylinder/Sector
1010 stosw
1011 mov al, bptr [CurPartition_Location+5] ; Head of Part-Table
1012 stosb
1013 mov ax, wptr [CurPartition_Location+6] ; Cylinder/Sector
1014 stosw
1015 mov ax, wptr [si+LocBRPT_RelativeBegin]
1016 mov bx, wptr [si+LocBRPT_RelativeBegin+2]
1017 mov cx, wptr [CurPartition_Location+0] ; +Partition-Absolute
1018 mov dx, wptr [CurPartition_Location+2] ; sectors
1019 add ax, cx
1020 adc bx, dx
1021 stosw
1022 mov ax, bx
1023 stosw
1024 mov ax, cx ; Absolute sector of partition table
1025 stosw
1026 mov ax, dx
1027 stosw
1028 inc byte ptr [NewPartitions]; Adjusted for Wasm ; NEW IPT Entry DONE
1029
1030 cmp byte ptr [NewPartitions], LocIPT_MaxPartitions
1031 jbe PCCTP_NotTooManyPartitions
1032
1033 ; Should not be reached since scanning is stopped outside this
1034 ; function when partition limit exceeds.
1035 mov si, offset TXT_TooManyPartitions
1036 call MBR_Teletype
1037 jmp MBR_HaltSystem
1038
1039
1040 PCCTP_NotTooManyPartitions:
1041 ; UNHIDE PARTITION, if it was hidden previously
1042 mov al, PartSystemID
1043 cmp al, 08h ; internally IFS/NTFS?
1044 je PCCTP_GotInternalIFS
1045 cmp al, 0FCh ; internally IFS/JFS?
1046 jne PCCTP_NoInternalIFS
1047 PCCTP_GotInternalIFS:
1048 mov al, 07h
1049 PCCTP_NoInternalIFS:
1050 mov bptr [si+LocBRPT_SystemID], al
1051
1052 ; Calculate Size of this partition and put it into separate table...
1053 ;movzx ax, NewPartitions
1054 mov al,NewPartitions
1055 mov ah,0
1056
1057 dec ax
1058 mov bx, ax
1059 shl ax, 1
1060 shl bx, 2
1061 add ax, bx ; My way [tm] of multiplying with 6
1062 mov di, offset PartitionSizeTable
1063 add di, ax ; DI - Partition Size-Element
1064 mov ax, wptr [si+LocBRPT_AbsoluteLength] ; Sector-Size
1065 mov bx, wptr [si+LocBRPT_AbsoluteLength+2]
1066 call PART_FillOutSizeElement
1067 ret
1068PARTSCAN_CheckThisPartition EndP
1069
1070stop_scanning db 0
1071
1072; ===================
1073; X-REFERENCE STUFF -> PartitionXref
1074; ===================
1075
1076; Reset X-Reference
1077PARTSCAN_ResetXref Proc Near Uses ax cx di
1078 mov di, offset PartitionXref ; X-Reference for later syncing
1079 mov cx, LocIPT_MaxPartitions
1080 mov ax, 0FFFFh ; Fill up with FFh
1081 rep stosb
1082 mov di, offset NewHidePartTable ; Temporary Hide-Config Table
1083 ;~ mov cx, LocIPT_MaxPartitions * LocIPT_LenOfIPT
1084 mov cx, LocIPT_MaxPartitions * LocHPT_LenOfHPT
1085 rep stosb ; Fill up with FFFFh
1086 mov di, offset NewDriveLetters
1087 mov cx, LocIPT_MaxPartitions ; Temporary Logical-Drive Letter Table
1088 xor ax, ax
1089 rep stosb ; Fill up with 0000h
1090 ret
1091PARTSCAN_ResetXref EndP
1092
1093
1094
1095; In: DL - Partition Number in IPT
1096; DH - Partition Number in NewPartitionTable
1097; Destroyed: None
1098PARTSCAN_DefXref Proc Near Uses ax bx cx dx si di
1099 ;movzx bx, dl
1100 mov bl,dl
1101 mov bh,0
1102
1103 mov bptr [PartitionXref+bx], dh ; X-Reference
1104 ; Copy Hide-Config of IPT partition to new location in new table
1105 mov si, offset HidePartitionTable
1106 mov di, offset NewHidePartTable
1107 ;~ mov bl, LocIPT_MaxPartitions
1108 mov bl, LocHPT_LenOfHPT
1109 mov al, dl
1110 mul bl
1111 add si, ax
1112 mov al, dh
1113 mul bl
1114 add di, ax
1115 ;~ mov cx, LocIPT_MaxPartitions
1116 mov cx, LocHPT_LenOfHPT
1117 rep movsb ; Copy Hide-Config to NewHideTable
1118 ; Process Logical-Drive-Letter table as well...
1119 ;movzx bx, dl
1120 mov bl,dl
1121 mov bh,0
1122
1123 mov al, bptr [DriveLetters+bx] ; Get Drv-Letter from org. pos
1124 ;movzx bx, dh
1125 mov bl,dl
1126 mov bh,0
1127
1128 mov bptr [NewDriveLetters+bx], al ; Put Drv-Letter to new pos
1129 ret
1130PARTSCAN_DefXref EndP
1131
1132
1133
1134; In: DL - Partition Number in previous IPT
1135; Out: DH - Partition Number in NewPartitionTable
1136; Destroyed: None
1137PARTSCAN_GetXref Proc Near Uses bx
1138 ;movzx bx, dl
1139 mov bl,dl
1140 mov bh,0
1141
1142 mov dh, bptr [PartitionXref+bx] ; X-Reference
1143 ret
1144PARTSCAN_GetXref EndP
1145
1146
1147;
1148; Rousseau: Adjusted for packed hidden-part-table !
1149; Needs to be re-written.
1150;
1151; This here updates the contents of the Hide-Configuration to the current IPT
1152; table.
1153PARTSCAN_SyncHideConfigWithXref Proc Near Uses ax bx cx dx si di
1154 mov si, offset NewHidePartTable
1155 mov di, offset HidePartitionTable
1156 mov dh, LocIPT_MaxPartitions ; Max entries in hide-tables.
1157
1158 PSSHCWX_SyncPartLoop:
1159 mov cl, LocIPT_MaxPartitions ; Max entries per hide-entry.
1160 xor dl, dl ; Partition Lost Counter
1161
1162 mov ch,0 ; Index.
1163
1164 PSSHCWX_SyncLoop:
1165 mov bx,si
1166
1167 ;~ lodsb ; Get Part-Pointer from Hide-Cfg
1168
1169 push dx
1170 mov dl,ch
1171 mov dh,6
1172 call CONV_GetBitfieldValue
1173 pop dx
1174
1175 ;~ cmp al, 0FFh
1176 cmp al, 3Fh
1177 je PSSHCWX_SyncEmpty
1178 ;movzx bx, al
1179 mov bl,al
1180 mov bh,0
1181
1182 mov al, [PartitionXref+bx] ; Translate it
1183 ;~ cmp al, 0FFh
1184 cmp al, 3Fh
1185 je PSSHCWX_PartLost
1186
1187 PSSHCWX_SyncEmpty:
1188 mov bx,di
1189 ;~ stosb ; Put translated pointer to new table
1190
1191 push dx
1192 mov dl,ch
1193 mov dh,6
1194 call CONV_SetBitfieldValue
1195 pop dx
1196
1197 inc ch
1198 dec cl
1199 jnz PSSHCWX_SyncLoop
1200
1201 jmp PSSHCWX_SyncLoopEnd
1202
1203 PSSHCWX_PartLost:
1204 inc dl ; One partition got lost...
1205 dec cl
1206 jnz PSSHCWX_SyncLoop
1207
1208 PSSHCWX_SyncLoopEnd:
1209
1210
1211IFDEF AUX_DEBUG
1212 IF 0
1213 pushf
1214 pusha
1215 mov al,dl
1216 call AuxIO_TeletypeHexByte
1217 call AuxIO_TeletypeNL
1218 popa
1219 popf
1220 ENDIF
1221ENDIF
1222
1223
1224 or dl, dl
1225 jz PSSHCWX_NothingLost
1226 ;~ mov al, 0FFh ; Influences OVERWRITE BUG ! (OUT OF BOUNDS !!)
1227 mov al, 3Fh
1228
1229 PSSHCWX_LostFillLoop: ; CHECK !!
1230 ;~ stosb
1231 dec cl
1232 jnz PSSHCWX_LostFillLoop
1233
1234 IFDEF AUX_DEBUG
1235 IF 0
1236 pushf
1237 pusha
1238 mov ax,di
1239 call AuxIO_TeletypeHexWord
1240 call AuxIO_TeletypeNL
1241 popa
1242 popf
1243 ENDIF
1244 ENDIF
1245
1246 PSSHCWX_NothingLost:
1247 add si, LocHPT_LenOfHPT
1248 add di, LocHPT_LenOfHPT
1249 dec dh
1250 jnz PSSHCWX_SyncPartLoop
1251
1252 ret
1253PARTSCAN_SyncHideConfigWithXref EndP
1254
1255ibm_bm_name db 'OS2 BootMgr',0
1256;win_bm_name: db 'BOOTMGR',0
Note: See TracBrowser for help on using the repository browser.