Mercurial > hg > Members > kono > nitros9-code
annotate level1/modules/clock2_dw.asm @ 2939:011a5f26e9da
rb1773: Fix comments about 135 TPI versus 48 or 96
Some comments were wrong about 48/96/135 TPI.
Some new comments have been added.
There are no code changes in this commit, the assembled binary
should be identical.
author | Robert Gault <robert.gault@att.net> |
---|---|
date | Sat, 25 Jan 2014 23:19:38 +0100 |
parents | 28ed72477814 |
children |
rev | line source |
---|---|
2180 | 1 ******************************************************************** |
2 * Clock2 - DriveWire 3 RTC Driver | |
3 * | |
4 * $Id$ | |
5 * | |
6 * Edt/Rev YYYY/MM/DD Modified by | |
7 * Comment | |
8 * ------------------------------------------------------------------ | |
9 * 1 2004/08/18 Boisy G. Pitre | |
10 * Separated clock2 modules for source clarity. | |
2308 | 11 * |
12 * 2 2010/01/02 Boisy G. Pitre | |
13 * Saved some bytes by optimizing | |
2180 | 14 |
2634
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
15 nam Clock2 |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
16 ttl DriveWire 3 RTC Driver |
2180 | 17 |
2634
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
18 ifp1 |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
19 use defsfile |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
20 use drivewire.d |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
21 endc |
2180 | 22 |
2634
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
23 tylg set Sbrtn+Objct |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
24 atrv set ReEnt+rev |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
25 rev set $00 |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
26 edition set 2 |
2180 | 27 |
28 | |
2634
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
29 RTC.Base equ $0000 |
2180 | 30 |
2634
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
31 mod eom,name,tylg,atrv,JmpTable,RTC.Base |
2180 | 32 |
2634
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
33 name fcs "Clock2" |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
34 fcb edition |
2180 | 35 |
2724
05b648103e78
Renamed dw3.sb to dwio.sb and rbdw3 to rbdw
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2720
diff
changeset
|
36 subname fcs "dwio" |
2180 | 37 |
38 * Three Entry Points: | |
39 * - Init | |
40 * - GetTime | |
41 * - SetTIme | |
42 JmpTable | |
2634
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
43 bra Init |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
44 nop |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
45 bra GetTime RTC Get Time |
2635 | 46 nop |
2180 | 47 |
2720
482a547d5155
Fixed so OP_DWINIT puts response in globals
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
48 SetTime |
482a547d5155
Fixed so OP_DWINIT puts response in globals
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
49 IFGT Level-1 |
482a547d5155
Fixed so OP_DWINIT puts response in globals
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
50 lda <D.DWSrvID |
482a547d5155
Fixed so OP_DWINIT puts response in globals
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
51 ELSE |
482a547d5155
Fixed so OP_DWINIT puts response in globals
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
52 lda >D.DWSrvID |
2656
2ebf5e737ceb
Updated to address Atari port problems
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2635
diff
changeset
|
53 ENDC |
2720
482a547d5155
Fixed so OP_DWINIT puts response in globals
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
54 cmpa #128 |
482a547d5155
Fixed so OP_DWINIT puts response in globals
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
55 bne leave |
482a547d5155
Fixed so OP_DWINIT puts response in globals
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2714
diff
changeset
|
56 pshs u,y,x,d |
2634
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
57 IFGT Level-1 |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
58 ldu <D.DWSubAddr |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
59 ELSE |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
60 ldu >D.DWSubAddr |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
61 ENDC |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
62 beq UpdLeave in case we failed to link it, just exit |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
63 lda #OP_SETTIME |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
64 pshs a |
2635 | 65 ldy #$0001 |
2634
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
66 leax ,s |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
67 jsr DW$Write,u |
2635 | 68 puls a |
69 ldx #D.Year | |
70 ldy #$0006 | |
71 jsr DW$Write,u | |
2634
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
72 bra UpdLeave |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
73 |
2656
2ebf5e737ceb
Updated to address Atari port problems
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2635
diff
changeset
|
74 GetTime |
2ebf5e737ceb
Updated to address Atari port problems
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2635
diff
changeset
|
75 lda #OP_TIME Time packet |
2ebf5e737ceb
Updated to address Atari port problems
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2635
diff
changeset
|
76 pshs u,y,x,d |
2634
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
77 IFGT Level-1 |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
78 ldu <D.DWSubAddr |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
79 ELSE |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
80 ldu >D.DWSubAddr |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
81 ENDC |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
82 beq UpdLeave in case we failed to link it, just exit |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
83 leax ,s |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
84 ldy #$0001 |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
85 jsr DW$Write,u |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
86 ldx #D.Year |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
87 ldy #$0006 |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
88 jsr DW$Read,u |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
89 UpdLeave puls d,x,y,u,pc |
2180 | 90 |
91 | |
2212 | 92 Init |
2309 | 93 * Check if subroutine already linked |
2634
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
94 IFGT Level-1 |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
95 ldx <D.DWSubAddr |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
96 ELSE |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
97 ldx >D.DWSubAddr |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
98 ENDC |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
99 bne leave |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
100 IFGT Level-1 |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
101 ldx <D.Proc |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
102 pshs x |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
103 ldx <D.SysPrc |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
104 stx <D.Proc |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
105 ENDC |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
106 leax subname,pcr |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
107 clra |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
108 os9 F$Link |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
109 IFGT Level-1 |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
110 puls x |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
111 stx <D.Proc |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
112 bcs leave |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
113 sty <D.DWSubAddr |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
114 ELSE |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
115 bcs leave |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
116 sty >D.DWSubAddr |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
117 ENDC |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
118 jmp ,y call initialization routine |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
119 leave rts |
2180 | 120 |
2634
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
121 emod |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
122 eom equ * |
a34c08cdfcb2
Stable dwread/dwrite... pipeman also assembles.
Boisy Pitre <boisy.pitre@nuance.com>
parents:
2313
diff
changeset
|
123 end |