source: trunk/BOOTCODE/REGULAR/DEBUG.ASM@ 54

Last change on this file since 54 was 51, checked in by Ben Rietbroek, 12 years ago

AiR-BOOT v1.0.8-rc3 build-20120909 [2012-09-10]

With Git one can easily hop-skip-and-jump between branches.
So I use Git for my local repos and make use of this easy branching.
Because SVN can only handle lineair history, these branches had to be
rebased before committing them to Netlabs. So, this commit contains a
multitude of changes which makes it a bit hairy.

New

o Display LVM drive-letters in the main menu

A populair request was to show drive-letter information in the menu.
Drive-letters however, are OS specific and AiR-BOOT cannot
accurately predict what drive-letter other operating systems would
assign to what partition. eCS LVM drive-letters however are stored
in the LVM-record and can thus be displayed.

o Added 'Show LVM Drive Letters' option in SETUP/BASIC

This will toggle the display of LVM drive-letters in the main menu.
By default this option is enabled.

o Show popup message when BIOS INT13X extensions are not available

The system is halted.

o Show 'DEL to Power Off' in the bottom left corner

This tries to power-off the system, but it may not work for you.

o Simple interactive debugger

Outputs to the serial port with a few one-letter commands to dump
internal tables and state. (Only available in debug builds)

o Enhanced drive-letter feature

Enable multiple eCS installations using the same drive-letter.
This makes it possible to clone a system with the command
'XCOPY /h /o /t /s /e /r /v /e' to another drive and have that boot
from the same drive-letter.
(Or installing to the same drive by hiding the other system)

Changes

o Reduced MBR protection-image from 1024 to 768 bytes

Luckily the MBR Protection Image code does not exceed 768 bytes,
so that gives us another 256 bytes of precious code-space.
Now the non-EN versions are happy again.
Note that the alignment for the image changed from 512 to 256 bytes.
MBR-PROT.ASM, FIXCODE.C, PARTMAIN.ASM and AIR-BOOT.ASM have been
adjusted for this change.
The fight for code-space continues...

o Updating from v1.06 now also copies over drive-letters

When the user has forced drive-letters in v1.06 these will be copied
over to the v1.0.8 configuration when upgrading.
Because the drive-letter feature is broken in v1.07,
the drive-letter table does not get copied over when upgrading
from v1.07.

o Made FX-code optional to compile in

The FX-code supplies the shifting screen-effects when 'Cooper Bars'
is enabled in the setup. With the current enhancements made however,
there is a continuous lack of code-space, especially when debug-code
is included during development. The FX-code occupies some
1200 bytes, a space that can be put to better use. Therefore the
inclusion of the FX-code has been made conditional to make room for
either debugging or future new features.

o Also rewrite PBR on HPFS

Earlier, a fix was made to write a modified PBR back in case JFS was
used. This was done to enable the drive-letter feature on JFS, since
the PBR JFS-bootcode does not use the supplied PBR in memory.
With the enhancements in the drive-letter feature, the HPFS PBR
needs to be updated on disk also, to cope with zero drive-letters in
the HPFS PBR. This potentially fixes a missing drive-letter in the
PBR when the system is restored from an archive. You might need the
drive-letter feature to force the correct drive-letter on the first
boot, after which the feature can be disabled.

o Added extra MBR protection

When AiR-BOOT is active, it is only AiR-BOOT that writes to the MBR.
To protect the MBR from programming errors, like the one below,
any write to the MBR is now checked for validity.
In essence this is protecting your MBR from bad programming done
by me...

Fixes

o Fixed a minor bug with displaying LVM drive-letters

When more partitions that can be displayed were present, scrolling
the menu would not scroll the drive-letter. Fixed.

o Fixed a bug with regard to the drive-letter feature

When partitions were deleted, and some partitions above the deleted
partition(s) had a drive-letter forced, these partitions would lose
this assignment. This bug is also present in v1.06.

