S1 = "COM-AND.SCR" ; Current subdir, scr dump fname ; ----- Dump the current screen to disk ; ; R.McG; 3/31/90 ; --------------------------------------------- ; ; Open a disk file ; FOPENO S1 TEXT APPEND ; Open output file (appending this) IF NOT SUCCESS ; If open failed MESS "Error opening output file: "*S1 EXIT ; And stop ENDIF ; ; Write the current screen to disk ; N0 = "_SSIZE" ; get the current screen # lines N1 = 0 ; Start on line 0 IF STRCMP "_MENU" "ON" N1=1 ; .. unless menu mode is on FOR N2 = N1,(N0-2) ; Skip status line, too ATSCR N2 0 80 S0 ; Read 80 chars from screen S1 = S0(40:79) ; Save high 40 chars S0 = S0(0:39) ; And low 40 PRESERVE S0 ; Turn ! into !!, ^ into ^^ PRESERVE S1 ; .. WRITE S0 ; Write to disk WRITE S1 ; .. WRITE "!" ; And a crlf ENDFOR ; ; And done ; WRITE "^L" ; A top-of-form FCLOSEO ; Close file IF FCALL FRET ; If fcalled, return to caller EXIT ; Else stop