aboutsummaryrefslogtreecommitdiffstats
path: root/sample/c32echo.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-07-26 13:33:37 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2010-07-26 13:36:21 -0700
commit0e2cc408f60fbafecd853751c8638dfe9a9f7c84 (patch)
treeee423bc9d98472ed3813f43ec1bdb5bc53d58ef5 /sample/c32echo.c
parent4f0db90a7e875ed3f8ac2cdb583e24ab14e8bcb4 (diff)
downloadhdt-pierre-0e2cc408f60fbafecd853751c8638dfe9a9f7c84.tar.gz
hdt-pierre-0e2cc408f60fbafecd853751c8638dfe9a9f7c84.tar.xz
hdt-pierre-0e2cc408f60fbafecd853751c8638dfe9a9f7c84.zip
sample: remove obsolete "raw" comboot/com32 samples
We really don't want people to write code without using the library, so just remove these obsolete and no longer functional samples. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'sample/c32echo.c')
-rw-r--r--sample/c32echo.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/sample/c32echo.c b/sample/c32echo.c
deleted file mode 100644
index cfde885d..00000000
--- a/sample/c32echo.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* ----------------------------------------------------------------------- *
- *
- * Copyright 2002-2008 H. Peter Anvin - All Rights Reserved
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
- * Boston MA 02111-1307, USA; either version 2 of the License, or
- * (at your option) any later version; incorporated herein by reference.
- *
- * ----------------------------------------------------------------------- */
-
-/*
- * c32echo.c
- *
- * Simple COM32 program which only prints out its own command line
- */
-
-#include <com32.h>
-
-#define NULL ((void *)0)
-
-static inline void memset(void *buf, int ch, unsigned int len)
-{
- asm volatile ("cld; rep; stosb":"+D" (buf), "+c"(len):"a"(ch):"memory");
-}
-
-int __start(void)
-{
- com32sys_t inreg;
- const char *p;
-
- memset(&inreg, 0, sizeof inreg);
- inreg.eax.b[1] = 0x02; /* Write Character */
-
- for (p = __com32.cs_cmdline; *p; p++) {
- inreg.edx.b[0] = *p;
- __com32.cs_intcall(0x21, &inreg, NULL);
- }
-
- inreg.edx.b[0] = '\r';
- __com32.cs_intcall(0x21, &inreg, NULL);
- inreg.edx.b[0] = '\n';
- __com32.cs_intcall(0x21, &inreg, NULL);
-
- return 0;
-}