summaryrefslogtreecommitdiff
path: root/core/hello.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-14 20:17:43 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-14 20:17:43 -0700
commit4519c2a7adde441ef01bdd66864269419d703af8 (patch)
treedc780c8e0fb610704b5417edf13e0c9a88f8a250 /core/hello.c
parent1fef0a581bf584223ad87bdaf729ccb986abb49f (diff)
downloadsyslinux-4519c2a7adde441ef01bdd66864269419d703af8.tar.gz
core: make the COMBOOT API available to in-kernel PM code
Make it possible to call the COMBOOT API from in-kernel PM code, simply by setting up the COMBOOT API earlier and only tearing it down during final shutdown. WARNING: the COMBOOT API is quite possibly probably not reentrant; I haven't checked it... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/hello.c')
-rw-r--r--core/hello.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/core/hello.c b/core/hello.c
index c4b28032..6c12c738 100644
--- a/core/hello.c
+++ b/core/hello.c
@@ -3,18 +3,14 @@
void myputchar(int c)
{
-#if 1
static com32sys_t ireg;
+ static uint16_t *vram = 0xb8000;
- ireg.eax.b[1] = 0x0e;
- ireg.eax.b[0] = c;
- ireg.ebx.w[0] = 0x0007;
- core_intcall(0x10, &ireg, NULL);
-#else
- static uint16_t *vram = (void *)0xb8000;
+ ireg.eax.b[1] = 0x02;
+ ireg.edx.b[0] = c;
+ core_intcall(0x21, &ireg, NULL);
- *vram++ = (uint8_t)c + 0x1f00;
-#endif
+ *vram++ = c + 0x1f00;
}
void myputs(const char *str)