Here is how I would do it (which wasn't your question). The nested WHILE WEND loops to simulate the AND condition can be tricky and are not as straight forward as they appear.
Code:
Loop:
If A=1 THEN
	IF B < 10 THEN
		B=B+1
		GOTO Loop
	ENDIF
ENDIF