Releasing debian version 6.02~pre8+dfsg-1.
[syslinux-debian/hramrach.git] / core / plaincon.c
blob8f8ca7ca667e9323eb7e34e7dc9c06420eba42c4
1 #include <sys/io.h>
2 #include <fs.h>
3 #include <com32.h>
5 #include "bios.h"
6 #include "graphics.h"
8 /*
9 * Write a single character in AL to the console without
10 * mangling any registers; handle video pages correctly.
12 __export void writechr(char data)
14 com32sys_t ireg, oreg;
16 write_serial(data); /* write to serial port if needed */
18 if (UsingVGA & 0x8)
19 syslinux_force_text_mode();
21 if (!(DisplayCon & 0x1))
22 return;
24 ireg.eax.b[0] = data;
25 ireg.eax.b[1] = 0xE;
26 ireg.ebx.b[0] = 0x07; /* attribute */
27 ireg.ebx.b[1] = *(uint8_t *)BIOS_page; /* current page */
28 __intcall(0x10, &ireg, &oreg);
31 void pm_writechr(com32sys_t *regs)
33 writechr(regs->eax.b[0]);