Anand,

You should have followed up on ZBasic for ESP8266. It's compiler so it's better suited for the limited memory of the ESP8266-01. Most of the ~250 commands for the standard version (Atmel chips) of ZBasic are also available for the ESP8266.

For everyone, this is an outstanding reference for the ESP8266.
https://www.espressif.com/en/media_o...s-book-esp8266