home *** CD-ROM | disk | FTP | other *** search
/ Software Du Jour / SoftwareDuJour.iso / BUSINESS / DBASE / DBAPG.ARC / DOS-COPY.PRG < prev    next >
Text File  |  1984-08-12  |  2KB  |  61 lines

  1. * Program.: DOS-COPY.PRG
  2. * Author..: Kelly Mc Tiernan
  3. * Date....: 12/12/83
  4. * Notice..: Copyright 1983, Kelly Mc Tiernan, All Rights Reserved.
  5. * Version.: dBASE II, version 2.4
  6. * Notes...: Performs a DOS 2.0 COPY function.
  7. *
  8. *    IN: source-C-63    Pathname of source 
  9. *        dest-C-63      Pathname of destination
  10. *   OUT: is:error-L-1   Validation flag
  11. *
  12. STORE F TO is:error
  13. * ---Parameter check.
  14. STORE !(source) TO source
  15. STORE !(dest) TO dest
  16. IF LEN(source) > 63 .OR. LEN(dest) > 63
  17.    * ---DOS 2.0 does not allow paths over 63 chars.
  18.    RETURN
  19. ENDIF
  20. * ---POKE the pathnames into memory.
  21. STORE 1 TO t:counter
  22. STORE 57088 TO t:address
  23. DO WHILE t:counter <= LEN(source)
  24.    POKE t:address, RANK($(source,t:counter,1))
  25.    STORE t:address+1 TO t:address
  26.    STORE t:counter+1 TO t:counter
  27. ENDDO
  28. POKE t:address,00
  29. STORE 1 TO t:counter
  30. STORE 56962 TO t:address
  31. DO WHILE t:counter <= LEN(dest)
  32.    POKE t:address, RANK($(dest,t:counter,1))
  33.    STORE t:address+1 TO t:address
  34.    STORE t:counter+1 TO t:counter
  35. ENDDO
  36. POKE t:address,00
  37. * -----------0---1---2---3---4---5---6---7---8---9
  38. POKE 56832,         80, 83, 81, 82,156,137, 38,126
  39. POKE 56840,222,180, 60,186,130,222,185, 32, 00,205,;
  40.             33,114, 77,163, 00,224,180, 61,176, 00
  41. POKE 56860,186, 00,223,205, 33,114, 63,137,195,185,;
  42.             16, 00,180, 63,205, 33,114, 52, 09,192
  43. POKE 56880,116, 22,185, 16, 00,180, 64,186, 00,223,;
  44.            135, 30, 00,224,205, 33,114, 32,135, 30
  45. * -----------0---1---2---3---4---5---6---7---8---9
  46. POKE 56900, 00,224,235,221,180, 62,205, 33,114, 20,;
  47.            135, 30, 00,224,180, 62,205, 33,114, 10
  48. POKE 56920,139, 38,126,222,157, 90, 89, 91, 88,195,;
  49.            180, 62,205, 33,135, 30, 00,224,180, 62
  50. POKE 56940,205, 33,139, 38,126,222,157, 90, 89, 91,;
  51.             88, 67,198, 07, 69, 00, 75,195
  52. * -----------0---1---2---3---4---5---6---7---8---9
  53. SET CALL TO 56832
  54. STORE " " TO t:flag
  55. CALL t:flag
  56. * ---FILE I/O ERROR.
  57. STORE ( t:flag = "E" ) TO is:error
  58. RELEASE t:flag,t:counter,t:address
  59. RETURN
  60. * EOF: DOS-COPY.PRG
  61.