test/TestMemory.c
void testRead() {
	zero_ram();

	//Test one byte read
	assert(rmem_b(0) == 0);
	//Fill in the test data
	wmem_b(0, 'd');
	//Make sure the test data is in there
	assert(rmem_b(0) == 'd');

	//Test three bytes read
	//Test the empty values
	zero_ram();
	assert(rmem_w(512) == 0x0000);
	//Fill in the test data
	wmem_w(512, (word) 0x6942);
	assert(rmem_w(512) == 0x6942);

	printf("Read memory test passed!\n");
}
/**
 * Tests how the system reads from memory. Because the write test has passed all the asserts before this one
 * We can assume it works fine so we'll use wmem to ease out the writing
 */
Tests how the system reads from memory. Because the write test has passed all the asserts before this one
We can assume it works fine so we'll use wmem to ease out the writing
Tests how the system reads from memory . Because the write test has passed all the asserts before this one We can assume it works fine so we ' ll use wmem to ease out the writing
void testRead() {
	zero_ram();
	assert(rmem_b(0) == 0);
	wmem_b(0, 'd');
	assert(rmem_b(0) == 'd');
	zero_ram();
	assert(rmem_w(512) == 0x0000);
	wmem_w(512, (word) 0x6942);
	assert(rmem_w(512) == 0x6942);
	printf("Read memory test passed!\n");
}
void testRead ( ) { zero_ram ( ) ; assert ( rmem_b ( 0 ) == 0 ) ; wmem_b ( 0 , ' ' ) ; assert ( rmem_b ( 0 ) == ' ' ) ; zero_ram ( ) ; assert ( rmem_w ( 512 ) == 0x0000 ) ; wmem_w ( 512 , ( word ) 0x6942 ) ; assert ( rmem_w ( 512 ) == 0x6942 ) ; printf ( " \n " ) ; }
Tests how the system reads from memory.
Tests how the system reads from memory .
//Test one byte read //Fill in the test data //Make sure the test data is in there //Test three bytes read //Test the empty values //Fill in the test data