Note

The AIRBOOT.HIS file mentions a DOCU directory with the AiR-BOOT
documentation etc. However, this is not present in this commit and
will be provided at a later time.

File size: 22.3 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 / DEBUG
20;---------------------------------------------------------------------------
21
22
23; -----------------------
24; Rousseau: # DEBUG.ASM #
25; -----------------------
26; This module contains functions for debugging AiR-BOOT.
27; It is only included in debug builds and the codesize of AiR-BOOT increases
28; in that case. To compensate for that, the FX code is disabled when debugging
29; is active. Also, most of the debug-routines can selectively be disabled
30; by commenting-out the define above it.
31
32
33
34IFDEF MODULE_NAMES
35DB 'DEBUG',0
36ENDIF
37
38;
39; Display a number that was put on the stack.
40; Used to track code-flow.
41;
42dbp db '>---------->> DebugProbe: ',0
43DEBUG_Probe Proc
44 push bp
45 mov bp,sp
46 pushf
47 pusha
48
49 mov si,offset [dbp] ; Default probe-text.
50 call AuxIO_Print
51 mov ax,[bp+04] ; Get probe-number from stack.
52 call AuxIO_TeletypeHexWord
53 call AuxIO_TeletypeNL
54
55 ; Also display registers.
56 popa
57 pusha
58 call DEBUG_DumpRegisters
59
60 popa
61 popf
62 pop bp
63 ret 2
64DEBUG_Probe Endp
65
66
67
68;
69; Show help on keys.
70;
71dbh db 10,'h=HELP, d=DRIVE-LETTERS, g=GEO, i=IPT, r=RESTART, v=VOL-LETTERS, x=XREF',10,10,0
72DEBUG_ShowHelp Proc
73 pushf
74 pusha
75 mov si, offset dbh
76 call AuxIO_Print
77 popa
78 popf
79 ret
80DEBUG_ShowHelp EndP
81
82
83;
84; Call list for debug hot-keys.
85;
86dbg_call_list:
87 db 'd'
88 dw offset DEBUG_DumpDriveLetters
89 db 'g'
90 dw offset DEBUG_DumpGeo
91 db 'h'
92 dw offset DEBUG_ShowHelp
93 db 'i'
94 dw offset DEBUG_DumpIPT
95 db 'r'
96 dw offset AirbootRestart
97 db 'v'
98 dw offset DEBUG_DumpVolumeLetters
99 db 'x'
100 dw offset DEBUG_DumpPartitionXref
101 db 'R'
102 dw offset AirbootRestart
103 db 0
104
105;
106; Handle keypresses when the main menu is active.
107;
108DEBUG_HandleKeypress Proc
109 pushf
110 pusha
111
112 ; Save hot-key
113 mov dl,al
114
115 ; Check for digit.
116 cmp al,'0'
117 jb DEBUG_HandleKeypress_exit
118 cmp al,'9'
119 ja DEBUG_HandleKeypress_try_alpha
120 ; It was a digit.
121 jmp DEBUG_HandleKeypress_check_it
122
123 ; Check for alpha.
124 DEBUG_HandleKeypress_try_alpha:
125 ; Force upper-case.
126 and al,11011111b
127 cmp al,'A'
128 jb DEBUG_HandleKeypress_exit
129 cmp al,'Z'
130 ja DEBUG_HandleKeypress_exit
131 ; It was an alpha.
132 jmp DEBUG_HandleKeypress_check_it
133
134
135 ; Check if the key is a hot-key.
136 DEBUG_HandleKeypress_check_it:
137 cld
138 mov si,offset dbg_call_list
139
140 ; Loop over jump-list.
141 DEBUG_HandleKeypress_next_entry:
142
143 ; Load the hot-key.
144 lodsb
145 ; No hot-key (not implemented) if end-of-list.
146 test al,al
147 jz DEBUG_HandleKeypress_ni
148
149 ; Compare hot-key and iterate if not the same.
150 cmp dl,al
151 lodsw
152 jne DEBUG_HandleKeypress_next_entry
153
154 ; Entry found, call corresponding routine.
155 mov bx,ax
156 call bx
157
158 ; Done.
159 jmp DEBUG_HandleKeypress_exit
160
161 ; Call not-assigned routine.
162 DEBUG_HandleKeypress_ni:
163 call DEBUG_NotAssigned
164 jmp DEBUG_HandleKeypress_exit
165
166 ; Return to caller.
167 DEBUG_HandleKeypress_exit:
168 popa
169 popf
170 ret
171DEBUG_HandleKeypress Endp
172
173
174
175;
176; Show not assigned message.
177;
178dbg_na db 'This key is not assigned, press ''h'' for Help.',10,0
179DEBUG_NotAssigned Proc
180 pushf
181 pusha
182 mov si,offset dbg_na
183 call AuxIO_Print
184 popa
185 popf
186 ret
187DEBUG_NotAssigned Endp
188
189
190
191;
192; Dump information before the menu is displayed.
193;
194DEBUG_Dump1 Proc Near
195 pushf
196 pusha
197
198 ; Hello message
199 mov si, offset AuxIOHello
200 call AuxIO_Print
201
202 ; Build Info
203 ;~ mov si, offset BUILD_DATE
204 ;~ call AuxIO_Print
205 call AuxIO_PrintBuildInfo
206
207 ; Start new line
208 call AuxIO_TeletypeNL
209 ;~ call AuxIO_TeletypeNL
210
211 ;~ call DEBUG_DumpHidePartTables
212 ;~ call DEBUG_CheckMath
213 ;~ call DEBUG_DumpGeo
214 ;~ call DEBUG_CheckBitFields
215
216 popa
217 popf
218 ret
219DEBUG_Dump1 EndP
220
221
222;
223; Check the simple 32-bit math functions.
224;
225;~ __CHECK_MATH__ EQU
226DEBUG_CheckMath Proc Near
227 IFDEF __CHECK_MATH__
228 pushf
229 pusha
230
231 ; Msg check math-module
232 mov si,offset db_checkmath
233 call AuxIO_Print
234
235 ; Output hex-word
236 mov ax,0BABEh
237 call AuxIO_TeletypeHexWord
238
239 mov al,' '
240 call AuxIO_Teletype
241 mov al,'*'
242 call AuxIO_Teletype
243 mov al,' '
244 call AuxIO_Teletype
245
246 ; Output hex-word
247 mov ax,0BABEh
248 call AuxIO_TeletypeHexWord
249
250 mov al,' '
251 call AuxIO_Teletype
252 mov al,'='
253 call AuxIO_Teletype
254 mov al,' '
255 call AuxIO_Teletype
256
257 mov ax,0BABEh
258 mul ax
259 call AuxIO_TeletypeHexDWord
260
261 ; Start new line
262 call AuxIO_TeletypeNL
263
264 ; Output hex-dword
265 mov dx,0DEADh
266 mov ax,0FACEh
267 call AuxIO_TeletypeHexDWord
268
269 mov al,' '
270 call AuxIO_Teletype
271 mov al,'*'
272 call AuxIO_Teletype
273 mov al,' '
274 call AuxIO_Teletype
275
276 ; Output hex-dword
277 mov dx,0DEADh
278 mov ax,0FACEh
279 call AuxIO_TeletypeHexDWord
280
281 mov al,' '
282 call AuxIO_Teletype
283 mov al,'='
284 call AuxIO_Teletype
285 mov al,' '
286 call AuxIO_Teletype
287
288 mov bx,0DEADh
289 mov cx,0FACEh
290 mov dx,0DEADh
291 mov ax,0FACEh
292 call MATH_Mul32
293 call AuxIO_TeletypeHexQWord
294
295 call AuxIO_TeletypeNL
296 call AuxIO_TeletypeNL
297
298 popa
299 popf
300 ENDIF
301 ret
302DEBUG_CheckMath EndP
303
304
305;
306; Dump the geometry.
307;
308__DUMP_GEO__ EQU
309DEBUG_DumpGeo Proc
310 IFDEF __DUMP_GEO__
311 pushf
312 pusha
313
314 ; BIOS cyls
315 mov dx,word ptr [BIOS_Cyls+02]
316 mov ax,word ptr [BIOS_Cyls+00]
317 call AuxIO_TeletypeHexDWord
318 call AuxIO_TeletypeNL
319
320 ; BIOS heads
321 mov dx,word ptr [BIOS_Heads+02]
322 mov ax,word ptr [BIOS_Heads+00]
323 call AuxIO_TeletypeHexDWord
324 call AuxIO_TeletypeNL
325
326 ; BIOS secs
327 mov dx,word ptr [BIOS_Secs+02]
328 mov ax,word ptr [BIOS_Secs+00]
329 call AuxIO_TeletypeHexDWord
330 call AuxIO_TeletypeNL
331
332 ; Bytes per sector
333 mov ax,[BIOS_Bytes]
334 call AuxIO_TeletypeHexWord
335 call AuxIO_TeletypeNL
336
337 ; Total secs
338 mov bx, word ptr [BIOS_TotalSecs+06]
339 mov cx, word ptr [BIOS_TotalSecs+04]
340 mov dx, word ptr [BIOS_TotalSecs+02]
341 mov ax, word ptr [BIOS_TotalSecs+00]
342 call AuxIO_TeletypeHexDWord
343 call AuxIO_TeletypeNL
344
345 ; CHS to LBA
346 mov dx,1
347 mov ax,29e5h
348 mov bx,23h
349 mov cx,9h
350 call CONV_CHS2LBA
351 call AuxIO_TeletypeHexDWord
352 call AuxIO_TeletypeNL
353
354 popa
355 popf
356 ENDIF
357
358 ret
359DEBUG_DumpGeo Endp
360
361
362;
363; Dump the internal partition table.
364;
365__DUMP_IPT__ EQU
366DEBUG_DumpIPT Proc
367 IFDEF __DUMP_IPT__
368 pushf
369 pusha
370
371 call AuxIO_TeletypeNL
372
373 mov si,offset [BIOScontIPTentry]
374 ;~ mov si,offset [PartitionTable]
375 call AuxIO_DumpSector
376
377 popa
378 popf
379 ENDIF
380 ret
381DEBUG_DumpIPT EndP
382
383
384;
385; Dump the new partitions table.
386;
387;~ __DUMP_NPT__ EQU
388DEBUG_DumpNewPartTable Proc
389 IFDEF __DUMP_NPT__
390 pushf
391 pusha
392
393 call AuxIO_TeletypeNL
394
395 mov si,offset [NewPartTable]
396 call AuxIO_DumpSector
397
398 popa
399 popf
400 ENDIF
401 ret
402DEBUG_DumpNewPartTable EndP
403
404
405;
406; Dump the partition pointers table.
407;
408;~ __DUMP_PP__ EQU
409DEBUG_DumpPartitionPointers Proc
410 IFDEF __DUMP_PP__
411 pushf
412 pusha
413
414 call AuxIO_TeletypeNL
415
416 mov si,offset [PartitionPointers]
417 mov cx,7
418
419 DEBUG_DumpPartitionPointers_next:
420 call AuxIO_DumpParagraph
421 add si,16
422 call AuxIO_TeletypeNL
423 loop DEBUG_DumpPartitionPointers_next
424
425 popa
426 popf
427 ENDIF
428 ret
429DEBUG_DumpPartitionPointers EndP
430
431
432;
433; Dump the partition x-ref table.
434;
435__DUMP_PX__ EQU
436DEBUG_DumpPartitionXref Proc
437 IFDEF __DUMP_PX__
438 pushf
439 pusha
440
441 mov si, offset [xrt]
442 call AuxIO_Print
443 ;~ call AuxIO_TeletypeNL
444
445 mov si,offset [PartitionXref]
446 mov cx,3
447
448 DEBUG_DumpPartitionXref_next:
449 call AuxIO_DumpParagraph
450 add si,16
451 call AuxIO_TeletypeNL
452 loop DEBUG_DumpPartitionXref_next
453
454 popa
455 popf
456 ENDIF
457 ret
458DEBUG_DumpPartitionXref EndP
459
460
461;
462; Dump the dl-feature drive-letters.
463;
464__DUMP_DL__ EQU
465DEBUG_DumpDriveLetters Proc
466 IFDEF __DUMP_DL__
467 pushf
468 pusha
469
470 mov si, offset [ddl]
471 call AuxIO_Print
472
473 ; Dump the old drive-letters as set with the dl-feature.
474 mov si,offset [DriveLetters]
475 mov cx,3
476 DEBUG_DumpDriveLetters_next_1:
477 call AuxIO_DumpParagraph
478 add si,16
479 call AuxIO_TeletypeNL
480 loop DEBUG_DumpDriveLetters_next_1
481
482 ; Dump the new drive-letters as composed when scanning partitions
483 ; and partitions were added or removed.
484 mov si,offset [NewDriveLetters]
485 mov cx,3
486 DEBUG_DumpDriveLetters_next_2:
487 call AuxIO_DumpParagraph
488 add si,16
489 call AuxIO_TeletypeNL
490 loop DEBUG_DumpDriveLetters_next_2
491
492 popa
493 popf
494 ENDIF
495 ret
496DEBUG_DumpDriveLetters EndP
497
498
499;
500; Dump the lvm volume drive-letters.
501;
502__DUMP_VL__ EQU
503DEBUG_DumpVolumeLetters Proc
504 IFDEF __DUMP_VL__
505 pushf
506 pusha
507
508 mov si, offset [dvl]
509 call AuxIO_Print
510
511 mov si,offset [PartitionVolumeLetters]
512 mov cx,3
513
514 DEBUG_DumpVolumeLetters_next:
515 call AuxIO_DumpParagraph
516 add si,16
517 call AuxIO_TeletypeNL
518 loop DEBUG_DumpVolumeLetters_next
519
520 popa
521 popf
522 ENDIF
523 ret
524DEBUG_DumpVolumeLetters EndP
525
526
527
528
529;
530; Dump the registers.
531;
532__DUMP_REG__ EQU
533IFDEF __DUMP_REG__
534regAX db 'AX:',0
535regBX db ' BX:',0
536regCX db ' CX:',0
537regDX db ' DX:',0
538regSI db ' SI:',0
539regDI db ' DI:',0
540
541regBP db 'CS:',0
542regSP db ' DS:',0
543regCS db ' ES:',0
544regSS db ' SS:',0
545regDS db ' SP:',0
546regES db ' BP:',0
547
548;~ regFS db 'FS:',0
549;~ regGS db ' GS:',0
550ENDIF
551DEBUG_DumpRegisters Proc
552 IFDEF __DUMP_REG__
553 pushf
554 pusha
555
556 push si
557 mov si, offset regAX
558 call AuxIO_Print
559 call AuxIO_TeletypeHexWord
560 ;~ call AuxIO_TeletypeNL
561
562 call AuxIO_Print
563 mov ax,bx
564 call AuxIO_TeletypeHexWord
565 ;~ call AuxIO_TeletypeNL
566
567 call AuxIO_Print
568 mov ax,cx
569 call AuxIO_TeletypeHexWord
570 ;~ call AuxIO_TeletypeNL
571
572 call AuxIO_Print
573 mov ax,dx
574 call AuxIO_TeletypeHexWord
575 ;~ call AuxIO_TeletypeNL
576
577 call AuxIO_Print
578 pop ax
579 call AuxIO_TeletypeHexWord
580 ;~ call AuxIO_TeletypeNL
581
582 call AuxIO_Print
583 mov ax,di
584 call AuxIO_TeletypeHexWord
585 call AuxIO_TeletypeNL
586
587
588
589 call AuxIO_Print
590 mov ax,cs
591 call AuxIO_TeletypeHexWord
592 ;~ call AuxIO_TeletypeNL
593
594 call AuxIO_Print
595 mov ax,ds
596 call AuxIO_TeletypeHexWord
597 ;~ call AuxIO_TeletypeNL
598
599 call AuxIO_Print
600 mov ax,es
601 call AuxIO_TeletypeHexWord
602 ;~ call AuxIO_TeletypeNL
603
604 call AuxIO_Print
605 mov ax,ss
606 call AuxIO_TeletypeHexWord
607 ;~ call AuxIO_TeletypeNL
608
609 call AuxIO_Print
610 mov ax,sp
611 call AuxIO_TeletypeHexWord
612 ;~ call AuxIO_TeletypeNL
613
614 call AuxIO_Print
615 mov ax,bp
616 call AuxIO_TeletypeHexWord
617 call AuxIO_TeletypeNL
618
619 ;~ call AuxIO_Print
620 ;~ mov ax,fs
621 ;~ call AuxIO_TeletypeHexWord
622 ;~ call AuxIO_TeletypeNL
623
624 ;~ call AuxIO_Print
625 ;~ mov ax,gs
626 ;~ call AuxIO_TeletypeHexWord
627 ;~ call AuxIO_TeletypeNL
628
629 call AuxIO_TeletypeNL
630
631 popa
632 popf
633 ENDIF
634 ret
635DEBUG_DumpRegisters EndP
636
637
638;
639; Dump CHS values.
640;
641__DUMP_CHS__ EQU
642DEBUG_DumpCHS Proc Near
643 IFDEF __DUMP_CHS__
644 pushf
645 pusha
646 mov al,'C'
647 call AuxIO_Teletype
648 mov al,':'
649 call AuxIO_Teletype
650 mov ah,cl
651 shr ah,6
652 mov al,ch
653 call AuxIO_TeletypeHexWord
654 mov al,' '
655 call AuxIO_Teletype
656 mov al,'H'
657 call AuxIO_Teletype
658 mov al,':'
659 call AuxIO_Teletype
660 mov al,dh
661 call AuxIO_TeletypeHexByte
662 mov al,' '
663 call AuxIO_Teletype
664 mov al,'S'
665 call AuxIO_Teletype
666 mov al,':'
667 call AuxIO_Teletype
668 mov al,cl
669 and al,00111111b
670 call AuxIO_TeletypeHexByte
671 call AuxIO_TeletypeNL
672 popa
673 popf
674 ENDIF
675 ret
676DEBUG_DumpCHS EndP
677
678
679;
680; Dump BSS.
681;
682;~ __DUMP_BSS__ EQU
683DEBUG_DumpBSSSectors Proc Near
684 IFDEF __DUMP_BSS__
685 pushf
686 pusha
687
688 mov si, offset [PartitionSector]
689 call AuxIO_DumpSector
690 call AuxIO_TeletypeNL
691
692 mov si, offset [PBRSector]
693 call AuxIO_DumpSector
694 call AuxIO_TeletypeNL
695
696 mov si, offset [LVMSector]
697 call AuxIO_DumpSector
698 call AuxIO_TeletypeNL
699
700 mov si, offset [TmpSector]
701 call AuxIO_DumpSector
702 call AuxIO_TeletypeNL
703
704 mov si, offset [NewPartTable]
705 call AuxIO_DumpSector
706 call AuxIO_TeletypeNL
707 call AuxIO_TeletypeNL
708
709 popa
710 popf
711 ENDIF
712 ret
713DEBUG_DumpBSSSectors EndP
714
715
716;
717; Dump 6-bit packed hide partition table.
718;
719;~ __DUMP_HPT__ EQU
720DEBUG_DumpHidePartTables Proc Near
721 IFDEF __DUMP_HPT__
722 pushf
723 pusha
724
725 mov cx,3
726 mov si, offset [HidePartitionTable]
727 again1:
728 call AuxIO_DumpSector
729 add si,512
730 loop again1
731 call AuxIO_TeletypeNL
732
733 mov cx,3
734 mov si, offset [PartitionXref]
735 again2:
736 call AuxIO_DumpParagraph
737 call AuxIO_TeletypeNL
738 add si,16
739 loop again2
740 call AuxIO_TeletypeNL
741
742 mov cx,3
743 mov si, offset [NewHidePartTable]
744 again3:
745 call AuxIO_DumpSector
746 add si,512
747 loop again3
748 call AuxIO_TeletypeNL
749
750 popa
751 popf
752 ENDIF
753 ret
754DEBUG_DumpHidePartTables EndP
755
756
757;
758; Check the bitfield routines.
759;
760;~ __CBF__ EQU
761DEBUG_CheckBitFields Proc
762 IFDEF __CBF__
763 pushf
764 pusha
765
766 mov bx,offset [ott]
767
768 mov al,0
769 mov dl,0
770 mov dh,6
771 DEBUG_CheckBitFields_next_write:
772 call CONV_SetBitfieldValue
773 inc al
774 inc dl
775 jnz DEBUG_CheckBitFields_next_write
776
777 mov dl,0
778 mov dh,6
779 DEBUG_CheckBitFields_next_read:
780 mov al,dl
781 call AuxIO_TeletypeHexByte
782 mov al,':'
783 call AuxIO_Teletype
784 call CONV_GetBitfieldValue
785 call AuxIO_TeletypeHexWord
786 call AuxIO_TeletypeNL
787 inc dl
788 jnz DEBUG_CheckBitFields_next_read
789
790 popa
791 popf
792 ENDIF
793 ret
794DEBUG_CheckBitFields EndP
795
796
797
798
799;
800; Dump information before the partition is booted.
801;
802;~ __DMP2__ EQU
803DEBUG_Dump2 Proc Near
804 IFDEF __DMP2__
805 pushf
806 pusha
807
808 call AuxIO_TeletypeNL
809 call AuxIO_TeletypeNL
810
811 mov si,offset db_config
812 call AuxIO_Print
813
814 mov si,offset db_cfgparts
815 call AuxIO_Print
816 mov al,[CFG_Partitions]
817 call AuxIO_TeletypeHexByte
818 call AuxIO_TeletypeNL
819
820 mov si,offset db_cfgpartdef
821 call AuxIO_Print
822 mov al,[CFG_PartDefault]
823 call AuxIO_TeletypeHexByte
824 call AuxIO_TeletypeNL
825
826 mov si,offset db_cfgpartlast
827 call AuxIO_Print
828 mov al,[CFG_PartLast]
829 call AuxIO_TeletypeHexByte
830 call AuxIO_TeletypeNL
831 call AuxIO_TeletypeNL
832
833 mov si,offset db_vars
834 call AuxIO_Print
835
836 mov si,offset db_newpart
837 call AuxIO_Print
838 mov si,offset NewPartTable
839 call AuxIO_DumpSector
840 call AuxIO_TeletypeNL
841 add si,512
842 call AuxIO_DumpSector
843 call AuxIO_TeletypeNL
844 call AuxIO_TeletypeNL
845
846 mov si,offset db_newhide
847 call AuxIO_Print
848 mov si,offset NewHidePartTable
849 call AuxIO_DumpSector
850 call AuxIO_TeletypeNL
851 add si,512
852 call AuxIO_DumpSector
853 call AuxIO_TeletypeNL
854 call AuxIO_TeletypeNL
855
856 mov si,offset db_dletters
857 call AuxIO_Print
858 mov si,offset NewDriveLetters
859 call AuxIO_DumpParagraph
860 call AuxIO_TeletypeNL
861 add si,16
862 call AuxIO_DumpParagraph
863 call AuxIO_TeletypeNL
864 call AuxIO_TeletypeNL
865
866 mov si,offset db_tmpec
867 call AuxIO_Print
868 mov si,offset TmpSector
869 call AuxIO_DumpSector
870 call AuxIO_TeletypeNL
871 call AuxIO_TeletypeNL
872
873 mov si,offset db_partsec
874 call AuxIO_Print
875 mov si,offset PartitionSector
876 call AuxIO_DumpSector
877 call AuxIO_TeletypeNL
878 call AuxIO_TeletypeNL
879
880 popa
881 popf
882 ENDIF
883 ret
884DEBUG_Dump2 EndP
885
886
887
888xrt db 10,'XrefTable:',10,0
889ddl db 10,'Driveletters:',10,0
890dvl db 10,'VolumeLetters:',10,0
891dlra db 10,'LVM_DoLetterReassignment: ',0
892ptetb db 10,'Partition Table Entry to boot',10,0
893bios_reg db 10,'Registers passed by BIOS:',10,0
894;~ diopmbr db 10,'DriveIO_ProtectMBR',10,0
895dioss db 10,'DriveIO_SaveSector',10,0
896
897
898;~ db_mbr db "## MBR ##",10,0
899;~ db_masterlvm db "## MLVMR ##",10,0
900
901;~ db_checkmath db "## CHK MATH ##",10,0
902
903
904;~ db_config db '## CFG (DMP2) ##',10,0
905;~ db_cfgparts db 'CFG_Partitions:',0
906;~ db_cfgpartdef db 'CFG_PartDefault:',0
907;~ db_cfgpartlast db 'CFG_PartLast:',0
908
909
910;~ db_vars db '## VARS ##',10,0
911;~ db_partsec db 'PartitionSector:',10,0
912;~ db_lvmsec db 'LVMSector :',10,0
913;~ db_tmpec db 'TmpSector :',10,0
914
915;~ db_newpart db 'NewPartTable :',10,0
916;~ db_newhide db 'NewHideTable:',10,0
917;~ db_dletters db 'NewDriveLetters:',10,0
918
919;~ db_partsize db 'PartitionSizeTable:',10,0
920;~ db_partpoint db 'PartitionPointers:',10,0
921;~ db_partpointcnt db 'PartitionPointerCount:',0
922;~ db_partxref db 'PartitionXref:',10,0
923;~ db_partvoldl db 'PartitionVolumeLetters:',10,0
924
925;~ db_totaldisks db 'TotalHarddiscs:',0
926;~ db_lbaswitchtab db 'LBASwitchTable:',10,0
927;~ db_newparts db 'NewPartitions:',0
928
929;~ db_exabspos db 'ExtendedAbsPos:',0
930;~ db_exabsposset db 'ExtendedAbsPosSet:',0
931
932;~ db_curpartloc db 'CurPartition_Location:',0
933;~ db_curiox db 'CurIO_UseExtension:',0
934
935;~ db_curlvmsec db 'Current LVM Sector:',0
936
937
938;~ drive db 'drive : ',0
939;~ before_lvm_adjust db 'before lvm adjust : ',0
940;~ after_lvm_adjust db 'after lvm adjust : ',0
941;~ before_lvm_adjust_log db 'before lvm logical adjust: ',0
942;~ after_lvm_adjust_log db 'after lvm logical adjust : ',0
943;~ spt_used db 'spt used : ',0
Note: See TracBrowser for help on using the repository browser.