西南石油大学学报(自然科学版) ›› 1989, Vol. 11 ›› Issue (2): 120-125.DOI: 10.3863/j.issn.1000-2634.1989.02.13

• 论文 • 上一篇    下一篇

程序反汇编的一种方法

王大明
  

  1. (管理工程系)
  • 收稿日期:1988-09-06 修回日期:1900-01-01 出版日期:1989-04-20 发布日期:1989-04-20

AN ALGORITHM FOR Z-80 DISASSEMBLING

Wang Da-ming
  

  1. (Department of Management)
  • Received:1988-09-06 Revised:1900-01-01 Online:1989-04-20 Published:1989-04-20

摘要: 本文以Z80机为例,给出了一种反汇编目标代码的算法。借助于加权有向图这一数学工具,将机器代码的反汇编问题转化成有向图的遍历问题,可很快地反汇编出目的码的符号指令码及数据区代码,大大地提高工作效率。该算法在本文中虽是以Z80机为例给出,但不难推广到其它机种。

关键词: 算法, 反汇编

Abstract:

Taking Z-80 for example,this paper presents an algorithm which disassembles the object codes into mnemonics. By means of the graph, the issue of disassembling object code is transformed weighted-direct into travelling weighted-directed graph. Therefore,the instruction mnemonics and data area codes can be obtained easily and quickly, making the process of disassembling much shortened, Although the algorithm is developed for Z-80 machine in the paper, it is not difficult to extend it to other machine instructions.

Key words: Algorithm, Disassembling