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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
1 ********************************************************************
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
2 * Clock2 - DriveWire 3 RTC Driver
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
3 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
4 * $Id$
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
5 *
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
7 * Comment
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
8 * ------------------------------------------------------------------
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
9 * 1 2004/08/18 Boisy G. Pitre
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
10 * Separated clock2 modules for source clarity.
2308
b5f0c5326e7e Changes made to move ISR to dw3
boisy
parents: 2270
diff changeset
11 *
b5f0c5326e7e Changes made to move ISR to dw3
boisy
parents: 2270
diff changeset
12 * 2 2010/01/02 Boisy G. Pitre
b5f0c5326e7e Changes made to move ISR to dw3
boisy
parents: 2270
diff changeset
13 * Saved some bytes by optimizing
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
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
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
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
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
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
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
27
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
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
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
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
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
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
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
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
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
37
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
38 * Three Entry Points:
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
39 * - Init
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
40 * - GetTime
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
41 * - SetTIme
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
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
1a75c932f607 Added OP_SETIME
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
46 nop
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
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
1a75c932f607 Added OP_SETIME
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
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
1a75c932f607 Added OP_SETIME
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
68 puls a
1a75c932f607 Added OP_SETIME
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
69 ldx #D.Year
1a75c932f607 Added OP_SETIME
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
70 ldy #$0006
1a75c932f607 Added OP_SETIME
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2634
diff changeset
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
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
90
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
91
2212
58ca25581f6d Added D.SysPrc move to clock2_dw3
boisy
parents: 2180
diff changeset
92 Init
2309
f3e79ee2ffef Driver now moved ISR to dw3, all works
boisy
parents: 2308
diff changeset
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
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
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