home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / enterprs / cpm / utils / f / pwaids.ark / SWAPCHG.BAS < prev    next >
Encoding:
BASIC Source File  |  1989-09-27  |  1.0 KB  |  49 lines

  1. $lines
  2. print chr(26)
  3. text 0,$
  4. SWAPCHG: To Change Size of Perfect Writer Swap File
  5.  
  6.  
  7. By Chip Weems (KUG bulletin board 5/21/83)
  8. Enhanced by Don Davis 4/10/84
  9.  
  10.  
  11. Run SWAPCHG from drive A.  Then put a PW.SWP (any size)
  12. in drive A and a diskette with adequate space in drive B.
  13.  
  14. $
  15. var num,I,J = integer
  16. var abyte,fsize = char
  17. files S(1),S(1)
  18. input3 "Hit any key when ready";abyte
  19. rename "B:PW.SWP" to "B:PWSWP.OLD"
  20. create "B:PW.SWP"
  21. open #1; "A:PW.SWP"
  22. open #0; "B:PW.SWP"
  23. input "
  24. What size PW.SWP do you want (must be a multiple of 8)";num
  25. print
  26. let fsize = chr(num)
  27. for I = 0H to 7BH
  28.    read #1;abyte
  29.    write #0;abyte
  30. next I
  31. read #1;abyte
  32. write #0;fsize
  33. for I = 7DH to 3FFH
  34.    read #1;abyte
  35.    write #0;abyte
  36. next I
  37. let abyte = chr(0)
  38. for I = 1 to fsize
  39.    for J = 0H to 3FFH
  40.       write #0;abyte
  41.    next J
  42.    print I;"k";chr(0DH);
  43. next I
  44. close #0
  45. close #1
  46. print
  47. print "Done"
  48. End
  49.                                          ì