Yes the commented out code in your post is used to process a button press only once. I will try to explain it in steps. First if your code looks something like this:
Code:
Loop:
; get the PS2 inputs...
IF (DualShock(1).bit3 = 0) THEN ;Start Button test
; do your stuff
ENDIF
Goto Loop
what happens when you press the PS2 button a corresponding bit in either DualShock(1) or DualShock(2) will go low. So in the above code it will detect that the level is low and do your stuff. If when it finishes this and goes back up to start of the loop to get the PS2 state again if you are still pressing the button, the bit will still be low and the "do your stuff" will again be executed. The idea in some posts of waiting a longer period of time is that your fingers are fast enough to get it back off the button before it checks it again.
Now in the commented out code you posted. The difference is we remember the state of the buttons from the previous pass through the code and only execute "Your stuff" when the previous pass through the button was off and now it is on. To do this it needed to save away the state of the buttons from the previous pass, which is done:
Code:
;Store previous state
LastButton(0) = DualShock(1)
LastButton(1) = DualShock(2)
The transition is detected in the line: IF (DualShock(1).bit3 = 0) and LastButton(0).bit3 THEN ;Start Button test
Which you could have been written as: IF (DualShock(1).bit3 = 0) and (LastButton(0).bit3 = 1) THEN
and Paraphrased as: If MyButton is Down and last time the button was up then...
I hope that helps.