You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

copall 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. .PAGE 'COPY ALL'
  2. ;
  3. ; SET UP SUBROUTINE
  4. ;
  5. PUPS1 LDA #0
  6. STA REC
  7. STA DRVCNT
  8. STA FILTRK
  9. STA FILTRK+1
  10. LDA FILDRV+1 ;GET DRIVE NUMBER
  11. AND #1 ;ONLY
  12. STA DRVNUM
  13. ORA #1
  14. STA DELSEC ;NONZERO
  15. LDA FILTBL+1 ;FN1=FN2
  16. STA FILTBL
  17. RTS
  18. ;
  19. .END
  20. .PAGE 'COPY ALL'
  21. ;
  22. ; COPY DISK TO DISK ROUTINES
  23. ;
  24. CPYDTD LDA FILTBL+1 ;SAVE IN TEMP
  25. STA TEMP
  26. LDY #40 ;40 CHAR BUFFER
  27. LDX CMDSIZ ;PREP TO MOVE
  28. STY CMDSIZ ;END OF FILENAME2
  29. MOVLP1 DEY
  30. DEX
  31. LDA CMDBUF,X ;MOV FN LIFO
  32. STA CMDBUF,Y
  33. CPX TEMP ;ACTUAL F2 VAL
  34. BNE MOVLP1
  35. STY FILTBL+1 ;POINTER TO F2
  36. MOVLP2 JSR OPTSCH
  37. JSR PUPS1 ;SETUP FIRST PASS
  38. JSR FFST ;FIRST MATCH
  39. BPL FIXIT ;ENTRY FOUND?
  40. BMI ENDIT ;NO
  41. ;
  42. EXLP0 PLA ;PULL NEEDED VARS
  43. STA DIRSEC
  44. PLA
  45. STA FILTBL+1
  46. PLA
  47. STA LSTBUF
  48. PLA
  49. STA FILCNT
  50. PLA
  51. STA INDEX
  52. PLA
  53. STA FOUND
  54. PLA
  55. STA DELIND
  56. PLA
  57. STA DRVFLG
  58. ;
  59. EXLP1 JSR PUPS1 ;SET UP VARS
  60. JSR FFRE ;NEXT MATCH
  61. BPL FIXIT ;FOUND ONE?
  62. ENDIT JMP ENDCMD ;NO! SO BYE
  63. ;
  64. FIXIT LDA DRVFLG ;PUSH NEEDED VARS
  65. PHA
  66. LDA DELIND
  67. PHA
  68. LDA FOUND
  69. PHA
  70. LDA INDEX
  71. PHA
  72. LDA FILCNT
  73. PHA
  74. LDA LSTBUF
  75. PHA
  76. LDA FILTBL+1
  77. PHA
  78. LDA DIRSEC
  79. PHA
  80. ;
  81. EXLP2 JSR TRFNME ;TRANSFER NAME
  82. LDA #1 ;FAKE OUT LOOKUP
  83. STA F1CNT
  84. STA F2CNT
  85. JSR LOOKUP
  86. LDA #1
  87. STA F1CNT
  88. LDA #2 ;REAL
  89. STA F2CNT
  90. JSR CY ;COPY IT
  91. JMP EXLP0 ;NEXT ONE FOLKS
  92. ;
  93. ; TRANSFER NAME (DIRBUF) TO CMDBUF
  94. ;
  95. TRFNME LDY #3 ;BOTH INDEXES
  96. STY FILTBL ;BEGINING OF FILENAME1
  97. TRF0 LDA (DIRBUF)Y ;MOVE IT
  98. STA CMDBUF,Y
  99. INY
  100. CPY #19 ;ALL 16 CHARS PASSED?
  101. BNE TRF0
  102. RTS
  103. .END