Board Thread:Questions and Answers/@comment-24837408-20140610165343/@comment-9531161-20140610212743

A GOTO loop is faster in performance though. A FOR loop is incredibly slow in Petit Computer. I would just make it a function:

'The function: @WAITBUTTON IF BTRIG AND 16 THEN RETURN VSYNC 1 GOTO @WAITBUTTON

'An example usage: GOSUB @WAITBUTTON

Plus, if you do it like this, you can add an "Environment update" to the wait loop, so that the environment can still be processed while you're waiting for input:

@WAITBUTTON IF BTRIG AND 16 THEN RETURN GOSUB @PROCESSGAME VSYNC 1 GOTO @WAITBUTTON

Where @PROCESSGAME is just a function that does the game logic. Or something... it's all up to you. The performance really won't be an issue unless you have a lot of stuff going on, so use whichever one makes the most sense. I know you said no GOTO's, but sometimes they're necessary.