Subversion Repositories MB01 Project

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 - 1
  Tue Jul 17 11:00:20 2018                                                                                               Page    1
2
 
3
 
4
 
5
 
6
 
7
 
8
 
9
          2500 A.D. 65816 Macro Assembler #26960 - Version 5.02g
10
          -----------------------------------------------------
11
 
12
                       Input  Filename : src\F9\sysf9.asm
13
                       Output Filename : obj\F9\sysf9.obj
14
                       Listing Has Been Relocated
15
 
16
 
17
 2457                        		.LIST on
18
 2458
19
 2459                        	;---------------------------------------------------------------------------
20
 2460                        	; direct-page working area for filesystem managment
21
 2461                        	;---------------------------------------------------------------------------
22
 2462
23
 2463                        	DPFSW:	.SECTION page0, ref_only, common	;Direct Page f.s. working area
24
 2464
25
 2465  000000                		.ABSOLUTE		;; start always at $00
26
 2466  000000                		.ORG		0x00
27
 2467
28
 2468                        	;---------------------------------------------------------------------------
29
 2469                        	; this section is copied from the PDT of selected drive
30
 2470                        	; note: in the LBA address we assume that the MSB 4 bit are all '0'
31
 2471  000000  00            	fdrvfg		.DB		; <7>: H.D. (1) / F.D. (0)
32
 2472                        					; <6>: 1440k (1) / 720k (0) if <7> = 1
33
 2473  000001  00            	ffsfg		.DB		; <7>: FAT (1) / CBM (0)
34
 2474  000002  00            	fclusiz		.DB		; cluster size in # sector's (1,2,4,8,10,20,40)
35
 2475  000003  00            	fclush		.DB		; shift cluster (0,1,2,3,4,5,6)
36
 2476  000004  00            	fatsiz		.DB		; FAT table size in # sector's (0 = 256 sect.)
37
 2477  000005  00            	frootsiz	.DB		; root directory size in # sector's
38
 2478  000006  0000          	frootent	.DW		; root directory # entries
39
 2479  000008                	ffat1lba	.DS	3	; LBA of FAT 1 starting
40
 2480  00000B                	ffat2lba	.DS	3	; LBA of FAT 2 starting
41
 2481  00000E                	frootlba	.DS	3	; LBA of root directory starting
