CPU status flag behavior: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
(merging into Status flags)
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
The status register doesn't implement bits 4 and 5. The only way to test those bits would be to push the status on the stack, but any time the status is pushed on the stack, those bits are set to fixed values, as described below.
#REDIRECT [[Status flags]]
 
When an IRQ or NMI occurs, the current status with bit 4 clear and bit 5 set is pushed on the stack, then the I flag is set.
 
PHP and BRK push the current status with bits 4 and 5 set on the stack; BRK then sets the I flag.
 
RTI and PLP set the status to the byte popped off the stack.

Latest revision as of 20:17, 24 October 2018

Redirect to: