 dim Version$/"Split Text File, V1.0"/
 dim Line$(200)
 Print "This program extracts a 4000 line chunk from a text file."
 Input "What file to extract from? " Line$
 Open #1,Line$
 Input "Where to put fragment? " Line$
 Create #2,Line$
 Input "Extract starting from line: " StartingLineNumber
 For i=1 to StartingLineNumber
     Input #1,Line$
 Next i
 If EOF(1)
 Then
     Print "Hit EOF before specified line number."
     Exit
 Fi
 For i=1 to 4000
     input #1,Line$
     If EOF(1)
     Then
         Print "EOF hit before 4000 lines extracted."
         Exit i
     Fi
     print #2,Line$
 Next i
 Print "Extraction completed."
 Exit
END
