I haven't got that far yet, and not sure if this helps its a bit obvious, and simple. But I think to start: IF BUTTON AND #A THEN GOTO @jump. REPEAT Y=Y+1 UNTIL Y==#. Might work?
GOTO @Label means that you are jumping to another line of code
GOSUB @Label means you can jump to code, then go back with RETURN
@Label is the code you jump to
(@Label can be anything with an @ before it)