summaryrefslogtreecommitdiff
path: root/lib/simulator.c
diff options
context:
space:
mode:
authorbiouman <>2001-04-15 16:57:11 +0000
committerbiouman <>2001-04-15 16:57:11 +0000
commitec47858fe9883186fad904f71d43ec289fa01409 (patch)
treecddf54138fa0b4e11d649d7f5853d54c3f89a467 /lib/simulator.c
parent9ff8f76673e167cf3b14b1cd3f401441fd4397ef (diff)
*** empty log message ***
Diffstat (limited to 'lib/simulator.c')
-rw-r--r--lib/simulator.c38
1 files changed, 2 insertions, 36 deletions
diff --git a/lib/simulator.c b/lib/simulator.c
index ac1dae4..211e9de 100644
--- a/lib/simulator.c
+++ b/lib/simulator.c
@@ -56,8 +56,6 @@ void Initialisation(void)
{
int i;
- Reset(&Err_Mem);
- Reset(&Err_Reg);
for (i = 0; i < TAILLE_MEMOIRE; i++)
Reset(&memoire_principale[i]);
EcrireRegistrePP(ADD_PP);
@@ -137,7 +135,7 @@ void Decode(Uint32 instruction)
EcrireRegistre(champ_registre_resultat, resultat); /* On écrit le résultat dans le registre de sortie */
break;
}
- case 8:{ /* MOV <=> il exige une loge en losange ou la sauje jonche les sieges */
+ case 8:{ /* MOV */
if (ValeurBit(Extension(instruction), 4) == 1) /* MOV conditionnel */
if (ValeurBit(Extension(instruction), 5) == 0) /* Test normal */
switch (champ(Extension(instruction) >> 2, 4)) { /* teste les bits 2 et 3 */
@@ -301,39 +299,7 @@ void Traitement(void)
void Debogueur(void) // transformer en affiche reg
{
int i,j;
-
-/* gotoxy(1, 1);
- printf("Etat des registres classiques Etat des registres");
- gotoxy(1, 2);
- printf(" speciaux ");
- gotoxy(1, 11);
- printf(" Instruction a decoder");
- gotoxy(1, 14);
- printf(" Prochaine instruction");
- for (i = 1; i <= 16; i++) {
- gotoxy(1, i + 2);
- printf("r%2d:%9d", i - 1, registre[i - 1]);
- }
- for (i = 17; i <= 32; i++) {
- gotoxy(17, i - 16 + 2);
- printf("r%2d:%9d", i - 1, registre[i - 1]);
- }
- gotoxy(40, 4);
- printf("Rg :%9d", LireRegistreRG());
- gotoxy(40, 5);
- printf("Rd :%9d", LireRegistreRD());
- gotoxy(40, 6);
- printf("PC :%9d", LireRegistrePC());
- gotoxy(40, 7);
- printf("Flag :%9d", LireRegistreFLAG());
- gotoxy(40, 12);
- printf(" %9d", LireInstruction());
- registre[REG_PC]++;
- gotoxy(40, 15);
- printf(" %9d", LireInstruction());
- registre[REG_PC]--;
- getc(stdin);
-*/
+
for (i=0; i<=3; i++) {
for (j=1; j<=8;j++) {
printf(" R%02d ", (i*8+j));