Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 0010 REM "findfile"
- 0020 BEGIN
- 0030 OPEN (3)"disk3"
- 0035 INPUT "sector to start search ",I
- 0037 INPUT "enter directory ",D$
- 0040 INPUT "file to find: ",F$
- 0045 LET F$=D$+"/"+F$
- 0050 INPUT "byte siz ",SIZ
- 0060 PRINT "file to write 2 ","/usr/"+F$
- 0070 INPUT "correct ",TEMP$; IF TEMP$<>"y" AND TEMP$<>"n" THEN GOTO 0070
- 0080 IF TEMP$="y" THEN LET TEMP$="/usr/"+F$ ELSE INPUT "different file to writ
- 0080:e 2 ",TEMP$; PRINT "change manually"; ESCAPE
- 0090 REM ----------- read file looking for file name
- 0100 READ RECORD(3,IND=I*7000,SIZ=7000,END=0180)X$
- 0110 LET Z=(F$=X$)
- 0120 IF Z=0 THEN LET I=I+1; PRINT I,; GOTO 0100
- 0130 LET IND=(7000*I)+Z-1; REM ESCAPE
- 0140 REM ----------- read file adjusted for start of file header
- 0150 READ RECORD(3,IND=IND,SIZ=7000,END=0180)X$
- 0160 PRINT " "; PRINT "file header: ",
- 0170 PRINT X$(1,80)
- 0180 REM ----------- read record adjusted for tar header (512 bytes)
- 0190 READ RECORD(3,IND=IND+512,SIZ=7000,END=0220)X$
- 0200 PRINT "start of data:"
- 0210 PRINT X$(1,80)
- 0220 PRINT "now going to write to file:"
- 0230 ESCAPE
- 0240 REM ---------- now at start of "data" 4 the file
- 0250 STRING TEMP$
- 0260 OPEN (4)TEMP$
- 0270 LET X$=X$(1,SIZ)
- 0280 PRINT RECORD(4)X$
- 0290 ESCAPE
- 0300 LET F$=""; LET SIZ=0; LET X$=""; LET TEMP$=""; LET Z=0; CLOSE (4)
- 0310 GOTO 0040
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement