A method and device for code conversion from assembly language to high-level language

A high-level language and code conversion technology, which is applied in the field of computer software programming, can solve the problems that assembly language is difficult to understand, and assembly language cannot be transplanted to other processors to run, so as to avoid negligent errors, efficient conversion, and reduce mechanical the effect of labor

Active Publication Date: 2015-11-18
SHENZHEN YIRI TECH
View PDF1 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Regardless of whether it is converted using machine instructions or an assembly language written directly by humans, the assembly language needs to run on a specific processor, and the assembly language cannot be transplanted to run on other processors. Moreover, when the amount of code is large Assembly language is hard to read when
In the case that the high-level language codes corresponding to these codes cannot be obtained, there is an urgent need to convert the assembly language of the chip into a general-purpose high-level language in many cases, so an efficient method is needed to convert the assembly language into a high-level language. Troubleshoot porting and reading

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and device for code conversion from assembly language to high-level language
  • A method and device for code conversion from assembly language to high-level language
  • A method and device for code conversion from assembly language to high-level language

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0042] In order to make the technical problems, technical solutions and beneficial effects solved by the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

[0043] Such as figure 1 as shown, figure 1 It shows a code conversion method from assembly language to high-level language according to an embodiment of the present invention. Before the code conversion, the assembly instructions in the chip are first obtained, and the present invention focuses on obtaining the assembly instructions on the basis of Subsequent assembly language to high-level language code conversion method. Of course, the assembly instruction can also be obtained when the assembly instruction is used in the code conversion method. The general method to...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a method and a device for code conversion from assembly language to high-level language. The method includes: acquiring assembly instructions; S100, creating output text in the high-level language, and using the high-level language codes to simulate a processor operation environment corresponding to the assembly instructions; S200, searching high-level language functions corresponding to the assembly instructions, and creating a table of mapping relation between the assembly instructions and the high-level language functions; S300, traversing the assembly instructions, extracting a data item including instruction addresses, operators and a plurality of opcodes; S400, analyzing all the functions, automatically generating and outputting declarations of the functions to the output text in the high-level language; S500, generating a corresponding high-level language code for each function, and outputting the code to the output text in the high-level language; and S600, adding auxiliary codes allowing for successful execution of the high-level language codes in the output text. The assembly instructions can be converted into the high-level language efficiently and correctly by the method.

Description

technical field [0001] The invention belongs to the field of computer software programming, and in particular relates to a disassembly technology of the underlying software of a chip system. Background technique [0002] Software on chips such as SOC and DSP is generally developed in high-level languages ​​such as C and C++. On the development machine, through the special compiler of the chip, the high-level language is compiled into binary machine instructions, and then the binary machine instructions are loaded into the memory of the chip, and then the corresponding compiler can be used to convert the machine instructions into corresponding assembly language. [0003] Therefore, to disassemble the software on a particular chip is to restore these machine instructions to a high-level language. Regardless of whether it is converted using machine instructions or an assembly language written directly by humans, the assembly language needs to run on a specific processor, and ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/44
Inventor 赵勇胜陈志勇崔荣涛文智力
Owner SHENZHEN YIRI TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products