# HG changeset patch # User drencor-xeen # Date 1357492342 21600 # Node ID d1976224b314a80fba69b661cabc04bb8f1682cd # Parent 48afe2b5de06abc19ec4bad0c4fd045c7db0d456 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. Changed H6309-1 to H6309 and moved the real H6309 code into this routine and moved the standard 6809 57600bps code to the last "else" section. This was done to dwread.asm, dwwrite.asm, dw4write.asm, and dw4read.asm. Test compiled and everything still seems to compile as it should. diff -r 48afe2b5de06 -r d1976224b314 ChangeLog --- a/ChangeLog Sat Jan 05 22:56:05 2013 -0600 +++ b/ChangeLog Sun Jan 06 11:12:22 2013 -0600 @@ -1,6 +1,24 @@ NitrOS-9 V3.2.9: ---------------------------------------------------------- +2013/01/06 David Ladd +M ChangeLog +M level1/modules/dwread.asm +M level1/modules/dwwrite.asm +M level1/modules/dw4read.asm +M level1/modules/dw4write.asm + +Robert Gault found a problem related to the H6309-1 not always +functioning as expected. Changed dwread.asm, dwwrite.asm, dw4read.asm +dw4write.asm to reflect these needed changes and movement of code to +correct locations. + +In examining the dwwrite.asm source file found two sections of H6309-1 and +code that were the same. This might have been root problem of the +compiling problems. Verified both sections of code were identical before +removing second copy. + +---------------------------------------------------------- 2013/01/05 David Ladd M ChangeLog M level1/coco/makefile diff -r 48afe2b5de06 -r d1976224b314 level1/modules/dw4read.asm --- a/level1/modules/dw4read.asm Sat Jan 05 22:56:05 2013 -0600 +++ b/level1/modules/dw4read.asm Sun Jan 06 11:12:22 2013 -0600 @@ -1,4 +1,4 @@ - IFEQ H6309-1 + IFNE H6309 ******************************************************* * diff -r 48afe2b5de06 -r d1976224b314 level1/modules/dw4write.asm --- a/level1/modules/dw4write.asm Sat Jan 05 22:56:05 2013 -0600 +++ b/level1/modules/dw4write.asm Sun Jan 06 11:12:22 2013 -0600 @@ -1,4 +1,4 @@ - IFEQ H6309-1 + IFNE H6309 ******************************************************* * diff -r 48afe2b5de06 -r d1976224b314 level1/modules/dwread.asm --- a/level1/modules/dwread.asm Sat Jan 05 22:56:05 2013 -0600 +++ b/level1/modules/dwread.asm Sun Jan 06 11:12:22 2013 -0600 @@ -21,7 +21,7 @@ IFNE BECKER * NOTE: There is no timeout currently on here... DWRead pshs cc,d,x,u - leau ,x + leau ,x ldx #$0000 orcc #IntMasks loop@ ldb $FF41 @@ -106,7 +106,70 @@ ELSE - IFNE H6309-1 + IFNE H6309 +******************************************************* +* 57600 (115200) bps using 6309 native mode +******************************************************* + +DWRead clrb ; clear Carry (no framing error) + decb ; clear Z flag, B = $FF + pshs u,x,dp,cc ; preserve registers + orcc #$50 ; mask interrupts +* ldmd #1 ; requires 6309 native mode + tfr b,dp ; set direct page to $FFxx + setdp $ff + leay -1,y ; adjust request count + leau ,x ; U = storage ptr + tfr 0,x ; initialize checksum + lda #$01 ; A = serial in mask + bra rx0030 ; go wait for start bit + +* Read a byte +rxByte sexw ; 4 cycle delay + ldw #$006a ; shift counter and timing flags + clra ; clear carry so next will branch +rx0010 bcc rx0020 ; branch if even bit number (15 cycles) + nop ; extra (16th) cycle +rx0020 lda