42
 2482  000011                	fclulba		.DS	3	; LBA of first cluster (cluster #2)
43
 2483  000014  0000          	fclucnt		.DW		; # of cluster's in FAT volume
44
 2484  000016  0000          	fclufree	.DW		; the count of free cluster's
45
 2485  000018  0000          	fclunxt		.DW		; the next free cluster #
46
 2486  00001A  0000          	fcdclu		.DW		; cluster # where starting c.d.
47
 2487  00001C  0000          	fcdparent	.DW		; cluster # parent of the c.d.
48
 2488  00001E  0000          	fcdparx		.DW		; index entry on parent cluster of c.d.
49
 2489  000020  00            	fcdlen		.DB		; lenght of current directory string
50
 2490                        					; c.d. string start with '/', w/o trailing '/'
51
 2491  000021  00            	fcdlst		.DB		; index of last '/' in c.d. string
52
 2492
53
 2493                        	;---------------------------------------------------------------------------
54
 2494
55
 2495  000022                	FPathStr	.DS	2
56
 2496
57
 2497  000024                	fpaths		.DS	78	; path string (without starting 'X:')
58
 2498  000072  00            	fdrive		.DB		; the drive used in current operation
59
 2499  000073  00            	fdefdrv		.DB		; default drive (the one currently selected)
60
 2500  000074  00            	fexpfg		.DB		; <7>: fexpand file name (1) / directory (0)
61
 2501                        					; <6>: local calls to fexpand (1)
62
 2502  000075  00            	devfg		.DB		; <7>: specified a device name in path
63
  Tue Jul 17 11:00:20 2018                                                                                               Page    2
64
 
65
 
66
 
67
 
68
 2503  000076  00            	devidx		.DB		; index of device
69
 2504  000077  00            	haswild		.DB		; <7>: path contain wildcards
70
 2505  000078  00            	fdrvlst		.DB		; last operative drive ($FF mean invalid)
71
 2506  000079                	fpdtp		LP		; long pointer to PDT of fdrive
72
 2507  00007C  00            	storfg		.DB
73
 2508  00007D  00            	wildfg		.DB
74
 2509  00007E  00            	dotfg		.DB
75
 2510  00007F  00            	maxcnt		.DB
76
 2511  000080  00            	cnt		.DB
77
 2512  000081  00            	cnt1		.DB
78
 2513  000082  00            	cntx		.DB
79
 2514  000083                	LPtr1		LP
80
 2515  000086                	LPtr2		LP
81
 2516  000089  00            	FDirIdx		.DB
82
 2517                        	;FPathStr	.DS	2
83
 2518  00008A                	CDLen		.DS	6
84
 2519  000090  00            	lstidx		.DB
85
 2520  000091  00            	FEndDir		.DB
86
 2521  000092                	tmpfcb		.DS	16
87
 2522  0000A2                	LPtr3		LP
88
 2523
89
 2524  0000A5                		.RELATIVE
90
 2525
91
 2526                        		.ENDS
92
 2527
93
 2528                        	;---------------------------------------------------------------------------
94
 2529
95
 2593                        	.LIST		on
96
 2594
97
 2595  F8FFB1                		.INCLUDE inc\dirp00.inc
98
 2596                        	;----------------------------------------------------------
99
 2597                        	; DIRP00.ASM
100
 2598                        	; PROGETTO: B1601
101
 2599                        	;
102
 2600                        	; Variabili in Direct Page $00
103
 2601                        	;----------------------------------------------------------
104
 2602
105
 2603                        	; sezione COMMON -- questo permette di includere il file in piu' file
106
 2604
107
 2605                        	.LIST on
108
 2606
109
 2607                        	DIRP00:	.SECTION page0, ref_only, common	;Direct-Page 00
110
 2608
111
 2609  000000                		.ABSOLUTE		;; inizia sempre da $00
112
 2610  000000                		.ORG		0x00
113
 2611  000000
114
 2612  000000  0000          	JiffyClk	.DW			; contatore 10ms 32 bit
115
 2613  000002  0000          			.DW
116
 2614  000004                	SysTmr		.DS	SYSTMRCNT	; system timer 0 (10ms)
117
 2615  000008                	SysTMF		.DS	SYSTMRCNT	; flag timer (80 -> start)
118
 2616  00000C  00            	Bnk0Flag	.DB			; <7>: flag test RAM banco 0 ok
119
 2617                        						; <6>: flag warm reset
120
 2618  00000D  00            	RTCFlag		.DB
121
 2619
122
 2620  00000E                	diskstat	.DS	2	; flag device on ata bus #0 & #1
123
 2621                        					; <7>: device ready
124
 2622                        					; <6>: compact flash device (C.F.)
125
  Tue Jul 17 11:00:20 2018                                                                                               Page    3
126
 
127
 
128
 
129
 
130
 2623                        					; <5>: device identification ok
131
 2624                        					; <4>: MBR loaded
132
 2625                        					; <3>: valid signature in MBR
133
 2626                        					; <2>: first partition found&active
134
 2627                        					; <1>:
135
 2628                        					; <0>: valid partition flag
136
 2629
137
 2630                        					; <7>: device ready
138
 2631                        					; <6>: USB device
139
 2632                        					; <5>: compact flash device (C.F.)
140
 2633                        					; <4>: device identification ok
141
 2634                        					; <3>: MBR loaded
142
 2635                        					; <2>: first partition found&active
143
 2636                        					; <1>: always 1
144
 2637                        					; <0>: valid partition flag
145
 2638  000010
146
 2639
147
 2640          00000E        	atadev		.EQU	diskstat
148
 2641
149
 2642  000010                	usbdev		.DS	2	; flag flash disk on usb bus #0
150
 2643                        					; <7>: device plugged and ready
151
 2644                        					; <6>: always 1
152
 2645                        					; <5>: device identification ok
153
 2646                        					; <4>: MBR loaded
154
 2647                        					; <3>: valid signature in MBR
155
 2648                        					; <2>: first partition found&active
156
 2649                        					; <1>:
157
 2650                        					; <0>: valid partition flag
158
 2651
159
 2652  000012                	diskmax		.DS	16	; disk max. sector's
160
 2653          000012        	atasec		.EQU	diskmax
161
 2654          00001A        	usbsec		.EQU	diskmax+8
162
 2655
163
 2656
164
 2657  000022                	atambr		.DS	8	; data for first partition found in mbr
165
 2658                        					; first 3 bytes for start sector of partition
166
 2659                        					; last byte for partition type
167
 2660  00002A                	usbmbr		.DS	8
168
 2661
169
 2662  000032                	ataprt		.DS	8	; total sec's of first partition
170
 2663  00003A                	usbprt		.DS	8	; total sec's of first partition
171
 2664
172
 2665
173
 2666  000042  00            	usb0ch		.DB	; usb0 (ch375/ch376) flag
174
 2667                        				; <7>: module on
175
 2668                        				; <6>: ch376 flag
176
 2669                        				; <5:0>: chip version
177
 2670
178
 2671  000043  00            	usb0st		.DB	; usb0 status
179
 2672                        				; <7>: usb0 host mode ok
180
 2673                        				; <6>: flash disk attached flag
181
 2674                        				; <5>: usb device attached
182
 2675
183
 2676  000044  00            	fdcdrv		.DB		; phisycal drive status (drive #0)
184
 2677                        					; <7>: disk format established in bit 0&1
185
 2678                        					; <6>: double step seek done
186
 2679                        					; <5>: trust format bit's (set after ok r/w)
187
  Tue Jul 17 11:00:20 2018                                                                                               Page    4
188
 
189
 
190
 
191
 
192
 2680                        					; <4>: write protect bit (if disk in drive)
193
 2681                        					; <3>: don't care
194
 2682                        					; <2>: don't care
195
 2683                        					; <1>: HD disk if set else DD disk
196
 2684                        					; <0>: CBM format if set else IBM format
197
 2685
198
 2686  000045  00            	vdrive		.DB		; virtual drive status (ram disk, drive #1)
199
 2687                        					; <7>: disk format established in bit 0&1
200
 2688                        					; <6>: change disk simulation (after format)
201
 2689                        					; <5>: don't care
202
 2690                        					; <4>: write protect bit (under sw control)
203
 2691                        					; <3>: don't care
204
 2692                        					; <2>: don't care
205
 2693                        					; <1>: HD disk if set else DD disk
206
 2694                        					; <0>: CBM format if set else IBM format
207
 2695
208
 2696  000046  00            	fdcctl		.DB		; fdc controller status
209
 2697                        					; <7>: drive is attached
210
 2698                        					; <6>: drive need recalibration (restore)
211
 2699                        					; <5>: FDC controller ok
212
 2700                        					; <4>: motor on
213
 2701                        					; <3>: dma is active
214
 2702                        					; <2>: dma chip ok (post routine)
215
 2703                        					; <1>: clock rate (1=HD,0=DD)
216
 2704                        					; <0>: disk ready
217
 2705
218
 2706  000047  00            	fdctrk		.DB		; fd: current seek track
219
 2707  000048  00            	fdcerr		.DB		; fd: last error code
220
 2708  000049  00            	ataerr		.DB		; ata: last error code
221
 2709  00004A  00            	ataxer		.DB		; ata: last extended error code
222
 2710
223
 2711  00004B  00            	CtrlBrk		.DB		; flag CTRL+BREAK (NMI)
224
 2712
225
 2713  00004C  0000          	MemTop		.DW		; top memoria RAM
226
 2714  00004E  00            			.DB		; banco top mem
227
 2715
228
 2716  00004F  00            	DflTxtIn	.DB		; device di default text input
229
 2717  000050  00            	DflTxtOut	.DB		; device di default text output
230
 2718
231
 2719  000051                	COPPtr		LP		; long pointer for COP decoding
232
 2720  000054  00            	COPIdx		.DB		; COP signature/index
233
 2721
234
 2722  000055  00            	BiosEnt		.DB		; flag accesso a bios setup
235
 2723
236
 2724                        	; variabili utilizzate da ACIA
237
 2725  000056                	spwrk		.DS	$30
238
 2726
239
 2727                        	; bios mem
240
 2728  000086  0000          	nsize		.DW	; dimensione blocco da allocare
241
 2729                        	;bsize		.DW	; dimensione vera blocco free
242
 2730  000088  0000          	splitsz		.DW	; dimensione blocco splittato
243
 2731  00008A  0000          	bfree		.DW	; puntatore blocco free
244
 2732  00008C  0000          	hdrptr		.DW	; puntatore header heap
245
 2733
246
 2734  00008E  0000          	pbrklv		.DW	; current break level of current process
247
 2735  000090  0000          	pbrkmin		.DW	; minimum breal level of current process
248
 2736  000092  0000          	pbrkmax		.DW	; maximum breal level of current process
249
  Tue Jul 17 11:00:20 2018                                                                                               Page    5
250
 
251
 
252
 
253
 
254
 2737  000094
255
 2738                        	; bios temp. work area
256
 2739  000094                	bwrktmp		.DS	$28
257
 2740
258
 2741  0000BC  00            	coptmp		.DB	; temp. used while cop
259
 2742
260
 2743  0000BD  00            	tstser		.DB	; check ser/usb test board post
261
 2744                        				; <7>: VIA2 ok
262
 2745                        				; <6>: PICRAM ok
263
 2746                        				; <1>: UART 16C550 ok
264
 2747                        				; <0>: R65C51 ok
265
 2748
266
 2749
267
 2750                        	;crc16		.DW
268
 2751
269
 2752  0000BD                		.RELATIVE
270
 2753
271
 2754                        		.ENDS
272
 2755
273
 2756          [01]          	.IFDEF		_ACIA_INC_
274
 2757                        		.INCLUDE INC\SP.INC
275
 2758          [00]          	.ENDIF
276
 2759
277
 
278
 
279
             Lines Assembled : 2855                  Errors : 0
280
 
281
 
282