Mercurial > hg > Members > kono > nitros9-code
diff level1/modules/dwread.asm @ 2725:c2112f93923a lwtools-port
o dwio for Atari now uses routines in ROM, so dwread/dwrite stripped of Atari
o Added NMI code (as a conditional) to clock
author | Boisy Pitre <boisy.pitre@nuance.com> |
---|---|
date | Tue, 31 Jul 2012 11:54:02 -0500 |
parents | 22bdfbe8bc68 |
children | bfe3de781ddf |
line wrap: on
line diff
--- a/level1/modules/dwread.asm Mon Jul 30 19:35:05 2012 -0500 +++ b/level1/modules/dwread.asm Tue Jul 31 11:54:02 2012 -0500 @@ -18,74 +18,6 @@ * - IFNE atari -* ATARI SIO Version -TIMEOUT equ $1000 -DWRead - clrb clear Carry & Zero CC flags - pshs cc,dp,a,x,y,u - tfr b,dp - setdp $00 - tfr x,u - ldx #$0000 - orcc #IntMasks -* lda D.IRQENShdw -* sta IRQEN -* ora #%00100000 -* enable the serial input interrupt - - ldb SERIN read what is in the buffer - lda #SKCTL.SERMODEIN|SKCTL.KEYBRDSCAN|SKCTL.KEYDEBOUNCE - sta SKCTL - sta SKRES -inloop@ - lda D.IRQENShdw - ora #IRQEN.SERINRDY - sta D.IRQENShdw - sta IRQEN -* timing loop to read a character from the serial chip - ldd #TIMEOUT -loop@ subd #$0001 - beq overrun_error@ - pshs b - ldb IRQST - bitb #IRQST.SERINRDY - puls b - bne loop@ - ldb SERIN - lda D.IRQENShdw - anda #^IRQEN.SERINRDY - sta D.IRQENShdw - sta IRQEN -* check for framing error - lda SKSTAT - bpl framing_error@ framing error - lsla - bcc overrun_error@ data input overrun - stb ,u+ - abx - leay -1,y - bne inloop@ -bye@ sta SKRES clear framing or data input overrun bits - stx 5,s - puls cc,dp,a,x,y,u,pc -framing_error@ - lda ,s - ora #Carry - sta ,s - bra outtahere@ -overrun_error@ - lda ,s - anda #^Zero - sta ,s -outtahere@ - lda D.IRQENShdw - anda #^IRQEN.SERINRDY - sta D.IRQENShdw - sta IRQEN - bra bye@ - - ELSE IFNE BECKER * NOTE: There is no timeout currently on here... @@ -332,4 +264,3 @@ ENDC ENDC ENDC - ENDC