Improving The Toolkit's TRACE Function
This helpful POKE will work on any CBM/PET with Toolkit installed.
Don't all you Toolkit owners wish that you could turn TRACE and STEP on and off from within your programs? After all, why TRACE an entire program, when you only need to debug one small section? Well, here's good news: The TRACE and STEP functions can be turned on and off from BASIC, by means of a simple POKE command! Here's why:
The Toolkit uses memory location 124 (206 for small keyboard PETs) as a flag for the status of the TRACE function: O = off, 2 = trace, 3 = step. All you have to do is POKE 124 (206) with the proper number, to accomplish the corresponding Toolkit function. In other words:
POKE 124,0 = OFF POKE 124,2 = TRACE POKE 124,3 = STEP
One caution: if the Toolkit is not initialized, any of the above POKEs will crash the PET. Therefore, it would be wise to execute this line before any of the POKEs:
IF PEEK(124)= 10 THEN SYS xxxxx
(where xxxxx is the number used to initialize your Toolkit).