Hi, not really sure what is wrong with it, but as it intermittent, my guess is probably context saving during IRQ ? positive thats ok ? and that the var offset is not touched inside irq also ? Further a snippet that might help :) ( would perform the same function ) ; *********************************************************************** ; ; TX_ADD_HEX - Add two bytes of ASCII decimal (0-9, A-F) in out buffer from nibbles = ; in W-reg ; NOTE uses TWO deep stack ( nested calls ) !! = ; TX_ADD_HEX MOVWF Temp ; save byte temporarily SWAPF Temp,W = CALL TX_ADD_NIBBLE ; first one MOVF Temp,W ; get back temp ; and add second one TX_ADD_NIBBLE ANDLW 0x0F ; mask out top nibble, preserv low nibble ADDLW 0xF6 ; add 246, to check if 0-9 or a-f, w=3Dnibble+246 BTFSC STATUS,C ; if carry set then a-f ADDLW 0x07 ; carry set, then add 7, w=3Dnibble+246+7 ( note nibble known to be a-f ) ADDLW 0x3A ; then finally add 58 to get 'proper' ascii = ; 1) w =3D low(nibble+246+58) =3D 48+nibble ( if 0-9 ) ; 2) w =3D low(nibble+246+7+58) =3D 55+nibble ( if a-f ) CALL TX_ADD_BUFFER ; add it to tx buffer RETURN /Tony Tony K=FCbek, Flintab AB = =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2= =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2= =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2 E-mail: tony.kubek@flintab.com =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2= =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2=B2= =B2=B2=B2=B2=B2=B2=B2=B2=B2=B2 -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu