summaryrefslogtreecommitdiff
path: root/lib/memoire.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/memoire.c')
-rw-r--r--lib/memoire.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/memoire.c b/lib/memoire.c
index db85ae9..b181015 100644
--- a/lib/memoire.c
+++ b/lib/memoire.c
@@ -95,6 +95,8 @@ static void AfficheBinaire(Uint32 valeur)
/* Ecrit le mot 'valeur' à l'offset 'offset' en mémoire */
void ST(Uint32 offset, Uint32 valeur)
{
+ Uint32 oldOC;
+
switch (offset) {
case 0xffffff02:
fgets(temp, BUFSIZ, stdin);
@@ -124,7 +126,9 @@ void ST(Uint32 offset, Uint32 valeur)
break;
case 0xffffff0a:
litchaine(temp, &memoire_principale[valeur]);
+ oldOC = LireRegistrePC();
ChargeBinaire(temp);
+ EcrireRegistrePC(oldOC);
default:
if (offset < 0 || offset >= TAILLE_MEMOIRE)
exception(1, _("Invalid Memory Adress"));