7 #include <syslinux/video.h>
10 * Write a single character in AL to the console without
11 * mangling any registers; handle video pages correctly.
13 __export
void writechr(char data
)
15 com32sys_t ireg
, oreg
;
17 memset(&ireg
, 0, sizeof ireg
);
18 memset(&oreg
, 0, sizeof oreg
);
19 write_serial(data
); /* write to serial port if needed */
22 syslinux_force_text_mode();
24 if (!(DisplayCon
& 0x1))
29 ireg
.ebx
.b
[0] = 0x07; /* attribute */
30 ireg
.ebx
.b
[1] = *(uint8_t *)BIOS_page
; /* current page */
31 __intcall(0x10, &ireg
, &oreg
);
34 void pm_writechr(com32sys_t
*regs
)
36 writechr(regs
->eax
.b
[0]);