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