UC15: Zero out DR15 shared state on first allocation

This commit is contained in:
Bob Supnik 2020-09-16 03:43:07 -07:00 committed by Mark Pizzolato
parent edc2410007
commit eaa6944551

View file

@ -1,6 +1,6 @@
/* pdp18b_dr15.c: DR15C simulator
Copyright (c) 2016, Robert M Supnik
Copyright (c) 2016-2020, Robert M Supnik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@ -25,6 +25,8 @@
dr PDP-15 DR15C interface for UC15 system
04-Jul 20 RMS Zero out shared state on first allocation
The DR15C provides control communications with the DR11Cs in the UC15.
Its state consists of an 18b register (the Task Control Block Pointer),
a one bit flag (TCBP acknowledge, not wired to interrupt), four interrupt
@ -280,6 +282,9 @@ if (uc15_shmem == NULL) { /* allocate shared state
if (r != SCPE_OK)
return r;
uc15_shstate = (int32 *) basead;
for (i = 0; i < UC15_STATE_SIZE; i++) { /* zero out shared state region */
UC15_SHARED_WR (i, 0);
}
}
if (pdp15_shmem == NULL) { /* allocate shared memory */
r = sim_shmem_open ("PDP15MainMemory", MAXMEMSIZE * sizeof (int32), &pdp15_shmem, &basead);