I took the liberty of rewriting your code as an example
It doesn't quite do the same thing but should give you an idea of how things work normally. Note that the CLS isn't really needed as the text always appears in the same place, but in most game loops it is needed. My code doesn't keep printing the "Press enter" line, but why would you want to?
Graphics 800,600 LoopExit = 0 While Not LoopExit Cls Text 0,0, "Why did you open this stupid program?" y=12 Text 0,y, "Press Enter to exit." y=y + 12 ;repeat until user hits enter If KeyHit(28) Then LoopExit = 1 Flip Wend Text 0,y, "Program is ending." Flip ;wait 2 seconds Delay 2000
It doesn't quite do the same thing but should give you an idea of how things work normally. Note that the CLS isn't really needed as the text always appears in the same place, but in most game loops it is needed. My code doesn't keep printing the "Press enter" line, but why would you want to?