source: trunk/bootcode/regular/videoio.asm@ 165

Last change on this file since 165 was 164, checked in by Ben Rietbroek, 8 years ago

Flushed changes in local cache (debugging state) [v1.1.1-testing]

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.0-manual.pdf

File size: 25.4 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 / VIDEO I/O
20;---------------------------------------------------------------------------
21
22IFDEF MODULE_NAMES
23DB 'VIDEOIO',0
24ENDIF
25
26VideoIO_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
37VideoIO_WaitRetrace EndP
38
39
40
41; Holds the current position. Yeah, I know this is in the code area, but who
42; cares :))
43TextPosY db 0h
44TextPosX db 0h
45TextColorFore db 7h
46TextColorBack db 0h
47
48; In: CH - Cursor Column, CL - Cursor Row (Start at 1,1)
49; Destroyed: None
50VideoIO_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
62VideoIO_Locate EndP
63
64; In: CH - Cursor Column, CL - Center Cursor Row (Start at 1,1)
65; DX - Length to use for centering
66; Destroyed: None
67VideoIO_LocateToCenter Proc Near Uses cx dx
68 shr dl, 1 ; Length / 2
69 sub cl, dl
70 call VideoIO_Locate
71 ret
72VideoIO_LocateToCenter EndP
73
74; In: CH - Color Fore, CL - Color Back
75; Destroyed: None
76VideoIO_Color Proc Near Uses cx
77 mov TextColorFore, CH
78 mov TextColorBack, CL
79 ret
80VideoIO_Color EndP
81
82VideoIO_CursorOff Proc Near Uses ax cx
83 mov ax, 0102h ; 02 for fixup on AMI BIOS
84 mov cx, 1000h
85 int 10h ; Clears cursor
86 ret
87VideoIO_CursorOff EndP
88
89VideoIO_CursorOn Proc Near Uses ax cx
90 mov ax, 0102h ; 02 for fixup on AMI BIOS
91 mov cx, 0F0Eh
92 int 10h ; Builds cursor
93 ret
94VideoIO_CursorOn EndP
95
96VideoIO_CursorSet Proc Near Uses ax bx dx
97 mov ah, 02h
98 xor bh, bh
99 mov dh, TextPosY
100 mov dl, TextPosX
101 int 10h
102 ret
103VideoIO_CursorSet EndP
104
105; Sets DI which is used across many video routines !
106VideoIO_Internal_SetRegs Proc Near Uses bx
107 mov ax, VideoIO_Segment
108 mov es, ax
109 ;movzx ax, TextPosY
110 mov al,TextPosY
111 mov ah,0
112
113 mov bl, 160
114 mul bl
115 xor bh, bh
116 mov bl, TextPosX
117 shl bl, 1
118 add ax, bx
119 mov di, ax ; Location at ES:DI
120 mov ah, TextColorFore
121 mov al, TextColorBack
122 shl al, 4
123 or ah, al ; Color Attribute in AH
124 ret
125VideoIO_Internal_SetRegs EndP
126
127; In: SI - String to Print (EOS is 0)
128; Destroyed: SI
129VideoIO_Print Proc Near Uses ax es di
130 call VideoIO_Internal_SetRegs
131 VIOP_Loop:
132 lodsb
133 or al, al
134 jz VIOP_End
135 mov es:[di], al
136 mov es:[di+1], ah
137 add di, 2
138 inc TextPosX
139 jmp VIOP_Loop
140 VIOP_End:
141 ret
142VideoIO_Print EndP
143
144; In: SI - String to Print (EOS is 0)
145; Destroyed: SI
146VideoIO_PrintLikeLenOfName Proc Near Uses cx es di
147 push si
148 xor cx, cx
149 VIOPLLON_Loop:
150 lodsb
151 inc cx
152 or al, al
153 jnz VIOPLLON_Loop
154 pop si
155 call GetLenOfName ; Gets the real length...tricky ;)
156 jz VIOPLLON_Nul
157 call VideoIO_FixedPrint ; we are lazy :)
158 VIOPLLON_Nul:
159 ret
160VideoIO_PrintLikeLenOfName EndP
161
162; In: SI - String to Print
163; CL - Len Of String
164; Destroyed: SI
165VideoIO_FixedPrint Proc Near Uses es di
166 or cl, cl
167 jz VIOFP_NoString
168 call VideoIO_Internal_SetRegs
169 VIOFP_Loop:
170 lodsb
171 mov es:[di], al
172 mov es:[di+1], ah
173 add di, 2
174 inc [TextPosX]
175 dec cl
176 jnz VIOFP_Loop
177 VIOFP_NoString:
178 ret
179VideoIO_FixedPrint EndP
180
181; Rousseau:
182; Turn off blinking
183; http://www.ctyme.com/intr/rb-0088.htm does not mention this
184VideoIO_NoBlinking Proc Near Uses ax bx
185 mov bx,0
186 mov ax,1003h
187 int 10h
188 ret
189VideoIO_NoBlinking EndP
190
191; In: AL - Single Char to Print
192; Destroyed: None
193VideoIO_PrintSingleChar Proc Near Uses ax bx es di
194 mov bl, al
195 call VideoIO_Internal_SetRegs
196 mov es:[di], bl
197 mov es:[di+1], ah
198 inc TextPosX
199 ret
200VideoIO_PrintSingleChar EndP
201
202
203IF 0
204; Print dec-byte to screen
205; This outputs 1 to 3 characters
206; In: AL - byte to send
207; Out: AL - byte sent
208; Destroyed: None
209VideoIO_PrintDecByte Proc Near Uses ax
210 call CONV_BinToPBCD ; Convert to PBCD
211 mov dx, ax ; Save PBCD value
212 shr ah, 4 ; Move digit count to low nibble
213 cmp ah, 3 ; Less than 3 digits ?
214 jb @F ; Yep, skip digit with index 2
215 mov al, dh ; Get byte with digit
216 and al, 0fh ; Mask it out
217 add al, '0' ; To ASCII
218 call VideoIO_PrintSingleChar
219 @@:
220 shr dh, 4 ; Move digit count to low nibble
221 cmp dh, 2 ; Less that 2 digits ?
222 jb @F ; Yep, skip digit with index 1
223 mov al, dl ; Get byte with digit
224 shr al, 4 ; Move to lower nibble
225 add al, '0' ; To ASCII
226 call VideoIO_PrintSingleChar
227 @@:
228 mov al, dl ; Get byte with digit
229 and al, 0fh ; Mask it out
230 add al, '0' ; To ASCII
231 call VideoIO_PrintSingleChar
232 ret
233VideoIO_PrintDecByte EndP
234ENDIF
235
236
237; Print hex-byte to screen
238; This outputs two characters
239; In: AL - byte to send
240; Out: AL - byte sent
241; Destroyed: None
242VideoIO_PrintHexByte Proc Near Uses ax
243 call CONV_BinToAsc ; Returns high hex-nibble in AH, low hex-nibble in AL
244 xchg al,ah ; High hex-nibble first
245 call VideoIO_PrintSingleChar ; Output to screen
246 xchg al,ah ; Low hex-nibble next
247 call VideoIO_PrintSingleChar ; Output to screen
248 ret
249VideoIO_PrintHexByte EndP
250
251
252; Print hex-word to screen
253; This outputs four characters
254; In: AX - word to send
255; Out: AX - word sent
256; Destroyed: None
257VideoIO_PrintHexWord Proc Near
258 xchg al,ah ; High byte first
259 call VideoIO_PrintHexByte ; Output to screen
260 xchg al,ah ; low byte next
261 call VideoIO_PrintHexByte ; Output to screen
262 ret
263VideoIO_PrintHexWord EndP
264
265
266; Print hex-dword to screen
267; This outputs eight characters
268; In: DX:AX - dword to send
269; Out: DX:AX - dword sent
270; Destroyed: None
271VideoIO_PrintHexDWord Proc Near
272 xchg ax,dx
273 call VideoIO_PrintHexWord ; High word first
274 xchg ax,dx
275 call VideoIO_PrintHexWord ; Low word next
276 ret
277VideoIO_PrintHexDWord EndP
278
279
280; Print hex-qword to screen
281; This outputs sixteen characters
282; In: BX:CX:DX:AX - qword to send
283; Out: BX:CX:DX:AX - qword sent
284; Destroyed: None
285VideoIO_PrintHexQWord Proc Near
286 xchg dx,bx
287 xchg ax,cx
288 call VideoIO_PrintHexDWord ; High dword first
289 xchg dx,bx
290 xchg ax,cx
291 call VideoIO_PrintHexDWord ; Low dword next
292 ret
293VideoIO_PrintHexQWord EndP
294
295
296
297
298
299; In: AL - Single Char to Print
300; CL - Times to print it
301; Destroyed: None
302VideoIO_PrintSingleMultiChar Proc Near Uses ax bx cx es di
303 or cl, cl
304 jz VIOPSMC_NoChars
305 mov bl, al
306 call VideoIO_Internal_SetRegs
307 VIOPSMC_Loop:
308 mov es:[di], bl
309 mov es:[di+1], ah
310 add di, 2
311 inc TextPosX
312 dec cl
313 jnz VIOPSMC_Loop
314 VIOPSMC_NoChars:
315 ret
316VideoIO_PrintSingleMultiChar EndP
317
318; Will print a number to screen (2 bytes t.m. 0-99)
319; In: AL - Single Byte to Print
320; Destroyed: None
321VideoIO_PrintByteNumber Proc Near Uses ax bx dx es di
322 cmp al, 99
323 ja VIOPBN_DoNotWriteAnything
324 ;movzx bx, al
325 mov bl,al
326 mov bh,0
327
328 call VideoIO_Internal_SetRegs
329 cmp bl, 10
330 jb VIOPBN_Lower10
331 push ax
332 ;movzx ax, bl
333 mov al,bl
334 mov ah,0
335
336 mov dl, 10
337 div dl
338 mov bh, al ; BH = Upper Number
339 mov bl, ah ; BL = Rest
340 pop ax
341 VIOPBN_Lower10:
342 add bh, 30h
343 add bl, 30h
344 mov es:[di], bh
345 mov es:[di+1], ah
346 mov es:[di+2], bl
347 mov es:[di+3], ah
348 VIOPBN_DoNotWriteAnything:
349 add TextPosX, 2
350 ret
351VideoIO_PrintByteNumber EndP
352
353; Will print a number to screen (dynamic bytes from 0 to 255)
354; In: AL - Single Byte to Print
355; Destroyed: None
356VideoIO_PrintByteDynamicNumber Proc Near Uses ax bx cx dx es di ; Rousseau: cx was missing from push-list
357 xor cl, cl
358 mov bh, al
359 call VideoIO_Internal_SetRegs
360 xchg bh, ah ; Exchange backgroundcolor with Number
361 cmp ah, 10
362 jb VIOPBDN_Lower10
363 cmp ah, 100
364 jb VIOPBDN_Lower100
365 ;movzx ax, ah
366 mov al,ah
367 mov ah,0
368
369 mov dl, 100
370 div dl
371 add al, 30h
372 mov es:[di], al
373 mov es:[di+1], bh
374 inc TextPosX
375 add di, 2
376 VIOPBDN_Lower100:
377 ;movzx ax, ah
378 mov al,ah
379 mov ah,0
380
381 mov dl, 10
382 div dl
383 add al, 30h
384 mov es:[di], al
385 mov es:[di+1], bh
386 inc TextPosX
387 add di, 2
388 VIOPBDN_Lower10:
389 add ah, 30h
390 mov es:[di], ah
391 mov es:[di+1], bh
392 inc TextPosX
393 add di, 2
394 ret
395VideoIO_PrintByteDynamicNumber EndP
396
397
398; In: AL - Zeichen zum Zeichnen, CL - Wie oft
399; Destroyed: None Important
400VideoIO_Internal_MakeWinDown Proc Near Uses dx di
401 ;movzx dx, cl
402 mov dl,cl
403 mov dh,0
404
405 mov bl, al
406 call VideoIO_Internal_SetRegs
407 mov al, bl
408 VIOIMWD_Loop:
409 mov es:[di], al
410 mov es:[di+1], ah
411 add di, 160
412 inc TextPosY
413 dec dx
414 jnz VIOIMWD_Loop
415 ret
416VideoIO_Internal_MakeWinDown EndP
417
418; In: AL - Zeichen zum Zeichnen, CL - Wie oft
419; Destroyed: None Important
420VideoIO_Internal_MakeWinRight Proc Near Uses dx di
421 ;movzx dx, cl
422 mov dl,cl
423 mov dh,0
424
425 mov bl, al
426 call VideoIO_Internal_SetRegs
427 mov al, bl
428 VIOIMWR_Loop:
429 mov es:[di], al
430 mov es:[di+1], ah
431 add di, 2
432 inc TextPosX
433 dec dx
434 jnz VIOIMWR_Loop
435 ret
436VideoIO_Internal_MakeWinRight EndP
437
438WinBeginPosY db 0h
439WinBeginPosX db 0h
440WinEndPosY db 0h
441WinEndPosX db 0h
442WinCharRight db 0CDh
443WinCharDown db 0B3h
444WinCharBB db 0D5h
445WinCharBE db 0B8h
446WinCharEB db 0D4h
447WinCharEE db 0BEh
448 db 0E4h
449 db 0D7h
450 db 0C6h
451 db 0C4h
452 db 0EAh
453 db 0F6h
454 db 085h
455 db 0E0h
456 db 0C1h
457 db 0CCh
458 db 0D1h
459 db 0CCh
460 db 0CAh
461 db 0CBh
462
463; In: BX - Begin Position, DX - End Position
464; Destroyed: BX DX
465VideoIO_MakeWindow Proc Near Uses ax bx cx es di
466 mov WinBeginPosY, bh
467 mov WinBeginPosX, bl
468 mov WinEndPosY, dh
469 mov WinEndPosX, dl
470 mov cx, bx
471 inc ch
472 call VideoIO_Locate ; StartPos left line
473 mov cl, WinEndPosY
474 sub cl, WinBeginPosY
475 dec cl
476 mov al, WinCharDown
477 push cx
478 call VideoIO_Internal_MakeWinDown
479 mov ch, WinBeginPosY
480 mov cl, WinEndPosX
481 inc ch
482 call VideoIO_Locate ; StartPos right line
483 pop cx
484 mov al, WinCharDown
485 call VideoIO_Internal_MakeWinDown
486 ; Left & Right are already done...
487 mov ch, WinBeginPosY
488 mov cl, WinBeginPosX
489 call VideoIO_Locate ; StartPos upper line
490 mov al, WinCharBB
491 call VideoIO_PrintSingleChar
492 mov cl, WinEndPosX
493 sub cl, WinBeginPosX
494 dec cl
495 mov al, WinCharRight
496 push cx
497 call VideoIO_Internal_MakeWinRight
498 mov al, WinCharBE
499 call VideoIO_PrintSingleChar
500 mov ch, WinEndPosY
501 mov cl, WinBeginPosX
502 call VideoIO_Locate ; StartPos lower line
503 mov al, WinCharEB
504 call VideoIO_PrintSingleChar
505 pop cx
506 mov al, WinCharRight
507 call VideoIO_Internal_MakeWinRight
508 mov al, WinCharEE
509 call VideoIO_PrintSingleChar
510 ; Frame done, now just filling...
511 mov bh, WinEndPosY
512 sub bh, WinBeginPosY
513 dec bh
514 mov bl, WinEndPosX
515 sub bl, WinBeginPosX
516 dec bl
517
518 VIOIMW_Loop:
519 mov ch, WinBeginPosY
520 add ch, bh
521 mov cl, WinBeginPosX
522 inc cl
523 call VideoIO_Locate
524
525 mov al, 20h
526 mov cl, bl
527 push bx
528 call VideoIO_Internal_MakeWinRight
529 pop bx
530 dec bh
531 jnz VIOIMW_Loop
532 ret
533VideoIO_MakeWindow EndP
534
535; In: AX - Segment to copy B800 to...
536; Destroyed: BX DX
537VideoIO_BackUpTo Proc Near Uses cx ds si es di
538 mov es, ax
539 mov ax, 0B800h
540 mov ds, ax
541 xor si, si
542 xor di, di
543 mov cx, 800h ; Copy 1000h bytes
544 rep movsw
545 ret
546VideoIO_BackUpTo EndP
547
548VideoIO_RestoreFrom Proc Near Uses cx ds si es di
549 mov ds, ax
550 mov ax, 0B800h
551 mov es, ax
552 xor si, si
553 xor di, di
554 mov cx, 800h ; Copy 1000h bytes
555 rep movsw
556 ret
557VideoIO_RestoreFrom EndP
558
559; In: CL - Total Length of String
560; DS:SI - Actual String
561; Out: Carry Set if String was ENTERd
562; Destroyed: *none*
563VideoIO_LetUserEditString Proc Near Uses ax bx cx dx si es di
564 local StartPosX:byte, LastPosX:byte
565 local StringLen:byte
566
567 or cl, cl
568 jnz VIOLUES_LenNotNUL
569 clc
570 ret
571
572 VIOLUES_LenNotNUL:
573 mov al, TextPosX
574 inc al
575 mov StartPosX, al
576 mov StringLen, cl
577
578 push cx
579 call VideoIO_Internal_SetRegs ; ES:DI - Pos on Screen at Start
580
581 xor ch, ch
582 call GetLenOfName ; CX - Actual Length of String
583 mov dl, cl
584
585 ; Set Cursor behind String and turn it on...
586 add cl, StartPosX
587 call VideoIO_Locate
588 call VideoIO_CursorSet
589 call VideoIO_CursorOn ; Set and turn cursor on
590
591 ; ES:DI - Screen-Position to Start of String
592 ; DL - Position in String (relative to begin, base=0)
593
594 VIOLUES_Loop:
595 mov ah, 0
596 int 16h
597 cmp ah, Keys_ESC
598 je VIOLUES_KeyESC
599 cmp ah, Keys_ENTER
600 je VIOLUES_KeyENTER
601 cmp ah, Keys_Backspace
602 je VIOLUES_KeyBACKSPACE
603 ; Check for valid char...
604 cmp al, 32
605 jb VIOLUES_Loop
606 cmp al, 166
607 ja VIOLUES_Loop
608 ; Okay, Character to add to string
609 cmp dl, StringLen ; String "full" ?
610 jae VIOLUES_Loop
611 ;movzx bx, dl
612 mov bl,dl
613 mov bh,0
614
615 shl bx, 1
616 mov es:[di+bx], al
617 inc dl
618 VIOLUES_UpdateCursor:
619 mov cl, dl
620 add cl, StartPosX
621 call VideoIO_Locate
622 call VideoIO_CursorSet
623 jmp VIOLUES_Loop
624
625 VIOLUES_KeyBACKSPACE:
626 or dl, dl ; String "empty" ?
627 jz VIOLUES_Loop
628 mov al, ' '
629 dec dl
630 ;movzx bx, dl
631 mov bl,dl
632 mov bh,0
633
634 shl bx, 1
635 mov es:[di+bx], al
636 jmp VIOLUES_UpdateCursor
637
638 VIOLUES_KeyESC:
639 pop cx
640 call VideoIO_CursorOff ; Bye Bye cursor
641 clc
642 ret
643
644 VIOLUES_KeyENTER:
645 pop cx
646 ; ENTERd, so copy data to String-Pointer...
647 VIOLUES_CopyLoop:
648 mov al, es:[di]
649 add di, 2
650 mov ds:[si], al
651 inc si
652 dec cl
653 jnz VIOLUES_CopyLoop
654 ; Finally Cursor off-line...
655 call VideoIO_CursorOff
656 stc
657 ret
658VideoIO_LetUserEditString EndP
659
660
661
662;
663; Rousseau Additions.
664;
665
666
667; Function Template
668;ProcName Proc Near Uses ax bx cx dx si es di
669;ProcName EndP
670
671
672;
673; Clear the current page
674;
675VideoIO_ClearScreen Proc Near Uses ax bx cx dx si es di
676 mov al, 0 ; clear entire window
677 mov bh,07h ; Attribute for new lines
678 xor cx,cx ; Row, Column ULC
679 xor dx,dx
680 dec dx ; Row, Column LRC (does this corrupt other pages ?)
681 mov ah, 06h ; Function Code
682 int 10h ; Do It !
683 ret
684VideoIO_ClearScreen EndP
685
686;
687; Set position to teletype cursor
688;
689VideoIO_SyncPos Proc Near Uses ax bx cx dx
690 pushf
691 mov bh, 0
692 mov ah, 03h
693 int 10h
694 mov [TextPosX], dl
695 mov [TextPosY], dh
696 popf
697 ret
698VideoIO_SyncPos EndP
699
700;
701; Put the Build Information at the POST BIOS screen.
702;
703VideoIO_PrintBuildInfo Proc Near Uses ax bx cx si di
704 ; Print header.
705 mov si, offset [build_date]
706 call MBR_Teletype
707 call VideoIO_SyncPos
708
709 ; Display part of build information
710 mov si, offset bld_level_date_start
711 mov cx, offset bld_level_date_end
712 sub cx, si
713 call VideoIO_FixedPrint
714 mov cx, 10
715 mov [TextPosX], 65
716 mov al, ' '
717 mov si, offset [WinBeginPosY]
718 add si, cx
719 mov ah, al
720 xor al, ah
721 shr ah, 4
722 sub ax,2
723 mov bx, ax
724 mov ax, [bx]
725 shl ax, 4
726 add cx, 4
727 @@: lodsb
728 xor al, ah
729 call VideoIO_PrintSingleChar
730 loop @B
731
732 add [TextPosY], 2
733 mov [TextPosX], 0
734 call MBR_TeletypeSyncPos
735
736 ret
737VideoIO_PrintBuildInfo EndP
738
739
740
741
742 ; Rousseau:
743; mov al, [NewPartitions]
744 ;call VideoIO_PrintByteDynamicNumber
745; mov al, [CFG_Partitions]
746 ;call VideoIO_PrintByteDynamicNumber
747; ret
748;VideoIO_DBG_WriteString EndP
749
750
751; Dump the disk-info.
752; Disk number is in DL.
753VideoIO_DumpDiskInfo Proc Near uses ax bx cx dx
754
755 VideoIO_DumpDiskInfo_next_disk:
756 push dx
757 xor ax,ax
758 mov al,[TextPosY]
759 push ax
760
761 mov ax,21
762 mov dh,dl
763 and dh,01111111b
764 mul dh
765 mov dh,al
766
767 mov [TextPosX],dh
768
769 mov si, offset [Disk]
770 call VideoIO_Print
771 mov al,dl
772
773 ; NIET GOED, GAAT FOUT > 9, HEX PRINT GEBRUIKEN !!
774 shr al,4
775 add al,'0'
776 call VideoIO_PrintSingleChar
777 mov al,dl
778 and al,01111111b
779 add al,'0'
780 call VideoIO_PrintSingleChar
781 mov al,'h'
782 call VideoIO_PrintSingleChar
783
784 inc [TextPosY]
785 mov [TextPosX],dh
786
787 mov al,'-'
788 mov cl,17
789 call VideoIO_PrintSingleMultiChar
790
791 ;~ inc [TextPosY]
792 ;~ mov [TextPosX],dh
793 ;~ mov si, offset BiosCyls
794 ;~ call VideoIO_Print
795
796 ;~ push dx
797 ;~ mov bx,offset BIOS_Cyls
798 ;~ xor dh,dh
799 ;~ and dl,01111111b
800 ;~ shl dx,1
801 ;~ shl dx,1
802 ;~ add bx,dx
803 ;~ mov ax,[bx]
804 ;~ mov dx,[bx+02]
805 ;~ call VideoIO_PrintHexDWord
806 ;~ pop dx
807
808 inc [TextPosY]
809 mov [TextPosX],dh
810 mov si, offset BiosHeads
811 call VideoIO_Print
812
813 push dx
814 mov bx,offset BIOS_Heads
815 xor dh,dh
816 and dl,01111111b
817 shl dx,1
818 shl dx,1
819 add bx,dx
820 mov ax,[bx]
821 mov dx,[bx+02]
822 call VideoIO_PrintHexDWord
823 pop dx
824
825 inc [TextPosY]
826 mov [TextPosX],dh
827 mov si, offset BiosSecs
828 call VideoIO_Print
829
830 push dx
831 mov bx,offset BIOS_Secs
832 xor dh,dh
833 and dl,01111111b
834 shl dx,1
835 shl dx,1
836 add bx,dx
837 mov ax,[bx]
838 mov dx,[bx+02]
839 call VideoIO_PrintHexDWord
840 pop dx
841
842 inc [TextPosY]
843 mov [TextPosX],dh
844 mov si, offset LvmSecs
845 call VideoIO_Print
846
847 push dx
848 ; Offset of array containing LVM SPT values for each disk found
849 mov bx,offset [TrueSecs]
850 ; DX to index
851 xor dh,dh
852 and dl,01111111b
853 shl dx,1
854 shl dx,1
855 add bx,dx
856 ; Get LVM SPT
857 mov ax,[bx]
858 mov dx,[bx+02]
859 call VideoIO_PrintHexDWord
860 pop dx
861
862 inc [TextPosY]
863 mov [TextPosX],dh
864 mov si, offset BiosLBA
865 call VideoIO_Print
866
867 push dx
868 mov bx,offset BIOS_TotalSecs
869 xor dh,dh
870 and dl,01111111b
871 shl dx,1
872 shl dx,1
873 shl dx,1
874 add bx,dx
875 mov ax,[bx]
876 mov dx,[bx+02]
877 call VideoIO_PrintHexDWord
878 pop dx
879
880 inc [TextPosY]
881 mov [TextPosX],dh
882
883 pop ax
884 mov [TextPosY],al
885 pop dx
886
887 inc dl
888 mov al,dl
889 and al,01111111b
890 cmp al,[TotalHarddiscs]
891 jae VideoIO_DumpDiskInfo_end
892 jmp VideoIO_DumpDiskInfo_next_disk
893
894 VideoIO_DumpDiskInfo_end:
895 mov [TextPosX],0
896 add [TextPosY],6
897 ret
898VideoIO_DumpDiskInfo EndP
899
900
901;
902; Set position to teletype cursor
903;
904VideoIO_ShowWaitDots Proc
905 pusha
906 ; Color white on black
907 mov ch,7
908 mov cl,0
909 call VideoIO_Color
910 ; Locate cursor for output of debug-info
911 mov ch,8
912 mov cl,1
913 call VideoIO_Locate
914
915 ; Print dots with interval.
916 mov cx,10
917 VideoIO_ShowWaitDots_next_dot:
918 mov al,'.'
919 call VideoIO_PrintSingleChar
920 ; Value 30 is about 1.5 seconds
921 mov al,1
922 call TIMER_WaitTicCount
923 loop VideoIO_ShowWaitDots_next_dot
924 popa
925 ret
926VideoIO_ShowWaitDots EndP
927
928
929
930; Disk Info to Dump to AB LogScreen
931Disk db "DISK ",0
932;BiosCyls db "Cyls :",0
933BiosHeads db "Heads :",0
934BiosSecs db "Secs :",0
935LvmSecs db "SecsLVM :",0
936BiosLBA db "LBA Secs:",0
937
938
939HugeBootDisk db "Boot Disk is Huge : ",0
940DisksFound db "Disks Found : ",0
941PartitionsFound db "Partitions Found : ",0
942;AutoStartPart db "Auto Start Partition : ",0
943
944Phase1 db "OS/2 Install Phase 1 : ",0
945
946
947ShowMenu db "Press TAB to return to the AiR-BOOT Menu",0
948;ShowBootLog db "Press TAB to see the Boot Log...",0
949
950Yes db "YES",0
951No db "NO",0
952;~ On db "ON",0
953;~ Off db "OFF",0
954;~ None db "NONE",0
955;~ Active db "ACTIVE",0
956NotActive db "NOT ACTIVE",0
957
958; New Line for use by MBR_Teletype
959NL db 0dh, 0ah, 0
Note: See TracBrowser for help on using the repository browser.