1 /*
2 * -----------------------------------------------------------------------
3 *
4 * Copyright 1994-2008 H. Peter Anvin - All Rights Reserved
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
9 * Boston MA 02111-1307, USA; either version 2 of the License, or
10 * (at your option) any later version; incorporated herein by reference.
11 *
12 * -----------------------------------------------------------------------
13 *
14 *
15 * writestr.c
16 *
17 * Code to write a simple string.
18 */
19 #include <com32.h>
20 #include <core.h>
21
22 /*
23 * crlf: Print a newline
24 */
crlf(void)25 void crlf(void)
26 {
27 writechr('\r');
28 writechr('\n');
29 }
30
31 /*
32 * writestr: write a null-terminated string to the console, saving
33 * registers on entry.
34 *
35 * Note: writestr_early and writestr are distinct in
36 * SYSLINUX and EXTLINUX, but not PXELINUX and ISOLINUX
37 */
writestr(char * str)38 void writestr(char *str)
39 {
40 while (*str)
41 writechr(*str++);
42 }
43
pm_writestr(com32sys_t * regs)44 void pm_writestr(com32sys_t *regs)
45 {
46 writestr(MK_PTR(regs->ds, regs->esi.w[0]));
47 }
48