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.
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.
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.
It only appears to be skipping the second menu item. What's actually happening is that when it goes to the second item, it reads the buttons, which are still indicating "go to next item", so it quickly advances to the third item (if going down) or first item (if going up).
If you wait until the buttons are released before reading them again this behavior won't occur. See the attached screenshot.
Ack. Ninja'd.
The ZR & ZL buttons are considered part of the circle pad pro. To be able to use the circle pad pro features it must first be turned on (even on a NEW 3DS).
Can you show a screenshot of where it's ending up, and let us know where you want it to go?
From what I can see in that code, it's normal for the text to be towards the upper right. The 17 in the LOCATE statement makes it start in column 17. The 1 in that same statement makes it appear on row 1.
Also, what's the variable A supposed to do? It's defined but never used within the DEF block.
What are you trying to do?
What's the purpose of setting BOSS01=2 then checking if it's 10, then checking if it's 1? There's no way it can be anything other than 2.
There are functions specifically for what you're doing in lines 53 & 54. Look up the MIN() and MAX() functions.
Lines 53 & 54 can be reduced to the following.
CY=MIN(MAX(CY,8),12)