/** * Sets the program counter to a specially created infinite loop in the end of the programs for * access by built-in functions, de-facto halting the program. important so that tests and other * scripts finish counting (since a built-in infinite loop doesn't count as steps). also needed * because there is no good way to use the stop button to stop an infinite loop in a built-in jack * class. A message containing information may be provided (can be null). */ public void setPCToInfiniteLoopForBuiltIns(String message) { if (hasGUI) { gui.notify(message); } setPC(infiniteLoopForBuiltInsAddress); }