annotate level1/atari/modules/dwwrite.asm @ 2629:65b1b5c80fec

Added bootfiles folder
author Boisy Pitre <boisy.pitre@nuance.com>
date Sun, 26 Feb 2012 07:35:52 -0600
parents cff23b8fc512
children a34c08cdfcb2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2626
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
1 * Write
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
2 * Send a packet to the DriveWire server.
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
3 * Serial data format: 1-8-N-1
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
4 *
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
5 * Entry:
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
6 * X = starting address of data to send
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
7 * Y = number of bytes to send
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
8 *
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
9 * Exit:
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
10 * X = address of last byte sent + 1
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
11 * Y = 0
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
12 * All others preserved
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
13 *
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
14 SKSEND equ $23
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
15 MSKSEND equ %00010000
2629
65b1b5c80fec Added bootfiles folder
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2626
diff changeset
16 DWWrite
2626
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
17 pshs d,cc
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
18 orcc #$50
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
19 * lda #SKSEND
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
20 * sta SKCTL
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
21 * sta SKRES
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
22 lda D.IRQENSHDW
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
23 byteloop@
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
24 ora #%00001000
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
25 sta IRQEN
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
26 lda ,x+
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
27 sta SEROUT
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
28 waitloop@
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
29 ldb IRQST
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
30 bitb #%00001000
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
31 bne waitloop@
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
32 lbsr Wait
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
33 lda D.IRQENSHDW
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
34 sta IRQEN
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
35 leay -1,y
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
36 bne byteloop@
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
37 ex@
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
38 clrb
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
39 puls cc,d,pc
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
40
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
41 Wait
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
42 pshs x
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
43 ldx #$100
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
44 wait@
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
45 leax -1,x
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
46 bne wait@
cff23b8fc512 DriveWire routines for Atari SIO
Boisy Pitre <boisy.pitre@nuance.com>
parents:
diff changeset
47 puls x,pc
2629
65b1b5c80fec Added bootfiles folder
Boisy Pitre <boisy.pitre@nuance.com>
parents: 2626
diff changeset
48