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.

copset.src 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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