Executing the MD=D-1 instruction multiple times gives this output from the simulator. This makes it easier to see what's happening and when.
|time| inM  |  instruction   |reset| outM  |writeM |addre| pc  |DRegiste|
|7+  |     0|1110001110011000|  0  |  11110|   1   | 1001|    7|  11110 |
|8   |     0|1110001110011000|  0  |  11109|   1   | 1001|    8|  11110 |
|8+  |     0|1110001110011000|  0  |  11109|   1   | 1001|    8|  11109 |
|9   |     0|1110001110011000|  0  |  11108|   1   | 1001|    9|  11109 |
|9+  |     0|1110001110011000|  0  |  11108|   1   | 1001|    9|  11108 |
|10  |     0|1110001110011000|  0  |  11107|   1   | 1001|   10|  11108 |
Time 7+ shows the signal values immediately before the instruction executes. outM is the value that is presented to the RAM to be stored.
The clock event occurs between times 7+ and 8, and the RAM stores the outM value since writeM is true.
Time 8 shows the signal values immediately after the instruction executes. The value on writeM does not get written to RAM.
--Mark