Skip to content

Instantly share code, notes, and snippets.

@jacobmischka
Created January 31, 2015 23:10
Show Gist options
  • Save jacobmischka/28be318c03340ba3603e to your computer and use it in GitHub Desktop.
Save jacobmischka/28be318c03340ba3603e to your computer and use it in GitHub Desktop.
disassemble2
void disassemble2() {
printf("$%04X %02X | A:%02X X:%02X Y:%02X SP:%02X | C:%d Z:%d I:%d D:%d V:%d B:%d N:%d | S: %02X %02X\n",
cpu.operaddr, cpu.operand, cpu.A, cpu.X, cpu.Y, cpu.SP,
GET_FLAG(FLAG_C) != 0, GET_FLAG(FLAG_Z) != 0, GET_FLAG(FLAG_I) != 0, GET_FLAG(FLAG_D) != 0,
GET_FLAG(FLAG_V) != 0, GET_FLAG(FLAG_B) != 0, GET_FLAG(FLAG_N) != 0, Memory_ReadByte(STACK_ADDR | (cpu.SP+1)), Memory_ReadByte(STACK_ADDR | (cpu.SP+2)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment