1
0
mirror of https://github.com/rzzzwilson/pymlac.git synced 2025-06-10 09:32:41 +00:00

Getting ptrptp.c working (and test_cpu.c)

This commit is contained in:
Ross Wilson
2015-11-04 19:58:22 +07:00
parent 147a295cff
commit 6d03e33354
7 changed files with 110 additions and 54 deletions

View File

@@ -11,8 +11,7 @@
#include "dcpu.h"
#include "memory.h"
#include "kb.h"
#include "ptr.h"
#include "ptp.h"
#include "ptrptp.h"
#include "ttyin.h"
#include "ttyout.h"
#include "trace.h"
@@ -136,7 +135,7 @@ cpu_get_prev_PC(void)
}
bool
cpu_get_state(void)
cpu_running(void)
{
return cpu_on;
}
@@ -1595,7 +1594,8 @@ cpu_execute_one(void)
******/
Prev_r_PC = r_PC;
instruction = mem_get(r_PC++, false);
instruction = mem_get(r_PC, false);
++r_PC;
r_PC = r_PC & MEMMASK;
indirect = (bool) (instruction & 0100000); /* high bit set? */