  includepath "$/inc/"
  include     "minwin.inc"


  function GetExeDir() as string
  ==============================
  char s[256]
  byte b at strptr s
  GetModuleFileName 0,s,256
  sys i
  do
    select b
    case 0  : exit do
    case 92 : i=@b
    end select
    @b++
  end do
  return left s,i-strptr(s)
  end function

  print GetExeDir