Mercurial > hg > Members > kono > nitros9-code
changeset 2712:918dc38f231b lwtools-port
Removed now that this is in level1/modules
author | Boisy Pitre <boisy.pitre@nuance.com> |
---|---|
date | Tue, 24 Jul 2012 23:39:21 -0500 |
parents | a1e65a5ef4cf |
children | 37d3ee1458b6 |
files | level1/atari/modules/dwread.asm level1/atari/modules/dwwrite.asm |
diffstat | 2 files changed, 0 insertions(+), 132 deletions(-) [+] |
line wrap: on
line diff
--- a/level1/atari/modules/dwread.asm Tue Jul 24 10:09:58 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -* DWRead -* Receive a response from the DriveWire server. -* Times out if serial port goes idle for more than 1.4 (0.7) seconds. -* Serial data format: 1-8-N-1 -* -* Entry: -* X = starting address where data is to be stored -* Y = number of bytes expected -* -* Exit: -* CC = carry set on framing error, Z set if all bytes received -* X = starting address of data received -* Y = checksum -* U is preserved. All accumulators are clobbered -* -DWRead - clrb clear carry - pshs cc,a,x,y,u - tfr x,u - ldx #$0000 - orcc #$50 -* lda D.IRQENSHDW -* sta IRQEN -* ora #%00100000 -* enable the serial input interrupt - - ldb SERIN read what is in the buffer - lda #$13 - sta SKCTL - sta SKRES - -inloop@ - lda D.IRQENSHDW - ora #%00100000 - sta IRQEN - ldd #$0000 -loop@ - subd #$0001 - beq outtahere@ - pshs b - ldb IRQST - bitb #%00100000 - puls b - bne loop@ - ldb SERIN - lda D.IRQENSHDW - sta IRQEN -* check for framing error - lda SKSTAT - bpl outtahere@ framing error - lsla - bpl outtahere@ data input overrun - stb ,u+ - abx - leay -1,y - bne inloop@ - stx 4,s -bye - sta SKRES clear framing or data input overrun bits - puls cc,a,x,y,u,pc -outtahere@ - sta SKRES clear framing or data input overrun bits - puls cc,a - stx 2,s - orcc #$01 - puls x,y,u,pc
--- a/level1/atari/modules/dwwrite.asm Tue Jul 24 10:09:58 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -* Write -* Send a packet to the DriveWire server. -* Serial data format: 1-8-N-1 -* -* Entry: -* X = starting address of data to send -* Y = number of bytes to send -* -* Exit: -* X = address of last byte sent + 1 -* Y = 0 -* All others preserved -* -* Based on the hipatch source for the Atari and translated -* into 6809 assembly language by Boisy G. Pitre. -* -RMSEND equ %11101111 -SKSEND equ %00100011 -MSKSEND equ %00010000 -IMSEND equ %00010000 -IMSCPL equ $08 -DWWrite - andcc #^$01 ; clear carry to assume no error - pshs d,cc -; setup pokey - lda #$28 - sta AUDCTL -* lda #$A0 - lda #$A8 - sta AUDC4 -* short delay before send - clra -shortdelay@ - deca - bne shortdelay@ - orcc #$50 ; mask interrupts - lda #SKSEND ; set pokey to transmit data mode - sta SKCTL - sta SKRES - lda D.IRQENSHDW - ora #MSKSEND - sta IRQEN - lda ,x+ - sta SEROUT - leay -1,y - beq ex@ -byteloop@ - lda ,x+ - ldb #IMSEND -* NOTE: Potential infinite loop here! -waitloop@ - bitb IRQST - bne waitloop@ - ldb #RMSEND - stb IRQEN - ldb D.IRQENSHDW - orb #MSKSEND - stb IRQEN - sta SEROUT - leay -1,y - bne byteloop@ -ex@ - lda #IMSCPL -wt bita IRQST ; wait until transmit complete - bne wt - puls cc,d,pc