From 20c649d7efe9502b8276ab2c153e0cc4d4f00df7 Mon Sep 17 00:00:00 2001 From: "zik.saleeba" Date: Tue, 5 May 2009 22:12:59 +0000 Subject: [PATCH] Added some changes for umon suggested by Ed Sutter git-svn-id: http://picoc.googlecode.com/svn/trunk@275 21eae674-98b7-11dd-bd71-f92a316d2d60 --- picoc.h | 2 ++ platform.h | 15 +++++++++++++++ platform_unix.c | 1 + 3 files changed, 18 insertions(+) diff --git a/picoc.h b/picoc.h index b9e5463..27d85b6 100644 --- a/picoc.h +++ b/picoc.h @@ -372,5 +372,7 @@ void PlatformPrintf(const char *Format, ...); void PlatformVPrintf(const char *Format, va_list Args); void PlatformExit(); void PlatformLibraryInit(); +void Initialise(); +void Cleanup(); #endif /* PICOC_H */ diff --git a/platform.h b/platform.h index 2a07d67..111ff7b 100644 --- a/platform.h +++ b/platform.h @@ -7,6 +7,7 @@ * #define UNIX_HOST * #define FLYINGFOX_HOST * #define SURVEYOR_HOST + * #define UMON_HOST */ #ifndef SURVEYOR_HOST @@ -80,6 +81,20 @@ extern jmp_buf ExitBuf; # undef INTERACTIVE_PROMPT_LINE # define INTERACTIVE_PROMPT_STATEMENT "> " # define INTERACTIVE_PROMPT_LINE "- " +# else +# ifdef UMON_HOST +# define NO_FP +# include +# include +# include +# include +# include +# include +# include "monlib.h" +# define assert(x) +# undef PlatformSetExitPoint +# define PlatformSetExitPoint() +# endif # endif # endif diff --git a/platform_unix.c b/platform_unix.c index 12b2970..315508a 100644 --- a/platform_unix.c +++ b/platform_unix.c @@ -80,6 +80,7 @@ jmp_buf ExitBuf; /* exit the program */ void PlatformExit() { + *(char *)0 = 'a'; longjmp(ExitBuf, 1); }