More than 700 black teachers have resigned from some 40 schools in Soweto, the black ghetto outside this city, to protest South Africa's segregated education system.

The teachers decided to quit yesterday, the first day of classes, in support of striking Soweto students who charge that the system of "bantu," or black, education taught at the schools is "education for slavery."

The move came despite the government's drive to crack down on student unrest by taking over direct control of the ghetto's schools yesterday.

Today police fired over the heads of about 500 students who said they were planning to demonstrate in the center of Johannesburg, 25 miles away.

Brigadier Jan Visser, the Soweto police commissioner, said several rifle shots were fired to disperse the crowd, which had gathered at a station on the fringes of the township. There were no injuries or arrests, he said.

Baton-swinging police dispersed students outside one high school yesterday after they began chanting slogans and giving the clenched-fist black power salute.

The Soweto student boycott has been in effect for more than six weeks in the sprawling ghetto of 1.2 million, with school attendance fluctuating from day to day.

Meanwhile, in Cape Town, a small time bomb exploded in a trash basket in the city center, scattering pamphlets of the banned African National Congress. Onlookers rushed to grab the pamphlets while a policeman on patrol tried to confiscate them and clear the area.

In a separate development, the Johannesburg Star said that it had found in a survey that almost 19 per cent of the black labor force in the Johannesburg-Pretoria area is out of work. The Star said it commissioned the survey because the government does not keep statistics on black unemployment.