The original code was mimicking a ram data test by writing a value
then reading it right back and comparing. The updated code writes
out an incrementing value at incrementing addresses, then re-reads
it back to verify the incrementing data is correct.
I tested this on hardware by disconnecting an address line on
the z80 ram from the address bus and connecting it to ground. The
original code would not report any error, while the updated code
gives the expected address error.
The original code was mimicking a ram data test by writing a value then reading it right back and comparing. The updated code writes out an incrementing value at incrementing addresses, then re-reads it back to verify the incrementing data is correct.
I tested this on hardware by disconnecting an address line on the z80 ram from the address bus and connecting it to ground. The original code would not report any error, while the updated code gives the expected address error.