annotate level1/modules/dwread.asm @ 2743:b44abaa5da88

Found that the lib folder was not being processed. Corrected issue.
author drencor-xeen
date Tue, 08 Jan 2013 14:01:56 -0600
parents d1976224b314
children 8b2df903334c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2231
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
1 *******************************************************
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
2 *
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
3 * DWRead
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
4 * Receive a response from the DriveWire server.
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
5 * Times out if serial port goes idle for more than 1.4 (0.7) seconds.
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
6 * Serial data format: 1-8-N-1
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
7 * 4/12/2009 by Darren Atkinson
2182
b1b374ada668 Added 38.4kbps routines from Darren Atkinson
boisy
parents: 2180
diff changeset
8 *
2231
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
9 * Entry:
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
10 * X = starting address where data is to be stored
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
11 * Y = number of bytes expected
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
12 *
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
13 * Exit:
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
14 * CC = carry set on framing error, Z set if all bytes received
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
15 * X = starting address of data received
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
16 * Y = checksum
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
17 * U is preserved. All accumulators are clobbered
2182
b1b374ada668 Added 38.4kbps routines from Darren Atkinson
boisy
parents: 2180
diff changeset
18 *
2231
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
19
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
20
2546
f0977fc3f2d6 Added code for Gary's CoCo3FPGA interface
boisy
parents: 2231
diff changeset
21 IFNE BECKER
2551
963688cd0596 Updated
boisy
parents: 2550
diff changeset
22 * NOTE: There is no timeout currently on here...
963688cd0596 Updated
boisy
parents: 2550
diff changeset
23 DWRead pshs cc,d,x,u
2741
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
24 leau ,x
2551
963688cd0596 Updated
boisy
parents: 2550
diff changeset
25 ldx #$0000
963688cd0596 Updated
boisy
parents: 2550
diff changeset
26 orcc #IntMasks
963688cd0596 Updated
boisy
parents: 2550
diff changeset
27 loop@ ldb $FF41
963688cd0596 Updated
boisy
parents: 2550
diff changeset
28 bitb #$02
963688cd0596 Updated
boisy
parents: 2550
diff changeset
29 beq loop@
963688cd0596 Updated
boisy
parents: 2550
diff changeset
30 ldb $FF42
963688cd0596 Updated
boisy
parents: 2550
diff changeset
31 stb ,u+
963688cd0596 Updated
boisy
parents: 2550
diff changeset
32 abx
963688cd0596 Updated
boisy
parents: 2550
diff changeset
33 leay -1,y
963688cd0596 Updated
boisy
parents: 2550
diff changeset
34 bne loop@
2546
f0977fc3f2d6 Added code for Gary's CoCo3FPGA interface
boisy
parents: 2231
diff changeset
35
2551
963688cd0596 Updated
boisy
parents: 2550
diff changeset
36 tfr x,y
963688cd0596 Updated
boisy
parents: 2550
diff changeset
37 puls cc
963688cd0596 Updated
boisy
parents: 2550
diff changeset
38 andcc #^Carry
963688cd0596 Updated
boisy
parents: 2550
diff changeset
39 orcc #Zero
963688cd0596 Updated
boisy
parents: 2550
diff changeset
40 puls d,x,u,pc
2546
f0977fc3f2d6 Added code for Gary's CoCo3FPGA interface
boisy
parents: 2231
diff changeset
41
f0977fc3f2d6 Added code for Gary's CoCo3FPGA interface
boisy
parents: 2231
diff changeset
42 ELSE
2231
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
43 IFNE BAUD38400
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
44 *******************************************************
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
45 * 38400 bps using 6809 code and timimg
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
46 *******************************************************
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
47
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
48 DWRead clra ; clear Carry (no framing error)
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
49 deca ; clear Z flag, A = timeout msb ($ff)
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
50 tfr cc,b
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
51 pshs u,x,dp,b,a ; preserve registers, push timeout msb
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
52 orcc #$50 ; mask interrupts
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
53 tfr a,dp ; set direct page to $FFxx
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
54 setdp $ff
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
55 leau ,x ; U = storage ptr
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
56 ldx #0 ; initialize checksum
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
57 adda #2 ; A = $01 (serial in mask), set Carry
2182
b1b374ada668 Added 38.4kbps routines from Darren Atkinson
boisy
parents: 2180
diff changeset
58
2231
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
59 * Wait for a start bit or timeout
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
60 rx0010 bcc rxExit ; exit if timeout expired
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
61 ldb #$ff ; init timeout lsb
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
62 rx0020 bita <BBIN ; check for start bit
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
63 beq rxByte ; branch if start bit detected
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
64 subb #1 ; decrement timeout lsb
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
65 bita <BBIN
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
66 beq rxByte
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
67 bcc rx0020 ; loop until timeout lsb rolls under
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
68 bita <BBIN
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
69 beq rxByte
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
70 addb ,s ; B = timeout msb - 1
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
71 bita <BBIN
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
72 beq rxByte
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
73 stb ,s ; store decremented timeout msb
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
74 bita <BBIN
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
75 bne rx0010 ; loop if still no start bit
2182
b1b374ada668 Added 38.4kbps routines from Darren Atkinson
boisy
parents: 2180
diff changeset
76
2231
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
77 * Read a byte
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
78 rxByte leay ,-y ; decrement request count
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
79 ldd #$ff80 ; A = timeout msb, B = shift counter
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
80 sta ,s ; reset timeout msb for next byte
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
81 rx0030 exg a,a
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
82 nop
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
83 lda <BBIN ; read data bit
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
84 lsra ; shift into carry
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
85 rorb ; rotate into byte accumulator
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
86 lda #$01 ; prep stop bit mask
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
87 bcc rx0030 ; loop until all 8 bits read
2182
b1b374ada668 Added 38.4kbps routines from Darren Atkinson
boisy
parents: 2180
diff changeset
88
2231
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
89 stb ,u+ ; store received byte to memory
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
90 abx ; update checksum
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
91 ldb #$ff ; set timeout lsb for next byte
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
92 anda <BBIN ; read stop bit
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
93 beq rxExit ; exit if framing error
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
94 leay ,y ; test request count
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
95 bne rx0020 ; loop if another byte wanted
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
96 lda #$03 ; setup to return SUCCESS
2182
b1b374ada668 Added 38.4kbps routines from Darren Atkinson
boisy
parents: 2180
diff changeset
97
2231
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
98 * Clean up, set status and return
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
99 rxExit leas 1,s ; remove timeout msb from stack
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
100 inca ; A = status to be returned in C and Z
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
101 ora ,s ; place status information into the..
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
102 sta ,s ; ..C and Z bits of the preserved CC
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
103 leay ,x ; return checksum in Y
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
104 puls cc,dp,x,u,pc ; restore registers and return
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
105 setdp $00
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
106
2182
b1b374ada668 Added 38.4kbps routines from Darren Atkinson
boisy
parents: 2180
diff changeset
107
b1b374ada668 Added 38.4kbps routines from Darren Atkinson
boisy
parents: 2180
diff changeset
108 ELSE
2741
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
109 IFNE H6309
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
110 *******************************************************
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
111 * 57600 (115200) bps using 6309 native mode
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
112 *******************************************************
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
113
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
114 DWRead clrb ; clear Carry (no framing error)
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
115 decb ; clear Z flag, B = $FF
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
116 pshs u,x,dp,cc ; preserve registers
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
117 orcc #$50 ; mask interrupts
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
118 * ldmd #1 ; requires 6309 native mode
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
119 tfr b,dp ; set direct page to $FFxx
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
120 setdp $ff
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
121 leay -1,y ; adjust request count
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
122 leau ,x ; U = storage ptr
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
123 tfr 0,x ; initialize checksum
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
124 lda #$01 ; A = serial in mask
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
125 bra rx0030 ; go wait for start bit
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
126
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
127 * Read a byte
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
128 rxByte sexw ; 4 cycle delay
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
129 ldw #$006a ; shift counter and timing flags
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
130 clra ; clear carry so next will branch
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
131 rx0010 bcc rx0020 ; branch if even bit number (15 cycles)
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
132 nop ; extra (16th) cycle
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
133 rx0020 lda <BBIN ; read bit
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
134 lsra ; move bit into carry
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
135 rorb ; rotate bit into byte accumulator
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
136 lda #0 ; prep A for 8th data bit
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
137 lsrw ; bump shift count, timing bit to carry
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
138 bne rx0010 ; loop until 7th data bit has been read
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
139 incw ; W = 1 for subtraction from Y
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
140 inca ; A = 1 for reading bit 7
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
141 anda <BBIN ; read bit 7
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
142 lsra ; move bit 7 into carry, A = 0
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
143 rorb ; byte is now complete
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
144 stb ,u+ ; store received byte to memory
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
145 abx ; update checksum
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
146 subr w,y ; decrement request count
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
147 inca ; A = 1 for reading stop bit
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
148 anda <BBIN ; read stop bit
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
149 bls rxExit ; exit if completed or framing error
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
150
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
151 * Wait for a start bit or timeout
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
152 rx0030 clrw ; initialize timeout counter
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
153 rx0040 bita <BBIN ; check for start bit
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
154 beq rxByte ; branch if start bit detected
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
155 addw #1 ; bump timeout counter
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
156 bita <BBIN
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
157 beq rxByte
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
158 bcc rx0040 ; loop until timeout rolls over
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
159 lda #$03 ; setup to return TIMEOUT status
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
160
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
161 * Clean up, set status and return
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
162 rxExit beq rx0050 ; branch if framing error
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
163 eora #$02 ; toggle SUCCESS flag
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
164 rx0050 inca ; A = status to be returned in C and Z
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
165 ora ,s ; place status information into the..
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
166 sta ,s ; ..C and Z bits of the preserved CC
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
167 leay ,x ; return checksum in Y
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
168 puls cc,dp,x,u,pc ; restore registers and return
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
169 setdp $00
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
170
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
171
d1976224b314 Found duplicated code and IFNE H6309-1 statements in dwwrite.asm. Verified it was duplicated code. Must have been accidently copied at some point. Removed second copy of this IFNE H6309-1.
drencor-xeen
parents: 2551
diff changeset
172 ELSE
2231
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
173 *******************************************************
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
174 * 57600 (115200) bps using 6809 code and timimg
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
175 *******************************************************
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
176
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
177 DWRead clra ; clear Carry (no framing error)
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
178 deca ; clear Z flag, A = timeout msb ($ff)
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
179 tfr cc,b
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
180 pshs u,x,dp,b,a ; preserve registers, push timeout msb
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
181 orcc #$50 ; mask interrupts
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
182 tfr a,dp ; set direct page to $FFxx
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
183 setdp $ff
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
184 leau ,x ; U = storage ptr
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
185 ldx #0 ; initialize checksum
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
186 lda #$01 ; A = serial in mask
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
187 bra rx0030 ; go wait for start bit
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
188
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
189 * Read a byte
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
190 rxByte leau 1,u ; bump storage ptr
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
191 leay ,-y ; decrement request count
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
192 lda <BBIN ; read bit 0
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
193 lsra ; move bit 0 into Carry
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
194 ldd #$ff20 ; A = timeout msb, B = shift counter
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
195 sta ,s ; reset timeout msb for next byte
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
196 rorb ; rotate bit 0 into byte accumulator
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
197 rx0010 lda <BBIN ; read bit (d1, d3, d5)
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
198 lsra
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
199 rorb
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
200 bita 1,s ; 5 cycle delay
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
201 bcs rx0020 ; exit loop after reading bit 5
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
202 lda <BBIN ; read bit (d2, d4)
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
203 lsra
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
204 rorb
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
205 leau ,u
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
206 bra rx0010
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
207
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
208 rx0020 lda <BBIN ; read bit 6
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
209 lsra
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
210 rorb
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
211 leay ,y ; test request count
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
212 beq rx0050 ; branch if final byte of request
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
213 lda <BBIN ; read bit 7
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
214 lsra
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
215 rorb ; byte is now complete
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
216 stb -1,u ; store received byte to memory
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
217 abx ; update checksum
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
218 lda <BBIN ; read stop bit
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
219 anda #$01 ; mask out other bits
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
220 beq rxExit ; exit if framing error
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
221
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
222 * Wait for a start bit or timeout
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
223 rx0030 bita <BBIN ; check for start bit
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
224 beq rxByte ; branch if start bit detected
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
225 bita <BBIN ; again
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
226 beq rxByte
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
227 ldb #$ff ; init timeout lsb
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
228 rx0040 bita <BBIN
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
229 beq rxByte
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
230 subb #1 ; decrement timeout lsb
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
231 bita <BBIN
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
232 beq rxByte
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
233 bcc rx0040 ; loop until timeout lsb rolls under
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
234 bita <BBIN
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
235 beq rxByte
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
236 addb ,s ; B = timeout msb - 1
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
237 bita <BBIN
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
238 beq rxByte
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
239 stb ,s ; store decremented timeout msb
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
240 bita <BBIN
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
241 beq rxByte
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
242 bcs rx0030 ; loop if timeout hasn't expired
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
243 bra rxExit ; exit due to timeout
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
244
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
245 rx0050 lda <BBIN ; read bit 7 of final byte
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
246 lsra
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
247 rorb ; byte is now complete
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
248 stb -1,u ; store received byte to memory
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
249 abx ; calculate final checksum
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
250 lda <BBIN ; read stop bit
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
251 anda #$01 ; mask out other bits
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
252 ora #$02 ; return SUCCESS if no framing error
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
253
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
254 * Clean up, set status and return
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
255 rxExit leas 1,s ; remove timeout msb from stack
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
256 inca ; A = status to be returned in C and Z
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
257 ora ,s ; place status information into the..
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
258 sta ,s ; ..C and Z bits of the preserved CC
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
259 leay ,x ; return checksum in Y
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
260 puls cc,dp,x,u,pc ; restore registers and return
27f07aa0bca0 Updated modules to use Darren Atkinson's latest changes to low level read/write routines
boisy
parents: 2182
diff changeset
261 setdp $00
2180
660cc987e18d Added DriveWire 3 modules to distribution
boisy
parents:
diff changeset
262
2182
b1b374ada668 Added 38.4kbps routines from Darren Atkinson
boisy
parents: 2180
diff changeset
263 ENDC
b1b374ada668 Added 38.4kbps routines from Darren Atkinson
boisy
parents: 2180
diff changeset
264 ENDC
2546
f0977fc3f2d6 Added code for Gary's CoCo3FPGA interface
boisy
parents: 2231
diff changeset
265 ENDC