versionable header for sim65
load and run address now configured from header fix error codes not to conflict with test fix test/misc/endless.c which is supposed to fail if an endless loop does not occur
This commit is contained in:
committed by
Oliver Schmidt
parent
07ca772932
commit
fb7d4acd5c
@@ -64,6 +64,15 @@ void MemWriteByte (unsigned Addr, unsigned char Val)
|
||||
|
||||
|
||||
|
||||
void MemWriteWord (unsigned Addr, unsigned Val)
|
||||
/* Write a word to a memory location */
|
||||
{
|
||||
MemWriteByte (Addr, Val & 0xFF);
|
||||
MemWriteByte (Addr + 1, Val >> 8);
|
||||
}
|
||||
|
||||
|
||||
|
||||
unsigned char MemReadByte (unsigned Addr)
|
||||
/* Read a byte from a memory location */
|
||||
{
|
||||
@@ -82,7 +91,7 @@ unsigned MemReadWord (unsigned Addr)
|
||||
|
||||
|
||||
unsigned MemReadZPWord (unsigned char Addr)
|
||||
/* Read a word from the zero page. This function differs from ReadMemW in that
|
||||
/* Read a word from the zero page. This function differs from MemReadWord in that
|
||||
** the read will always be in the zero page, even in case of an address
|
||||
** overflow.
|
||||
*/
|
||||
@@ -96,10 +105,6 @@ unsigned MemReadZPWord (unsigned char Addr)
|
||||
void MemInit (void)
|
||||
/* Initialize the memory subsystem */
|
||||
{
|
||||
/* Fill momory with illegal opcode */
|
||||
/* Fill memory with illegal opcode */
|
||||
memset (Mem, 0xFF, sizeof (Mem));
|
||||
|
||||
/* Set RESET vector to 0x0200 */
|
||||
Mem[0xFFFC] = 0x00;
|
||||
Mem[0xFFFD] = 0x02;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user