16b fixes
This commit is contained in:
parent
15b397aed7
commit
9eee7acc94
2 changed files with 11 additions and 3 deletions
PDP11
|
@ -290,7 +290,7 @@ void init_mem_writes()
|
|||
mem_writes = (struct __mem_writes *)malloc(sizeof(struct __mem_writes) * 256);
|
||||
}
|
||||
|
||||
void put_mem_write(uint8_t data, uint32_t pa)
|
||||
void put_mem_write(uint8_t data, int32_t pa)
|
||||
{
|
||||
int i = 0;
|
||||
int found = 0;
|
||||
|
|
12
PDP11/test.c
12
PDP11/test.c
|
@ -23,8 +23,9 @@ extern int32 sim_interval;
|
|||
|
||||
struct __mem_writes {
|
||||
int32_t addr;
|
||||
uint16_t data;
|
||||
uint8_t data;
|
||||
};
|
||||
|
||||
extern struct __mem_writes *mem_writes;
|
||||
extern int n_mem_writes;
|
||||
extern void reset_mem_writes();
|
||||
|
@ -88,8 +89,15 @@ json_t *generate_test(uint16_t instruction, int *const id, struct mem_t *mem, si
|
|||
json_t *put_mem_i_0 = json_object();
|
||||
PWriteW(mem[i].value, mem[i].addr);
|
||||
|
||||
if (mem[i].addr & 1)
|
||||
printf("FAIL\n");
|
||||
|
||||
sprintf(buffer, "%06o", mem[i].addr);
|
||||
json_object_set(put_mem_i_0, buffer, json_integer(mem[i].value));
|
||||
json_object_set(put_mem_i_0, buffer, json_integer(mem[i].value & 255));
|
||||
json_array_append_new(memory_i, put_mem_i_0);
|
||||
|
||||
sprintf(buffer, "%06o", mem[i].addr + 1);
|
||||
json_object_set(put_mem_i_0, buffer, json_integer(mem[i].value >> 8));
|
||||
json_array_append_new(memory_i, put_mem_i_0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue