Replace GOTO loops with WHILE loops and REPEAT UNTIL loops. Replace GOSUBs with DEF FUNC. Screenshot showing command syntax will be posted in a second.