what could be the size of the largest hex file that could be generated by keil software ?
Upwards of 32 megabytes, for some of the CPUs it supports. E.g. if you were to actually use up all the 16Megs of codespace a DS80C390 can manage. Now, for the truly important question: why on earth would you want to know that?
presumably, that depends on whether you're using Hex-80 or Hex-386?