2824
|
1 * Disassembly by Os9disasm of dirutil.r
|
|
2
|
|
3 * class D external label equates
|
|
4
|
|
5 D001d equ $001d
|
|
6 D001e equ $001e
|
|
7
|
|
8 section bss
|
|
9
|
|
10 * Uninitialized data (class B)
|
|
11 B0000 rmb 4
|
|
12 B0004 rmb 30
|
|
13 * Initialized Data (class G)
|
|
14
|
|
15 endsect
|
|
16
|
|
17 section code
|
|
18
|
|
19 closedir: ldx 2,s
|
|
20 ldd ,x
|
|
21 pshs d,x
|
|
22 lbsr close
|
|
23 leas 2,s
|
|
24 lbsr free
|
|
25 puls x,pc
|
|
26 opendir: pshs u
|
|
27 ldd #$0022
|
|
28 pshs d
|
|
29 lbsr malloc
|
|
30 std ,s
|
|
31 beq L0037
|
|
32 ldx #$0081
|
|
33 ldd 6,s
|
|
34 pshs d,x
|
|
35 lbsr open
|
|
36 leas 4,s
|
|
37 std [,s]
|
|
38 bge L0037
|
|
39 ldd ,s
|
|
40 lbsr free
|
|
41 clra
|
|
42 clrb
|
|
43 std ,s
|
|
44 L0037 puls d,u,pc
|
|
45 readdir: pshs u
|
|
46 ldu 4,s
|
|
47 leau 2,u
|
|
48 L003f ldd #$0020
|
|
49 pshs d
|
|
50 ldd -2,u
|
|
51 pshs d,u
|
|
52 lbsr read
|
|
53 leas 6,s
|
|
54 std -2,s
|
|
55 bgt L0055
|
|
56 clra
|
|
57 clrb
|
|
58 puls u,pc
|
|
59 L0055 ldb ,u
|
|
60 beq L003f
|
|
61 leax B0004,y
|
|
62 pshs x,u
|
|
63 lbsr strhcpy
|
|
64 leas 4,s
|
|
65 leax B0000,y
|
|
66 clra
|
|
67 ldb D001d,u
|
|
68 std ,x
|
|
69 ldd D001e,u
|
|
70 std 2,x
|
|
71 tfr x,d
|
|
72 puls u,pc
|
|
73 seekdir: clra
|
|
74 clrb
|
|
75 pshs d
|
|
76 ldd 8,s
|
|
77 pshs d
|
|
78 ldd 8,s
|
|
79 bra L008b
|
|
80 telldir: ldd #1
|
|
81 pshs d
|
|
82 clrb
|
|
83 pshs d
|
|
84 L008b pshs d
|
|
85 ldd [8,s]
|
|
86 pshs d
|
|
87 lbsr lseek
|
|
88 leas 8,s
|
|
89 rts
|
|
90
|
|
91 endsect
|
|
92
|