Abstract:Based on the principle of finite state machine, the article presents one new exceptional handling algorithm aiming at software and hardware exceptional handling in embedded system running in pathology equipment. The algorithm retrieves exceptional code based on the type of exception at first, and then handles it with XML formatted exceptional handling table and the specific state machines. The article firstly introduces background on the algorithm and then describes the detailed design and implementation. After that, one example is also shown to verify the algorithm. Finally, it also discusses how to improve this algorithm briefly.