Personal Computer News


Keeping Tabs On Your Oric Variables

Categories: Letter

 
Author: D. Wieckowski
Published in Personal Computer News #078

Keeping Tabs On Your Oric Variables

As the Oric Atmos recognizes only the first two characters of a variable name, it is useful to know what has been used so far, especially on long programs.

This short routine uses no variables itself so will not add to the list it produces.

It may be joined onto the end of any Basic program, and lists out all the run-time variables used so far. The length of the routine is less than 250 bytes so should not give any 'out of memory error' even when used with a large program.

The routine is run by a GOTO 63992, as RUN would clear all variables in memory.

63992 DOKE(0),DEEK(#9C)
63993 PRINTCHR$(PEEK(DEEK(0)));CHR$(PEEK(1+DEEK(0)));
63994 IFPEEK(DEEK(0))>128THENPRINT"%";
63995 IFPEEK(DEEK(0))<128ANDPEEK(1+DEEK(0))=>128THEN PRINT"$";
63996 IFDEEK(0)=>DEEK(#9E)ANDPEEK(DEEK(0))>32THEN PRINT" dim";:GOTO63998
63997 PRINT:DOKE(0),(7+DEEK(0)):GOTO63999
63998 PRINT:DOKE(0),(DEEK(0)+DEEK(2+DEEK(0)))
63999 IFDEEK(0)<DEEK(#A0)THENGOTO63993ELSESTOP

D. Wieckowski
Burnham, Becks

D. Wieckowski