-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathlstdir
121 lines (121 loc) · 1.66 KB
/
lstdir
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
.PAGE 'LIST DIRECTORY'
; START THE DIRECTORY LOADING FUNCTION
; GET THE BUFFER AND GET IT STARTED
;
STDIR LDA #0
STA SA
LDA #1 ;ALLOCATE CHANL AND 1 BUFEFER
JSR GETRCH
.SKIP
LDA #0
JSR SETPNT
.SKIP
LDX LINDX
LDA #0
STA LSTCHR,X
JSR GETACT
TAX
LDA DRVNUM
STA LSTJOB,X
LDA #1 ; PUT SAL IN BUFFER
JSR PUTBYT
LDA #4 ;PUT SAH IN BUFFER
JSR PUTBYT
LDA #1 ;INSERT FHONEY LINKS (0101)
JSR PUTBYT
JSR PUTBYT
LDA NBTEMP
JSR PUTBYT ;PUT IN DRVNUM
LDA #0
JSR PUTBYT
JSR MOVBUF ;GET DISK NAME
JSR GETACT
ASL A
TAX
DEC BUFTAB,X
DEC BUFTAB,X
LDA #0 ;END OF THIS LINE
JSR PUTBYT
DIR1 LDA #1 ;INSERT FHONEY LINKS ($0101)
JSR PUTBYT
JSR PUTBYT
JSR GETNAM ;GET #BUFRS AND FILE NAME
BCC DIR3 ;TEST IF LAST ENTRY
LDA NBTEMP
JSR PUTBYT
LDA NBTEMP+1
JSR PUTBYT
JSR MOVBUF
LDA #0 ;END OF ENTRY
JSR PUTBYT
BNE DIR1
DIR10 JSR GETACT
ASL A
TAX
LDA #0
STA BUFTAB,X
LDA #RDYTLK
LDY LINDX
STA DIRLST
STA CHNRDY,Y ; DIRECTORY LIST BUFFER FULL
LDA DATA
RTS
;
;
DIR3 LDA NBTEMP ; THIS IS END OF LOAD
JSR PUTBYT
LDA NBTEMP+1
JSR PUTBYT
JSR MOVBUF
JSR GETACT
ASL A
TAX
DEC BUFTAB,X
DEC BUFTAB,X
LDA #0 ; END OF LISTING (000)
JSR PUTBYT
JSR PUTBYT
JSR PUTBYT
JSR GETACT
ASL A
TAY
LDA BUFTAB,Y
LDX LINDX
STA LSTCHR,X
DEC LSTCHR,X
JMP DIR10
;
;
;
;
; TRANSFER FILE NAME TO LISTING BUFFER
;
MOVBUF LDY #0
MOVB1 LDA NAMBUF,Y
JSR PUTBYT
INY
CPY #27
BNE MOVB1
RTS
;
;
; GET CHAR FOR DIRECTORY LOADING
;
GETDIR JSR GETBYT
BEQ GETD3
RTS
GETD3 STA DATA
LDY LINDX
LDA LSTCHR,Y
BEQ GD1
LDA #EOIOUT
STA CHNRDY,Y
LDA DATA
RTS
GD1
PHA
JSR DIR1
PLA
RTS
;
.END