Freeing Memory

When internal memory is full, an over￿ow message appears on the screen. You can increase available internal memory by erasing user-de￿ned traces, variables, and functions. Use the PURGE and DISPOSE commands to erase these items.

Reduce trace size using the TRDEF command. An 800 element trace occupies 1646 bytes of memory, that is, 2 bytes for each element and 46 bytes for trace overhead. Reduce the size of user-de￿ned functions by inhibiting the carriage-return/line-feed (CR/LF) generated by the computer at the end of each program line. The following HP BASIC example shows the HIGH PEAK function with CR/LFs suppressed. (In HP BASIC, a semicolon placed at the end of a source line suppresses the CR/LF characters. With CR/LFs removed, HIGH PEAK occupies 11% less memory space, that is, 47 bytes instead of 53.

30 OUTPUT 723;"FUNCDEF HIGH_PEAK,@";

40OUTPUT 723;"STARTWL 700NM;STOPWL 900NM;";

50OUTPUT 723;"TS;MKPK HI;";

60OUTPUT 723;"@;"

3-12