Subversion Repositories MB01 Project

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 - 1
  Fri Jul 29 18:05:17 2016                                                                                               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\acia.asm
13
                       Output Filename : obj\F9\acia.obj
14
                       Listing Has Been Relocated
15
 
16
 
17
 2497                        	.LIST		on
18
 2498
19
 2499  F8FF6A                		.INCLUDE inc\dirp00.inc
20
 2500                        	;----------------------------------------------------------
21
 2501                        	; DIRP00.ASM
22
 2502                        	; PROGETTO: B1601
23
 2503                        	;
24
 2504                        	; Variabili in Direct Page $00
25
 2505                        	;----------------------------------------------------------
26
 2506
27
 2507                        	; sezione COMMON -- questo permette di includere il file in piu' file
28
 2508
29
 2509                        	.LIST on
30
 2510
31
 2511                        	DIRP00:	.SECTION page0, ref_only, common	;Direct-Page 00
32
 2512
33
 2513  000000                		.ABSOLUTE		;; inizia sempre da $00
34
 2514  000000                		.ORG		0x00
35
 2515  000000
36
 2516  000000  0000          	JiffyClk	.DW			; contatore 10ms 32 bit
37
 2517  000002  0000          			.DW
38
 2518  000004                	SysTmr		.DS	SYSTMRCNT	; system timer 0 (10ms)
39
 2519  000008                	SysTMF		.DS	SYSTMRCNT	; flag timer (80 -> start)
40
 2520  00000C  00            	Bnk0Flag	.DB			; <7>: flag test RAM banco 0 ok
41
 2521                        						; <6>: flag warm reset
42
 2522  00000D  00            	RTCFlag		.DB
43
 2523
44
 2524  00000E                	atadev		.DS	2	; flag device on ata bus #0 & #1
45
 2525                        					; <7>: device ready
46
 2526                        					; <6>: compact flash device (C.F.)
47
 2527                        					; <5>: device identification ok
48
 2528                        					; <4>: MBR loaded
49
 2529                        					; <3>: valid signature in MBR
50
 2530                        					; <2>: first partition found&active
51
 2531                        					; <1>:
52
 2532                        					; <0>: valid partition flag
53
 2533
54
 2534  000010                	atasec		.DS	8	; max. user sectors on ata device
55
 2535  000018                	atambr		.DS	8	; data for first partition found in mbr
56
 2536                        					; first 3 bytes for start sector of partition
57
 2537                        					; last byte for partition type
58
 2538  000020                	ataprt		.DS	8	; total sec's of first partition
59
 2539
