10   '***
100  '*** Dump Screen routine for the Osborne I
200  '***     by Jerrold Wayne Silverstein
910  '***
920  '*** PROGRAM DMPSCR (DUMP SCREEN) WILL DUMP THE
930  '*** 32 LINES OF "L" LENGTH OF THE OSBORNE I SCREEN MEMORY
935  '*** TO DISK FILE "DMPSCR.DAT" ON THE CURRENTLY LOGGED DISK DRIVE.
940  '*** THE FILE CAN THEN BE EDITED BY A WORD PROCESSOR.
945  '*** THE PROGRAM CORRECTS FOR SCREEN SCROLLING AND GIVES A CORRECT
946  '*** SCREEN IMAGE.
950  '*** A MOVING CURSOR ALONG THE LEFT SIDE OF THE SCREEN SHOWS THE
955  '*** LINE THAT THE PROGRAM IS CURRENTLY READING FROM.
960  '*** THE PROGRAM CAN PRINT TO A PRINTER WITH THE FOLLOWING CHANGES:
965  '***    a) REMOVE LINES 1040 AND 1150 
970  '***    b) CHANGE ALL "PRINT #1" to "LPRINT" 
975  '***    c) RENAME THIS PROGRAM TO "PRTSCR.BAS" (PRINT SCREEN)
980  '***
990  F$="DMPSCR.DAT"
1000 ML = 128:L= 80 'L is number of characters across the screen to save
1010 FOR I = -4096 TO -1 'find cursor (current line)
1020    IF PEEK(I) > 127 THEN GOTO 1040
1030 NEXT I
1040 OPEN "O",#1,F$ 'found cursor, open disk file
1050 A=0
1052 PRINT #1,CHR$(PEEK(I)-128); 'remove cursor
1056 A=1
1057 K=I
1060 FOR J = I+1 TO -1 'dump screen from cursor to bottom of screen
1070    IF A < L+1 THEN PRINT #1,CHR$(PEEK(J));
1075    IF A=0 THEN K=J:IF PEEK(K)<128 THEN POKE K,PEEK(K)+128 'place moving cursor
1080    A=A+1
1085    IF A=ML THEN A=0:IF PEEK(K)>128 THEN POKE K,PEEK(K)-128:PRINT #1,"" 'remove moving cursor and print end-of-line
1090 NEXT J
1100 FOR J = -4096 TO I-1 'dump screen from top of screen to cursor
1110    IF A < L+1 THEN PRINT #1,CHR$(PEEK(J));
1115    IF A=0 THEN K=J:IF PEEK(K)<128 THEN POKE K,PEEK(K)+128 'place moving cursor
1120    A=A+1
1125    IF A=ML THEN A=0:IF PEEK(K)>128 THEN POKE K,PEEK(K)-128:PRINT #1,"" 'remove moving cursor and print end-of-line
1130 NEXT J
1140 PRINT F$;" HAS BEEN SAVED TO DISK.
1150 CLOSE #1 'close disk file
1160 SYSTEM   'return to CP/M
1170 END
1130 NEXT J
1140 PRINT F$;" HAS BEEN SAVED TO DI