# US 2018/0321955 A1 · Method and device of running application program across systems

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2018/0321955 A1
- Document ID: US20180321955A1
- Status: Published application
- Kind: A1
- Application number: 15/552,034
- Filed: 2016-11-17
- Published: 2018-11-08
- Earliest claimed: 2016-08-23
- Assignees: Pax Computer Technology (Shenzhen) Co., Ltd.
- Applicants: Pax Computer Technology (Shenzhen) Co., Ltd.
- Inventors: Shaohai LIU; Xianwu RUAN; Renchi ZHENG; Lihong XIE
- Web page: https://patentgrep.com/patent/US20180321955A1

## CPC

- G06F 9/44536: {Selecting among different versions}
- G06F 9/44: Arrangements for executing specific programs
- G06F 9/4486: {Formation of subprogram jump address}
- G06F 9/485: {Task life-cycle, e.g. stopping, restarting, resuming execution (G06F9/4881 takes precedence)}
- G06F 9/541: {via adapters, e.g. between incompatible applications}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method of running an application program across systems is proposed, the method comprises loading a target application program; applying for a memory space on a current operating system for the target application program; modifying an address of a global variable and an address of an absolute jump instruction in the target application program according to an address of the applied memory space to adapt to the memory space of the current operating system; obtaining a SWI instruction of the target application program; and redirecting the SWI instruction to an instruction of calling the current operating system.

## Claims

### Claim 1

A method of running an application program across systems, the method comprising:
loading a target application program;
applying for a memory space on a current operating system for the target application program;
modifying an address of a global variable and an address of an absolute jump instruction in the target application program according to an address of the applied memory space to adapt to the memory space of the current operating system;
obtaining a SWI instruction of the target application program; and
redirecting the SWI instruction to an instruction of calling the current operating system.

### Claim 2 (depends on 1)

The method of claim 1, characterized in that, after the step of loading the target application program, the method further comprises: translating an instruction in the target application program in a manner of binary translation.

### Claim 3 (depends on 1)

The method of claim 1, characterized in that, prior to the step of modifying the address of the global variable and the address of the jump instruction in the target application program according to the address of the applied memory space to adapt to the memory space of the current operating system, the method further comprises:
obtaining binary data of the target application program; and
finding the global variable and the absolute jump instruction in the target application program by analyzing the binary data.

### Claim 4 (depends on 3)

The method of claim 3, characterized in that, the step of finding the global variable and the absolute jump instruction in the target application program by analyzing the binary data comprises:
locating absolute addresses corresponding to the global variable and the absolute jump instruction in the target application program by analyzing the binary data of the target application program; and
extracting the global variable and the absolute jump instruction in the target application program according to the located absolute addresses.

### Claim 5 (depends on 1)

The method of claim 1, characterized in that, after the step of redirecting the SWI instruction to the instruction of calling the current operating system, the method further comprises:
receiving a request of calling an API function initiated by the target application program; and
calling a corresponding API function in the current operating system in response to the request according to the redirected SWI instruction.

### Claim 6

A device of running an application program across systems, the device comprising:
a loading module configured to load a target application program;
an application module configured to apply for a memory space on a current operating system for the target application program;
a modification module configured to modify an address of a global variable and an address of an absolute jump instruction in the target application program according to an address of the applied memory space to adapt to the memory space of the current operating system;
an instruction obtainment module configured to obtain a SWI instruction of the target application program; and
a redirection module configured to redirect the SWI instruction to an instruction of calling the current operating system.

### Claim 7 (depends on 6)

The device of claim 6, characterized in that, the device further comprises a translation module configured to translate instructions in the target application program in a manner of binary translation.

### Claim 8 (depends on 6)

The device of claim 6, characterized in that, the device further comprises:
a data obtainment module configured to obtain binary data of the target application program; and
an analysis module configured to find the global variable and the absolute jump instruction in the target application program by analyzing the binary data.

### Claim 9 (depends on 8)

The device of claim 8, characterized in that, the analysis module comprises:
a location module configured to locate absolute addresses corresponding to the global variable and the absolute jump instruction in the target application program by analyzing the binary data of the target application program; and
an extraction module configured to extract the global variable and the absolute jump instruction in the target application program according to the located absolute addresses.

### Claim 10 (depends on 6)

The device of claim 6, characterized in that, the device further comprises:
a reception module configured to receive a request of calling an API function initiated by the target application program; and
a call module configured to call a corresponding API function in the current operating system in response to the request according to the redirected SWI instruction.