60
 2540  000028  00            	fdcdrv		.DB		; phisycal drive status (drive #0)
61
 2541                        					; <7>: disk format established in bit 0&1
62
 2542                        					; <6>: double step seek done
63
  Fri Jul 29 18:05:17 2016                                                                                               Page    2
64
 
65
 
66
 
67
 
68
 2543                        					; <5>: trust format bit's (set after ok r/w)
69
 2544                        					; <4>: write protect bit (if disk in drive)
70
 2545                        					; <3>: don't care
71
 2546                        					; <2>: don't care
72
 2547                        					; <1>: HD disk if set else DD disk
73
 2548                        					; <0>: CBM format if set else IBM format
74
 2549
75
 2550  000029  00            	vdrive		.DB		; virtual drive status (ram disk, drive #1)
76
 2551                        					; <7>: disk format established in bit 0&1
77
 2552                        					; <6>: change disk simulation (after format)
78
 2553                        					; <5>: don't care
79
 2554                        					; <4>: write protect bit (under sw control)
80
 2555                        					; <3>: don't care
81
 2556                        					; <2>: don't care
82
 2557                        					; <1>: HD disk if set else DD disk
83
 2558                        					; <0>: CBM format if set else IBM format
84
 2559
85
 2560  00002A  00            	fdcctl		.DB		; fdc controller status
86
 2561                        					; <7>: drive is attached
87
 2562                        					; <6>: drive need recalibration (restore)
88
 2563                        					; <5>: FDC controller ok
89
 2564                        					; <4>: motor on
90
 2565                        					; <3>: dma is active
91
 2566                        					; <2>: dma chip ok (post routine)
92
 2567                        					; <1>: clock rate (1=HD,0=DD)
93
 2568                        					; <0>: disk ready
94
 2569
95
 2570  00002B  00            	fdctrk		.DB		; fd: current seek track
96
 2571  00002C  00            	fdcerr		.DB		; fd: last error code
97
 2572  00002D  00            	ataerr		.DB		; ata: last error code
98
 2573  00002E  00            	ataxer		.DB		; ata: last extended error code
99
 2574
100
 2575  00002F  00            	CtrlBrk		.DB		; flag CTRL+BREAK (NMI)
101
 2576
102
 2577  000030  0000          	MemTop		.DW		; top memoria RAM
103
 2578  000032  00            			.DB		; banco top mem
104
 2579
105
 2580  000033  00            	DflTxtIn	.DB		; device di default text input
106
 2581  000034  00            	DflTxtOut	.DB		; device di default text output
107
 2582
108
 2583  000035                	COPPtr		LP		; long pointer for COP decoding
109
 2584  000038  00            	COPIdx		.DB		; COP signature/index
110
 2585
111
 2586  000039  00            	BiosEnt		.DB		; flag accesso a bios setup
112
 2587
113
 2588                        	; variabili utilizzate da ACIA
114
 2589  00003A                	spwrk		.DS	$30
115
 2590
116
 2591                        	; bios mem
117
 2592  00006A  0000          	nsize		.DW	; dimensione blocco da allocare
118
 2593                        	;bsize		.DW	; dimensione vera blocco free
119
 2594  00006C  0000          	splitsz		.DW	; dimensione blocco splittato
120
 2595  00006E  0000          	bfree		.DW	; puntatore blocco free
121
 2596  000070  0000          	hdrptr		.DW	; puntatore header heap
122
 2597
123
 2598  000072  0000          	pbrklv		.DW	; current break level of current process
124
 2599  000074  0000          	pbrkmin		.DW	; minimum breal level of current process
125
  Fri Jul 29 18:05:17 2016                                                                                               Page    3
126
 
127
 
128
 
129
 
130
 2600  000076  0000          	pbrkmax		.DW	; maximum breal level of current process
131
 2601  000078
132
 2602                        	; bios temp. work area
133
 2603  000078                	bwrktmp		.DS	$28
134
 2604
135
 2605  0000A0  00            			.DB		; dummy
136
 2606  0000A1
137
 2607
138
 2608  0000A0                		.RELATIVE
139
 2609
140
 2610                        		.ENDS
141
 2611
142
 2612          [01]          	.IFDEF		_ACIA_INC_
143
 2613  F8FF6A                		.INCLUDE INC\SP.INC
144
 2614                        	;;
145
 2615                        	;; Copyright (c) 2016 Marco Granati <mg@unet.bz>
146
 2616                        	;;
147
 2617                        	;; Permission to use, copy, modify, and distribute this software for any
148
 2618                        	;; purpose with or without fee is hereby granted, provided that the above
149
 2619                        	;; copyright notice and this permission notice appear in all copies.
150
 2620                        	;;
151
 2621                        	;; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
152
 2622                        	;; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
153
 2623                        	;; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
154
 2624                        	;; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
155
 2625                        	;; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
156
 2626                        	;; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
157
 2627                        	;; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
158
 2628                        	;;
159
 2629
160
 2630                        	;; name: sp.inc
161
 2631                        	;; rev.: 2016/07/28
162
 2632                        	;; bios C816 version v1.0
163
 2633
164
 2634                        	.LIST on
165
 2635
166
 2636          000011        	SPXON		.EQU	$11	; XON seriale per handshake software
167
 2637          000013        	SPXOFF		.EQU	$13	; XOFF seriale per handshake software
168
 2638
169
 2639                        	;NGUARD1		.EQU	$800	; numero bytes di guardia buffer RX XON/XOFF
170
 2640                        	;NGUARD2		.EQU	$400	; numero bytes di guardia buffer RX handshake
171
 2641          000040        	NGUARD1		.EQU	$40	; numero bytes di guardia buffer RX XON/XOFF
172
 2642          000040        	NGUARD2		.EQU	$40	; numero bytes di guardia buffer RX handshake
173
 2643                        	;NGUARD3		.EQU	$0400	; minimo posto in coda RX per cancellare pausa remota
174
 2644          000020        	NGUARD3		.EQU	$20
175
 2645          000040        	NGUARD4		.EQU	$40
176
 2646
177
 2647                        	;---------------------------------------------------------------------------
178
 2648                        	; direct page var's for serial ports handling
179
 2649                        	;---------------------------------------------------------------------------
180
 2650
181
 2651                        	DPSP:	.SECTION page0, common, ref_only, offset spwrk	;ACIA D.P.
182
 2652
183
 2653  00003A                	_DPSP_START	.DS	0
184
 2654
185
 2655                        	; WARNING: not change order and type of the following variables
186
 2656
187
  Fri Jul 29 18:05:17 2016                                                                                               Page    4
188
 
189
 
190
 
191
 
192
 2657                        	; acia 1 var's
193
 2658  00003A  00            	spisr		.DB		; interrupt status register
194
 2659  00003B  00            	spcsr		.DB		; control status register
195
 2660  00003C  00            	spfr		.DB		; format register
196
 2661  00003D  00            	spout		.DB		; XON/XOFF send flag
197
 2662
198
 2663                        	; acia 2 var's
199
 2664  00003E  00            	spisr2		.DB		; interrupt status register
200
 2665  00003F  00            	spcsr2		.DB		; control status register
201
 2666  000040  00            	spfr2		.DB		; format register
202
 2667  000041  00            	spout2		.DB		; XON/XOFF send flag
203
 2668
204
 2669                        	; serial port's mode & status
205
 2670  000042  00            	spmode		.DB		; <7>: 0=no handshake, 1=handshake
206
 2671                        					; <6>: 0=software/1=hardware handshake
207
 2672                        					; <5>: not used
208
 2673                        					; <4>: baud rate: 0=19200, 1=38400
209
 2674                        					; <3>: 0=odd parity, 1=even parity
210
 2675                        					; <2>: 0=no parity, 1=parity as specified
211
 2676                        					;      by bit <3>
212
 2677                        					; <1>: interface type: 0=RS232, 1=RS485
213
 2678                        					; <0>: RS232: uplink flow control (RTS/DCD)
214
 2679                        					;      RS485: 120 ohm termination on
215
 2680                        					; if bit 7=1 and bit 1=1, bit 6 is forced to 0
216
 2681  000043
217
 2682  000043  00            	spstat		.DB		; serial port status
218
 2683                        					; <7>: rx error (data discarded)
219
 2684                        					; <6>: rx buffer overflow
220
 2685                        					; <5>: remote disconnession (DSR line = 1)
221
 2686                        					; <4>: output buffer is full
222
 2687                        					; <3>: not used
223
 2688                        					; <2>: framing error
224
 2689                        					; <1>: parity error
225
 2690                        					; <0>: overrun error
226
 2691
227
 2692  000044  00            	sppause		.DB		; local/remote pause flag's
228
 2693                        					; <7>: remote pause (sent XOFF/XON or RTS=1/0)
229
 2694                        					; <6>: local pause (rx XOFF/XON or CTS=0/1)
230
 2695
231
 2696  000045  00            	sptmp		.DB		; temp. byte used while get data
232
 2697
233
 2698                        	; serial port's mode & status
234
 2699  000046  00            	spmode2		.DB		; <7>: 0=no handshake, 1=handshake
235
 2700                        					; <6>: 0=software/1=hardware handshake
236
 2701                        					; <5>: not used
237
 2702                        					; <4>: baud rate: 0=19200, 1=38400
238
 2703                        					; <3>: 0=odd parity, 1=even parity
239
 2704                        					; <2>: 0=no parity, 1=parity as specified
240
 2705                        					;      by bit <3>
241
 2706                        					; <1>: interface type: 0=RS232, 1=RS485
242
 2707                        					; <0>: RS232: uplink flow control (RTS/DCD)
243
 2708                        					;      RS485: 120 ohm termination on
244
 2709                        					; if bit 7=1 and bit 1=1, bit 6 is forced to 0
245
 2710  000047
246
 2711  000047  00            	spstat2		.DB		; serial port status
247
 2712                        					; <7>: rx error (data discarded)
248
 2713                        					; <6>: rx buffer overflow
249
  Fri Jul 29 18:05:17 2016                                                                                               Page    5
250
 
251
 
252
 
253
 
254
 2714                        					; <5>: remote disconnession (DSR line = 1)
255
 2715                        					; <4>: output buffer is full
256
 2716                        					; <3>: not used
257
 2717                        					; <2>: framing error
258
 2718                        					; <1>: parity error
259
 2719                        					; <0>: overrun error
260
 2720
261
 2721  000048  00            	sppause2	.DB		; local/remote pause flag's
262
 2722                        					; <7>: remote pause (sent XOFF/XON or RTS=1/0)
263
 2723                        					; <6>: local pause (rx XOFF/XON or CTS=0/1)
264
 2724
265
 2725  000049  00            	sppost		.DB		; after POST must hold $C0
266
 2726
267
 2727  00004A  0000          	ibuftail	.DW		; pointer to tail of input buffer
268
 2728  00004C  0000          	ibufhead	.DW		; pointer to head of input buffer
269
 2729  00004E  0000          	ibuftail2	.DW
270
 2730  000050  0000          	ibufhead2	.DW
271
 2731
272
 2732  000052  0000          	obuftail	.DW		; pointer to tail of output buffer
273
 2733  000054  0000          	obufhead	.DW		; pointer to head of output buffer
274
 2734  000056  0000          	obuftail2	.DW
275
 2735  000058  0000          	obufhead2	.DW
276
 2736
277
 2737  00005A  0000          	ibufcnt		.DW		; count of bytes in input buffer
278
 2738  00005C  0000          	obufcnt		.DW		; count of bytes in output buffer
279
 2739  00005E  0000          	ibufcnt2	.DW
280
 2740  000060  0000          	obufcnt2	.DW
281
 2741
282
 2742  000062  0000          	icntmin		.DW		; min. count for clear remote pause
283
 2743  000064  0000          	icntmax		.DW		; max. count for set remote pause
284
 2744  000066  0000          	icntmin2	.DW
285
 2745  000068  0000          	icntmax2	.DW
286
 2746
287
 2747  00006A                	_DPSP_END	.DS	0
288
 2748          000030        	DPSPSIZ		.EQU	(_DPSP_END - _DPSP_START)
289
 2749
290
 2750
291
 2751                        		.ENDS
292
 2752
293
 2753          000043        	ACIArxe_1	.EQU	spstat
294
 2754          000047        	ACIArxe_2	.EQU	spstat2
295
 2755          000042        	ACIAhsk_1	.EQU	spmode
296
 2756          000046        	ACIAhsk_2	.EQU	spmode2
297
 2757          000044        	ACIAPause_1	.EQU	sppause
298
 2758          000048        	ACIAPause_2	.EQU	sppause2
299
 2759          00003B        	ACIAcsr_1	.EQU	spcsr
300
 2760          00003F        	ACIAcsr_2	.EQU	spcsr2
301
 2761          00003C        	ACIAfr_1	.EQU	spfr
302
 2762          000040        	ACIAfr_2	.EQU	spfr2
303
 2763          000044        	ACIAOut_1	.EQU	sppause
304
 2764          000048        	ACIAOut_2	.EQU	sppause2
305
 2765          00005A        	ACIAICnt_1	.EQU	ibufcnt
306
 2766          00005E        	ACIAICnt_2	.EQU	ibufcnt2
307
 2767          00004C        	ACIAIHead_1	.EQU	ibufhead
308
 2768          000050        	ACIAIHead_2	.EQU	ibufhead2
309
 2769          00004A        	ACIAITail_1	.EQU	ibuftail
310
 2770          00004E        	ACIAITail_2	.EQU	ibuftail2
311
  Fri Jul 29 18:05:17 2016                                                                                               Page    6
312
 
313
 
314
 
315
 
316
 2771          00005C        	ACIAOCnt_1	.EQU	obufcnt
317
 2772          000060        	ACIAOCnt_2	.EQU	obufcnt2
318
 2773          000054        	ACIAOHead_1	.EQU	obufhead
319
 2774          000058        	ACIAOHead_2	.EQU	obufhead2
320
 2775          000052        	ACIAOTail_1	.EQU	obuftail
321
 2776          000056        	ACIAOTail_2	.EQU	obuftail2
322
 2777
323
 2778          000100        	ACIAOBUFLEN	.EQU	SOBUFSIZ
324
 2779          000100        	ACIAIBUFLEN	.EQU	SIBUFSIZ
325
 2780          010000        	ACIAOUTBUF1	.EQU	SPOUTBUFF
326
 2781          012000        	ACIAOUTBUF2	.EQU	SPOUTBUFF2
327
 2782          050000        	ACIAINBUF1	.EQU	SPINBUFF
328
 2783          054000        	ACIAINBUF2	.EQU	SPINBUFF2
329
 2784
330
 2785          000045        	ACIATmp		.EQU	sptmp
331
 2786
332
 
333
 
334
             Lines Assembled : 3106                  Errors : 0
335
 
336
 
337