Subversion Repositories MB01 Project

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 - 1
;;
2
;; Copyright (c) 2015 Marco Granati <mg@unet.bz>
3
;;
4
;; Permission to use, copy, modify, and distribute this software for any
5
;; purpose with or without fee is hereby granted, provided that the above
6
;; copyright notice and this permission notice appear in all copies.
7
;;
8
;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11
;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13
;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14
;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
;;
16
;; File: fsys.inc
17
 
18
; this file can be included only inside GLOBAL.INC
19
.IFNDEF		_GLOBAL_INC_
20
.EXIT		"ERROR: This file cannot be directly included."
21
.ENDIF
22
 
23
.IFDEF	_FSYS_INC_		; avoid multiple inclusion
24
 
25
	.LIST on
26
 
27
;---------------------------------------------------------------------------
28
; direct-page working area for filesystem managment
29
;---------------------------------------------------------------------------
30
 
31
DPFSW:	.SECTION page0, ref_only, common	;Direct Page f.s. working area
32
 
33
	.ABSOLUTE		;; start always at $00
34
	.ORG		0x00
35
 
36
;---------------------------------------------------------------------------
37
; this section is copied from the PDT of selected drive
38
; note: in the LBA address we assume that the MSB 4 bit are all '0'
39
fdrvfg		.DB		; <7>: H.D. (1) / F.D. (0)
40
				; <6>: 1440k (1) / 720k (0) if <7> = 1
41
ffsfg		.DB		; <7>: FAT (1) / CBM (0)
42
fclusiz		.DB		; cluster size in # sector's (1,2,4,8,10,20,40)
43
fclush		.DB		; shift cluster (0,1,2,3,4,5,6)
44
fatsiz		.DB		; FAT table size in # sector's (0 = 256 sect.)
45
frootsiz	.DB		; root directory size in # sector's
46
frootent	.DW		; root directory # entries
47
ffat1lba	.DS	3	; LBA of FAT 1 starting
48
ffat2lba	.DS	3	; LBA of FAT 2 starting
49
frootlba	.DS	3	; LBA of root directory starting
50
fclulba		.DS	3	; LBA of first cluster (cluster #2)
51
fclucnt		.DW		; # of cluster's in FAT volume
52
fclufree	.DW		; the count of free cluster's
53
fclunxt		.DW		; the next free cluster #
54
fcdclu		.DW		; cluster # where starting c.d.
55
fcdparent	.DW		; cluster # parent of the c.d.
56
fcdparx		.DW		; index entry on parent cluster of c.d.
57
fcdlen		.DB		; lenght of current directory string
58
				; c.d. string start with '/', w/o trailing '/'
59
fcdlst		.DB		; index of last '/' in c.d. string
60
 
61
;---------------------------------------------------------------------------
62
 
63
FPathStr	.DS	2
64
 
65
fpaths		.DS	78	; path string (without starting 'X:')
66
fdrive		.DB		; the drive used in current operation
67
fdefdrv		.DB		; default drive (the one currently selected)
68
fexpfg		.DB		; <7>: fexpand file name (1) / directory (0)
69
				; <6>: local calls to fexpand (1)
70
devfg		.DB		; <7>: specified a device name in path
71
devidx		.DB		; index of device
72
haswild		.DB		; <7>: path contain wildcards
73
fdrvlst		.DB		; last operative drive ($FF mean invalid)
74
fpdtp		LP		; long pointer to PDT of fdrive
75
storfg		.DB
76
wildfg		.DB
77
dotfg		.DB
78
maxcnt		.DB
79
cnt		.DB
80
cnt1		.DB
81
cntx		.DB
82
LPtr1		LP
83
LPtr2		LP
84
FDirIdx		.DB
85
;FPathStr	.DS	2
86
CDLen		.DS	6
87
lstidx		.DB
88
FEndDir		.DB
89
tmpfcb		.DS	16
90
LPtr3		LP
91
 
92
	.RELATIVE
93
 
94
	.ENDS
95
 
96
;---------------------------------------------------------------------------
97
 
98
	.LIST off
99
 
100
.ENDIF