refstr_get(): handle NULL, force inline
[profile/ivi/syslinux.git] / plaincon.inc
1 ;
2 ; writechr:     Write a single character in AL to the console without
3 ;               mangling any registers; handle video pages correctly.
4 ;
5                 section .text
6
7 writechr:
8                 call write_serial       ; write to serial port if needed
9                 pushfd
10                 test byte [cs:UsingVGA], 08h
11                 jz .videook
12                 call vgaclearmode
13 .videook:
14                 test byte [cs:DisplayCon], 01h
15                 jz .nothing
16                 pushad
17                 mov ah,0Eh
18                 mov bl,07h              ; attribute
19                 mov bh,[cs:BIOS_page]   ; current page
20                 int 10h
21                 popad
22 .nothing:
23                 popfd
24                 ret