iconWarning = 1
iconError = 2
iconInfo = 3
iconFind = 4
iconNone = 5
iconDebug = 6


macro __digit num
{
   if num < 10
    display '0'+num
   else
    display 'A'+num-10
   end if
}


macro __disp arg1,arg2
{
   if arg2 eq
    display arg1
   else
    local ..tmp
    ..tmp = arg1
    virtual at 0
     repeat 32
      if ..tmp > 0
       db ..tmp mod arg2
       ..tmp = ..tmp / arg2
      end if
     end repeat
     repeat $
      load ..tmp byte from $-%
      __digit ..tmp
     end repeat
     if $ = 0
      display '0'
     end if
    end virtual
   end if
}

macro disp [arg] { __disp arg }


macro DispSize Text, Sz {
  if defined options.ShowSizes & options.ShowSizes
    disp 3,"Sizeof [", Text, "] is: "
    if Sz>10000
      disp <Sz/1024,10>, 'K',$0d,$0a
    else
      disp <Sz,10>, ' bytes.',$0d,$0a
    end if
  end if
}
