Annotation of /tags/mkinitrd-6_3_1/isolinux/rawcon.inc
Parent Directory | Revision Log
Revision 1133 -
(hide annotations)
(download)
Thu Aug 19 09:50:43 2010 UTC (14 years, 1 month ago) by niro
Original Path: trunk/mkinitrd-magellan/isolinux/rawcon.inc
File size: 1399 byte(s)
Thu Aug 19 09:50:43 2010 UTC (14 years, 1 month ago) by niro
Original Path: trunk/mkinitrd-magellan/isolinux/rawcon.inc
File size: 1399 byte(s)
-updated to isolinux-3.86
1 | niro | 532 | ; |
2 | ; writechr: Write a single character in AL to the console without | ||
3 | ; mangling any registers. This does raw console writes, | ||
4 | ; since some PXE BIOSes seem to interfere regular console I/O. | ||
5 | ; | ||
6 | %if IS_ISOLINUX | ||
7 | writechr_full: | ||
8 | %else | ||
9 | writechr: | ||
10 | %endif | ||
11 | niro | 1133 | pushfd |
12 | niro | 532 | push ds |
13 | push cs | ||
14 | pop ds | ||
15 | niro | 1133 | test byte [UsingVGA], 08h |
16 | jz .videook | ||
17 | call vgaclearmode | ||
18 | .videook: | ||
19 | niro | 532 | call write_serial ; write to serial port if needed |
20 | test byte [DisplayCon],01h ; Write to screen? | ||
21 | jz .nothing | ||
22 | |||
23 | pushad | ||
24 | mov bh,[BIOS_page] | ||
25 | push ax | ||
26 | mov ah,03h ; Read cursor position | ||
27 | int 10h | ||
28 | pop ax | ||
29 | cmp al,8 | ||
30 | je .bs | ||
31 | cmp al,13 | ||
32 | je .cr | ||
33 | cmp al,10 | ||
34 | je .lf | ||
35 | push dx | ||
36 | mov bh,[BIOS_page] | ||
37 | mov bl,07h ; White on black | ||
38 | mov cx,1 ; One only | ||
39 | mov ah,09h ; Write char and attribute | ||
40 | int 10h | ||
41 | pop dx | ||
42 | inc dl | ||
43 | cmp dl,[VidCols] | ||
44 | jna .curxyok | ||
45 | xor dl,dl | ||
46 | .lf: inc dh | ||
47 | cmp dh,[VidRows] | ||
48 | ja .scroll | ||
49 | .curxyok: mov bh,[BIOS_page] | ||
50 | mov ah,02h ; Set cursor position | ||
51 | niro | 1133 | int 10h |
52 | niro | 532 | .ret: popad |
53 | .nothing: | ||
54 | niro | 1133 | pop ds |
55 | niro | 532 | popfd |
56 | ret | ||
57 | .scroll: dec dh | ||
58 | mov bh,[BIOS_page] | ||
59 | mov ah,02h | ||
60 | int 10h | ||
61 | mov ax,0601h ; Scroll up one line | ||
62 | mov bh,[ScrollAttribute] | ||
63 | xor cx,cx | ||
64 | mov dx,[ScreenSize] ; The whole screen | ||
65 | int 10h | ||
66 | jmp short .ret | ||
67 | .cr: xor dl,dl | ||
68 | jmp short .curxyok | ||
69 | .bs: sub dl,1 | ||
70 | jnc .curxyok | ||
71 | mov dl,[VidCols] | ||
72 | sub dh,1 | ||
73 | jnc .curxyok | ||
74 | xor dh,dh | ||
75 | jmp short .curxyok |