Skip to content

Instantly share code, notes, and snippets.

@jacobmischka
Created February 1, 2015 03:19
Show Gist options
  • Save jacobmischka/10a5bc4ff51c83db2329 to your computer and use it in GitHub Desktop.
Save jacobmischka/10a5bc4ff51c83db2329 to your computer and use it in GitHub Desktop.
IND
/* Indirect */
static void IND() {
cpu.indoperaddr = Memory_ReadWord(cpu.PC);
if((cpu.indoperaddr & 0x00FF) == 0x00FF){
cpu.operaddr = (WORD)Memory_ReadByte(cpu.indoperaddr) | ((WORD)Memory_ReadByte(cpu.indoperaddr & 0xFF00) << 8);
}
else
cpu.operaddr = Memory_ReadWord(cpu.indoperaddr);
cpu.PC += 2;
/* TODO: Implement bug */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment