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.

75 lines
1.3KB

  1. .PAGE 'DISK COPY'
  2. ;
  3. ; DSKCPY CHECK FOR TYPE
  4. ; AND PARSES SPECIAL CASE
  5. ;
  6. DSKCPY
  7. LDA #$E0 ;KILL BAM BUFFER
  8. STA BUFUSE
  9. JSR CLNBAM ;CLR TBAM
  10. JSR BAM2X ;GET BAM LINDX IN .X
  11. LDA #$FF
  12. STA BUF0,X ;MARK BAM OUT-OF-MEMORY
  13. LDA #$0F
  14. STA LINUSE ;FREE ALL LINDXS
  15. JSR PRSCLN ;FIND ":"
  16. BNE DX0000
  17. JMP DUPLCT ;BAD COMMAND ERROR, CX=X NOT ALLOWED
  18. ;
  19. ;JSR PRSEQ
  20. ;
  21. ;LDA #'* ;CPY ALL
  22. ;LDX #39 ;PUT AT BUFFER END
  23. ;STX FILTBL+1
  24. ;STA CMDBUF,X ;PLACE *
  25. ;INX
  26. ;STX CMDSIZ
  27. ;LDX #1 ;SET UP CNT'S
  28. ;STX F1CNT
  29. ;INX
  30. ;STX F2CNT
  31. ;JMP MOVLP2 ;ENTER ROUTINE
  32. ;
  33. DX0000 JSR TC30 ;NORMAL PARSE
  34. DX0005 JSR ALLDRS ;PUT DRV'S IN FILTBL
  35. LDA IMAGE ;GET PARSE IMAGE
  36. AND #%01010101 ;VAL FOR PATT COPY
  37. BNE DX0020 ;MUST BE CONCAT OR NORMAL
  38. LDX FILTBL ;CHK FOR *
  39. LDA CMDBUF,X
  40. CMP #'*
  41. BNE DX0020
  42. ;LDX #1 ;SET CNT'S
  43. ; NO PATTERN MATCHING ALLOWED
  44. ;STX F1CNT
  45. ;INX
  46. ;STX F2CNT
  47. ;JMP CPYDTD ;GO COPY
  48. DX0010 LDA #BADSYN ;SYNTAX ERROR
  49. JMP CMDERR
  50. DX0020 LDA IMAGE ;CHK FOR NORMAL
  51. AND #%11011001
  52. BNE DX0010
  53. JMP COPY
  54. .END
  55. PRSEQ
  56. LDA #'= ;SPECIAL CASE
  57. JSR PARSE
  58. BNE X0020
  59. X0015 LDA #BADSYN
  60. JMP CMDERR
  61. X0020 LDA CMDBUF,Y
  62. JSR TST0V1
  63. BMI X0015
  64. STA FILDRV+1 ;SRC DRV
  65. DEY
  66. DEY
  67. LDA CMDBUF,Y
  68. JSR TST0V1
  69. BMI X0015
  70. CMP FILDRV+1 ;CANNOT BE EQUAL
  71. BEQ X0015
  72. STA FILDRV ;DEST DRV
  73. RTS
  74. .END