It's not AOS; it's a change of status. The two are VERY DIFFERENT PROCESSES! It depends on when the H-1B start date is. If it is still within the current fiscal year, then yes, you may stay. If it is for the next fiscal year, you may be able to stay if the USCIS authorizes this bridge gap this year as it has in prior years when the H-1B cap was reached.
Please let me know if you have any additional questions or if I may be of further assistance to you in this matter.