BTW regarding the missile/ball question, I strongly advise NOT using stack pointer manipulation if you are just learning assembly. The "stack" keeps track of your subroutine return addresses, and it will take care of itself if you leave it alone. The stack begins at the END of user ram and fills downward as it accumulates more addresses (the hardware set it up this way so it's less likely to run into your variables as you fill it up from the START of user ram). The stack pointer keeps track of where in ram it's adding or removing more data...and jumping into advanced tricks too soon will just make a mess of things.
But anyway, the trick is that it is enabling or disabling the sprite if the result of the last test was EQUAL or NOT EQUAL respectively. This result is part of the "status register", and resides in bit location 1 (remember this for a moment). The status register is similar to the A, X, and Y registers except that you don't normally write data directly to it...it keeps track of the handful of things that various opcodes need to perform their function (like if the last addition resulted in carry being set).
Missile sprites and the Ball sprite have no bitpattern. They can only be turned on or off. To turn one of them on, you'd write a value which has this status in bit 1's position to the register (sound familiar?). Value 0 or 1 = disable, 2 or 3 = enable, 4 or 5 = disable, 6 or 7 disable, etc. This is best visible in binary:
0 = %00000000 disable
1 = %00000001 disable
2 = %00000010 enable
3 = %00000011 enable
4 = %00000100 disable
5 = %00000101 disable
6 = %00000110 enable
7 = %00000111 enable
See the pattern? The only thing those sprite registers are interested in is just that second-to-last binary bit of the value you write to them.
So the "magic" part of the code is to set the stack pointer so that it no longer points at user ram...but the hardware registers that are used for these sprites. This is done by setting X to the value of the sprite register (LDX #$1F for the ball), then using X to update the stack pointer (TXS). Now if we compare our scanline counter (LDA scancount) with where we want the ball to appear (CMP ball_position)...tada - bit 1 in the status register has already been updated. So using PHP (push processor status) throws the status register's value into the sprite's hardware address. Whatever other bits were set or unset in the status register does not matter to these guys...M0, M1, and BL are only interested in bit 1. Better yet, PUSHING the value into the stack automatically rolls the stack address down by 1 (remember, the stack goes in reverse), so you can do the ball, M1, and M0 one after another without needing to reset the pointer in the meantime.
Again, this is a method that should not be used if you are just learning to code. It's really just a space-saving technique...at least until your display kernel starts to become really complex and you are in dire need of machine cycles.