- GOTO SCREEN begin *>SCREEN begin - COMMENT "This program demonstrates the ability to execute a loop only while " - COMMENT "a key is pressed." - COMMENT "Print a label over key F1" key(1), "1" - COMMENT "Define softkey F6 as EXIT" - SOFTKEY (6) "EXIT" GOTO SCREEN quit - COMMENT "Initialize the variable x to zero" x=0 label START - PUT HUGE NUMBER x AT (6,1) USING "#" - COMMENT "Now check the keyboard" call scankey(y) - COMMENT "This next statement checks for any softkeys that have been defined" - SOFTKEY CHECK - COMMENT "If no keys were pressed then loop back to the label START" if y=0 then goto START - COMMENT "If a key was pressed, then the following will execute" x=1 label keydown - PUT HUGE NUMBER x AT (6,1) USING "#" call scankey(y) - COMMENT "If F1 (keycode 15104) is being pressed, keep looping" if y=15104 then goto keydown - COMMENT "As soon as F1 is not being pressed the following code will execute" x=0 goto START *>SCREEN quit - END OF PSEUDOCODE