summaryrefslogtreecommitdiff
path: root/examples/hello_world.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-07-24 23:38:38 +0000
committerwdenk <wdenk>2003-07-24 23:38:38 +0000
commit27b207fd0a0941b03f27e2a82c0468b1a090c745 (patch)
tree4d339d7a2a00889f09a876425ce430be57de56e9 /examples/hello_world.c
parent2535d60277cc295adf75cd5721dcecd840c69a63 (diff)
downloadu-boot-imx-27b207fd0a0941b03f27e2a82c0468b1a090c745.zip
u-boot-imx-27b207fd0a0941b03f27e2a82c0468b1a090c745.tar.gz
u-boot-imx-27b207fd0a0941b03f27e2a82c0468b1a090c745.tar.bz2
* Implement new mechanism to export U-Boot's functions to standalone
applications: instead of using (PPC-specific) system calls we now use a jump table; please see doc/README.standalone for details * Patch by Dave Westwood, 24 Jul 2003: added support for Unity OS (a proprietary OS)
Diffstat (limited to 'examples/hello_world.c')
-rw-r--r--examples/hello_world.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/examples/hello_world.c b/examples/hello_world.c
index 96204c4..9317f6d 100644
--- a/examples/hello_world.c
+++ b/examples/hello_world.c
@@ -22,28 +22,33 @@
*/
#include <common.h>
-#include <syscall.h>
+#include <exports.h>
int hello_world (int argc, char *argv[])
{
int i;
- mon_printf ("Hello World\n");
+ /* Print the ABI version */
+ app_startup(argv);
+ printf ("Example expects ABI version %d\n", XF_VERSION);
+ printf ("Actual U-Boot ABI version %d\n", (int)get_version());
- mon_printf ("argc = %d\n", argc);
+ printf ("Hello World\n");
+
+ printf ("argc = %d\n", argc);
for (i=0; i<=argc; ++i) {
- mon_printf ("argv[%d] = \"%s\"\n",
+ printf ("argv[%d] = \"%s\"\n",
i,
argv[i] ? argv[i] : "<NULL>");
}
- mon_printf ("Hit any key to exit ... ");
- while (!mon_tstc())
+ printf ("Hit any key to exit ... ");
+ while (!tstc())
;
/* consume input */
- (void) mon_getc();
+ (void) getc();
- mon_printf ("\n\n");
+ printf ("\n\n");
return (0);
}