Once in the loop you're not checking the current state of the button, only the state you saved in the variable.
Change the code to have it check the current state inside the loop.
Also, get rid of that END statement that's just above the WEND. The END statement will force the program to exit before the WEND sets the instruction pointer back up to the WHILE statement.
Checking BUTTON checks the current state.
Checking B checks the state it was at, at the moment you set B=BUTTON.
Have a look at this screenshot. It's a simple way to wait until button A is pressed. Notice we first wait until no buttons are pressed. This prevents a previous continued press of A from making this code flow through without waiting for a new press of A.
i used the second one for waiting until 'a' button is pressed.what it does is quickly displays the text but it also quickly changes to the next display.
it doesn't make the text stand still
Ok. I'm not entirely sure how you wanted it to work, but I've altered two button-checking areas and it seems to work ok for me. It's the program "RPS" in the screenshot.
p.s. I renamed your @labels so I could better understand the branching.