Service matter of adhoc employees

As per the advertisements I had applied for the post of Clerk in the District of Punjab on the adhoc basis. I qualified the written examination and was appointed on the post of clerk after due procedure i.e. Medical and other verification followed by the Department. In my appointment letter , it was written that you are appointed on adhoc basis and appointment is for 6 months or the regular appointment made by the High Court whichever is early . But after 6 months no intimation regarding the termination or regarding renewal of service was made and I continually served there . In between the tenue of 2 years & 9 months of my service High Court also made regular appointment. But we also remained continuously on service. And we served without any break and continue for 2 years and 9 months, but suddenly the high Court made the appointment and District Judge relieved us without any prior information or notice Our service is more than 2 years i.e. 2 years 8 months against the regular post. Some employees are completed the 1 year, 2 year, 3 years etc. Sir can we file the writ petition in high Court. Becoz peoples are saying we can't file a writ for regularisation, because we have not completed 3 years of service. Sir pls suggest me.