home *** CD-ROM | disk | FTP | other *** search
-
- 10 Rem Copyright 1981 by David E. Trachtenbarg
- 20 Dim Today$(5),Last'edited$(5),Last'sorted$(5)
- 30 Dim Edit'file$(13),Data'file$(13),Sort'file$(13)
- 40 Dim File$(73),Name$(34)
- 50 Endcommon
- 60 If Today$="" Then Run"DATE.SAV"
- 70 Dsk"@"
- 80 Integer Sector,Record,Place,Chunk,Buffsiz
- 90 Sector=128
- 100 Chunk=Int(Fre(0)/128)-4
- 110 Buffsiz=Sector*(Chunk+1)
- 120 Dim Buffer$(Buffsiz),Backup'file$(13)
- 130 Backup'file$="B:"+Data'file$
- 140 @
- 150 @"Place the backup disk in drive B. "
- 155 Repeat
- 160 Input"Continue (Y/N)? ",Command$
- 165 Until Pos("yYnN",Command$(0,0),0)>-1
- 166 If Command$(0,0)="n" Or Command$(0,0)="N" Then Run"menu.sav"
- 170 On Error Goto 190
- 180 Erase Backup'file$
- 190 On Error Stop
- 200 Create Backup'file$
- 210 Set 3,0
- 230 Open\1,128,1\Data'file$
- 240 Open\2,128\Backup'file$
- 250 Record=-1
- 260 Repeat
- 270 Place=-1
- 280 Repeat
- 285 On Error Goto 315
- 290 Get\1,Record+1\Buffer$((Place+1)*128,(Place+2)*128-1)
- 300 Record=Record+1
- 310 Place=Place+1
- 315 On Error Stop
- 320 Until Sys(3)>0 Or Place>=(Chunk-1)
- 326 If Place>-1 Then Do
- 330 For I=0 To Place
- 340 Put\2,(Record-Place+I)\Buffer$(I*128,(I+1)*128-1)
- 345 Next I
- 350 Enddo
- 360 Until Sys(3)>0
- 370 Close
- 380 @"Done"
- 390 @
- 400 @"Going to main menu......"
- 410 Run"MMENU.SAV"
- 420 End
-