source: bootcd/isolinux/syslinux-6.03/core/plaincon.c @ dd1be7c

Last change on this file since dd1be7c was e16e8f2, checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago

bootstuff

  • Property mode set to 100644
File size: 777 bytes
Line 
1#include <sys/io.h>
2#include <fs.h>
3#include <com32.h>
4
5#include "bios.h"
6#include "graphics.h"
7#include <syslinux/video.h>
8
9/*
10 * Write a single character in AL to the console without
11 * mangling any registers; handle video pages correctly.
12 */
13__export void writechr(char data)
14{
15        com32sys_t ireg, oreg;
16
17        memset(&ireg, 0, sizeof ireg);
18        memset(&oreg, 0, sizeof oreg);
19        write_serial(data);     /* write to serial port if needed */
20
21        if (UsingVGA & 0x8)
22                syslinux_force_text_mode();
23
24        if (!(DisplayCon & 0x1))
25                return;
26
27        ireg.eax.b[0] = data;
28        ireg.eax.b[1] = 0xE;
29        ireg.ebx.b[0] = 0x07;   /* attribute */
30        ireg.ebx.b[1] = *(uint8_t *)BIOS_page; /* current page */
31        __intcall(0x10, &ireg, &oreg);
32}
33
34void pm_writechr(com32sys_t *regs)
35{
36        writechr(regs->eax.b[0]);
37}
Note: See TracBrowser for help on using the repository browser.