mirror of
https://github.com/cc65/cc65.git
synced 2024-12-23 04:30:10 +00:00
Working
git-svn-id: svn://svn.cc65.org/cc65/trunk@1211 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
56caf8f80d
commit
7b89ebcecb
1671
src/sim65/cpucore.c
1671
src/sim65/cpucore.c
File diff suppressed because it is too large
Load Diff
@ -54,7 +54,7 @@ static unsigned char RAM[0x10000];
|
||||
|
||||
|
||||
|
||||
void WriteMem (unsigned Addr, unsigned char Val)
|
||||
void MemWriteByte (unsigned Addr, unsigned char Val)
|
||||
/* Write a byte to a memory location */
|
||||
{
|
||||
RAM[Addr] = Val;
|
||||
@ -62,7 +62,7 @@ void WriteMem (unsigned Addr, unsigned char Val)
|
||||
|
||||
|
||||
|
||||
unsigned char ReadMem (unsigned Addr)
|
||||
unsigned char MemReadByte (unsigned Addr)
|
||||
/* Read a byte from a memory location */
|
||||
{
|
||||
return RAM[Addr];
|
||||
@ -70,23 +70,23 @@ unsigned char ReadMem (unsigned Addr)
|
||||
|
||||
|
||||
|
||||
unsigned ReadMemW (unsigned Addr)
|
||||
unsigned MemReadWord (unsigned Addr)
|
||||
/* Read a word from a memory location */
|
||||
{
|
||||
unsigned W = ReadMem (Addr++);
|
||||
return (W | (ReadMem (Addr) << 8));
|
||||
unsigned W = MemReadByte (Addr++);
|
||||
return (W | (MemReadByte (Addr) << 8));
|
||||
}
|
||||
|
||||
|
||||
|
||||
unsigned ReadZeroPageW (unsigned char Addr)
|
||||
unsigned MemReadZPWord (unsigned char Addr)
|
||||
/* Read a word from the zero page. This function differs from ReadMemW in that
|
||||
* the read will always be in the zero page, even in case of an address
|
||||
* overflow.
|
||||
*/
|
||||
{
|
||||
unsigned W = ReadMem (Addr++);
|
||||
return (W | (ReadMem (Addr) << 8));
|
||||
unsigned W = MemReadByte (Addr++);
|
||||
return (W | (MemReadByte (Addr) << 8));
|
||||
}
|
||||
|
||||
|
||||
|
@ -50,16 +50,16 @@
|
||||
|
||||
|
||||
|
||||
void WriteMem (unsigned Addr, unsigned char Val);
|
||||
void MemWriteByte (unsigned Addr, unsigned char Val);
|
||||
/* Write a byte to a memory location */
|
||||
|
||||
unsigned char ReadMem (unsigned Addr);
|
||||
unsigned char MemReadByte (unsigned Addr);
|
||||
/* Read a byte from a memory location */
|
||||
|
||||
unsigned ReadMemW (unsigned Addr);
|
||||
unsigned MemReadWord (unsigned Addr);
|
||||
/* Read a word from a memory location */
|
||||
|
||||
unsigned ReadZeroPageW (unsigned char Addr);
|
||||
unsigned MemReadZPWord (unsigned char Addr);
|
||||
/* Read a word from the zero page. This function differs from ReadMemW in that
|
||||
* the read will always be in the zero page, even in case of an address
|
||||
* overflow.
|
||||
|
Loading…
Reference in New Issue
Block a user