# HG changeset patch # User aaronwolfe # Date 1262556581 0 # Node ID 5f76d1a611f6a0d99b7fbf315ee1df2ed1267186 # Parent 9e3038c39b010caaa39b24523281701bf6ef6fff term signal sending for serread port status responses diff -r 9e3038c39b01 -r 5f76d1a611f6 level1/modules/dw3.asm --- a/level1/modules/dw3.asm Sun Jan 03 20:29:41 2010 +0000 +++ b/level1/modules/dw3.asm Sun Jan 03 22:09:41 2010 +0000 @@ -282,12 +282,12 @@ jsr 3,u ; call DWRead beq IRQSvc2 ; branch if no error leas 2,s ; error, cleanup stack 2 - bra IRQExit2 ; don't reset error count on the way out + lbra IRQExit2 ; don't reset error count on the way out ; process response IRQSvc2 ldd ,s++ ; pull returned status byte into A,data into B (set Z if zero, N if multiread) - beq IRQExit ; branch if D = 0 (nothing to do) + lbeq IRQExit ; branch if D = 0 (nothing to do) ; future - handle backing off on polling interval @@ -331,8 +331,28 @@ beq dostat ;port # all 0, this is a status response bra IRQMulti ;its not all 0, this is a multiread -dostat bra IRQExit ; not implemented yet - + + * in status events, databyte is split, 4bits status, 4bits port # +dostat bitb #$F0 ;mask low bits + bne IRQExit ;we only implement code 0000, term + * set u to port # + IFGT Level-1 + ldx D.DWStat + ENDC + lda b,x + bne statcont ; if A is 0, then this device is not active, so exit + bra IRQExit +statcont clrb + tfr d,u + lda