Would you like to freeze the upper part of your display screen? With “Split ‘n Save” you can! While the information in the lower portion is appearing and disappearing, any text or graphics in the upper portion remain on view.
For a demonstration of “Split ‘n Save,” enter and RUN the program in Listing 1.
The heart of this program is the subroutine beginning at line 900, which adds as many enter codes to the end of the last frozen display line as there are lines being frozen. This tricks the computer into thinking that display line 0 is loaded immediately below the frozen zone, rather than at the top of the screen. Now CLS, PRINT AT, PLOT and UNPLOT will act accordingly! For example, make this alteration and see what happens.
110 PRINT "THIS"
To add “Split ‘n Save” to your program, insert the following lines:
DIM A$(N)
N is the number of frozen display lines.
PRINT AT N,O; A$
This reserves N spaces in the last frozen display line. If your program is PRINTing on this line, you can add A$ to it. (See line 90 in Listing 1.) In any case, the total number of display characters must not exceed 32 (including the N spaces).
GOUSUB 900
This turns on the “Split ‘n Save” feature. Place it immediately after the program line in step (2).
GOSUB 1000
This turns off the “Split ‘n Save” feature.
Also, place both subroutines at the end of your program.
“Split ‘n Save” has one peculiarity: display line 0 is not at the top of the screen, so lines 22 and 23, which contain any report, INPUT symbol or INPUT Data, are not visible.
Line Notes
40: Clears screen before freezing.
50: Creates N spaces.
60: Loop prints in frozen zone only.
90: Adds N spaces to end of last frozen line.
100: “Split ‘n Save” on.
110-210: Display function will not affect frozen zone.
230: “Split ‘n Save” off.
240: Clears entire screen.
900: Location in DFILE of the first of the N spaces
910: Loop replaces each space with ENTER.
1000: Must clear lower part of screen before turning off “Split ‘n Save.”
1010: Loop to reset each of the N extra ENTERs to zero.
Listing 1. Split ‘n Save Demonstration.
10 REM SPLIT N SAVE DEMO
20 PRINT AT 20,0;"NO. OF FROZE
N DISPLAY LINES? (MAX=18)"
30 INPUT N
40 CLS
50 DIM A$(N)
60 FOR L=0 TO N-2
70 PRINT "FROZEN LINE ";L
80 NEXT L
90 PRINT "FROZEN LINE ";N-1;A$
100 GOSUB 900
110 PRINT AT 0,0;"THIS"
120 PRINT "SHALL"
130 PRINT "PASS"
140 PRINT
150 PRINT "(HIT ENTER)"
160 PAUSE 1000
170 CLS
180 PRINT AT 3,0;"THIS TOO SHAL
L PASS (HIT ENTER)"
190 PAUSE 1000
200 CLS
210 PRINT "HIT ENTER TO CLEAR E
NTIRE SCREEN"
220 PAUSE 1000
230 GOSUB 1000
240 CLS
250 STOP
900 LET S=PEEK 16400+256*PEEK 1
6401-25
910 FOR I=0 TO N-1
920 POKE S+I,118
930 NEXT I
940 RETURN
1000 CLS
1010 FOR I=0 TO N-1
1020 POKE S+I,0
1030 NEXT I
1040 RETURN
Media
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.