"4" doesn't sound right...
Disp value►Hex should always display four hexadecimal digits, not a single digit. Do you have MathPrint enabled perhaps? I know it can sometimes cause problems with printing text to the homescreen.
And that code is
almost right.

Just get rid of the
! before the
If and it should work properly.