Wow- that's really advanced. Pushing processor status on to the stack? I'm not sure why that would work since all I know is the stack keeps track of addresses for subroutines.
Now, if I could only figure out why that ball isn't moving...
The status register holds all of the flags for the processor. When you look in Stella's debugger this is it:
That register holds a bunch of individual bits. A bit can either be 0 or 1 (high or low). The lowercase letters represent 0's, and the uppercase represent 1's. The letter that we are interested in here is the 'z' (z-flag) which when you look at it matches the position of the bit used in the enable registers.
Pushing the processor reads the contents of the status register and writes it to where the stack pointer is indexed to. If the stack pointer is pointing to the ENABL register ($1F) then the PHP (Push Processor) will set or clear ENABL with its z-flag. The other bits are ignored because the ENAxx register doesn't use them. Also the PHP instruction decrements the stack pointer by 1 each time it's used. So if the stack pointer was pointing at ENABL ($1F) and PHP was used, then the stack pointer would then be pointing at ENAM1 ($1E). This makes it easy to set up a routine that will set ENABL, ENAM1, and ENAM0 sequentially.
Finally, about the z-flag. It stands for zero flag. It gets set 'Z' or cleared 'z' a few different ways. In this particular example we are concerned with setting or clearing it with a compare instruction. With a compare the z-flag will set when the value compared to matches exactly, and cleared otherwise.
Here's a little bit of a code using this trick from a game I'm converting:
; Earlier in the code, set up stack pointer
; Y holds the current scanline
php ; ENABL, SP decrements from $1F to $1E (ENAM1)
php ; ENAM1, SP decrements from $1E to $1D (ENAM0)
php ; ENAM0, SP decrements from $1D to $1C
By using a few ram registers and throwing this all in a loop, you have a fast way of setting or clearing all the enable registers. If this all seems convoluted just remember you only have 76 cycles per line, and that can fill up quickly. This routine is fast.