With the development of high rise buildings and the enhancement of people's anti-fire consciousness, the automatic fire alarm and fire joint action equipment system have received wide prospects for development. The veracity of the detectors will affect the capability of the whole alarm system. So the fire detection technology has been the main direction of this field. The fire fighting system is a very important system, and its assignment is to protect the safety of people and property. This thesis designed a fire alarm system of a building. This system can monitor the check point the temperature and the smog information, when the fire occurs may make the response, sends out the acousto-optic warning, and opens the corresponding fire fighting gas valve and the linkage equipment. This paper also deals with the principles of automatic fire alarm controller and joint action equipment controller, and the designing of software procedure and hardware circuit. The programming methods for mufti-task real-time system are discussed emphatically.