%BEGIN
%ROUTINE PRHEX(%INTEGER VALUE, PLACES)
%CONSTBYTEINTEGERARRAY HEX(0:15)='0','1','2','3','4',
               '5','6','7','8','9','A','B','C','D','E','F'
%INTEGER I
      %CYCLE I=PLACES<<2-4, -4, 0
         PRINT SYMBOL(HEX(VALUE>>I&15))
      %REPEAT
%END
PRHEX(X'B00B',8)
%ENDOFPROGRAM
