Hello everyone, this time I doubt the problem is caused by my (lack of) c skills, as the issue occurs inside the standard keil STARTUP.A51 file :) Have a look at this assembly code; I expanded it to be more "granular", so as to see exactly which partial instruction is failing: IF IDATALEN <> 0 MOV R0,#IDATALEN - 1 IDATALOOP: CLR A MOV @R0,A DEC R0 MOV A,R0 JNZ IDATALOOP ; DJNZ R0,IDATALOOP ENDIF This piece of code sometimes stalls (seemingly at random); if I step into it with the uVision debugger, I see the DEC R0 instruction decrementing R0, then the MOV A,R0 puts the old(!) value of R0 into A. To me that says faulty hardware. [confirm/deny]? my IDATALEN is 80H, and i'm using a 8252. Cheers, Barry