Cleaned up OPFLAG handling

This commit is contained in:
Jeff 2016-09-29 14:02:37 -07:00 committed by Jeff Parsons
commit 98d3700fa4
8 changed files with 381 additions and 361 deletions

View file

@ -161,12 +161,15 @@ var PDP11 = {
* Internal operation state flags
*/
OPFLAG: {
WAIT: 0x01, // WAIT operation in progress
INTQ_SPL: 0x01, // INTQ triggered by SPL
INTQ: 0x02, // call checkInterruptQueue()
WAIT: 0x04, // WAIT operation in progress
TRAP_TF: 0x10, // aka PDP11.PSW.TF
TRAP_MMU: 0x20,
TRAP_SP: 0x40,
TRAP_MASK: 0x70,
NO_FLAGS: 0x80 // set whenever the PSW is written directly, requiring all updateXXXFlags() functions to leave flags unchanged
NO_FLAGS: 0x80, // set whenever the PSW is written directly, requiring all updateXXXFlags() functions to leave flags unchanged
PRESERVE: 0x07 // OPFLAG bits to preserve prior to the next instruction
},
/*
* Opcode reg (opcode bits 2-0)