summaryrefslogtreecommitdiff
path: root/lib/memoire.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/memoire.c')
-rw-r--r--lib/memoire.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/memoire.c b/lib/memoire.c
index 0bbd367..e191735 100644
--- a/lib/memoire.c
+++ b/lib/memoire.c
@@ -1,6 +1,13 @@
#include "memoire.h"
#include "interne.h"
#include "simulator.h"
+#include "exceptions.h"
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#else
+#define _(x) x
+#endif
+
/*****************************************/
/** **/
@@ -15,7 +22,7 @@ Uint32 LD(Uint32 offset)
Reset(&i);
if (offset < 0 || offset >= TAILLE_MEMOIRE) {
- Set(&Err_Mem);
+ exception(1,_("Invalid Memory Adress"));
return (i);
} else {
i = memoire_principale[offset];
@@ -27,7 +34,7 @@ Uint32 LD(Uint32 offset)
void ST(Uint32 offset, Uint32 valeur)
{
if (offset < 0 || offset >= TAILLE_MEMOIRE)
- Set(&Err_Mem);
+ exception(1,_("Invalid Memory Adress"));
else
memoire_principale[offset] = valeur;
}