# US 4,189,773 A · On-line memory space allocation

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

- Number: US 4,189,773 A
- Document ID: US4189773A
- Status: Granted
- Kind: A
- Application number: 05/485,572
- Filed: 1974-07-03
- Granted: 1980-02-19
- Earliest claimed: 1974-07-03
- Assignees: General Electric Company
- Inventors: Michael F. O'Meara
- Web page: https://patentgrep.com/patent/US4189773A

## CPC

- G05B 19/056: {Programming the PLC}
- G05B 2219/13153: Modification, change of program in real time
- G05B 2219/15065: Optimize program memory space
- G05B 2219/36078: Insert, read in new command instruction to modify fixed program
- G05B: CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS (systems for controlling or regulating non-electric variables G05D; systems for regulating electric or magnetic variables G05F; control devices or systems insofar as characterised by mechanical features only G05G)

## Abstract

A programmable data processor or controller serving as the main control in a control system contains an executive program for controlling the transfer of information between the processor and system equipment, updating that information during on-line control of the equipment and modifying the executive program to change operating parameters of the system while the data processor is controlling the system equipment. Modification of the executive program and displaying of system parameters relative to the executive program and the system equipment is accomplished through the use of an operator's console which communicates with the data processor and system equipment as a result of operator intervention.

## Claims

### Claim 1

In an on-line data processing system for controlling equipment, a method, by means of an improved executive program, of changing at least a segment of an on-line application program and of optimizing memory space utilization by assuring contiguous positions of identifiable program segments comprised of instructions located in the memory after modification of a segment size while without interruption continuing the control of the equipment in accordance with the instructions in the modified segment comprising the steps:
(A) providing in the memory at least first, second and third portions,
(1) said first portion retaining said improved executive program governing the operation of the data processing system,
(2) said second portion having located therein a repetitively executable application program comprised of a plurality of individually identifiable segments disposed contiguously to one another, the instructions thereof being representative of logical states for controlling the equipment, and
(3) said third portion serving as a temporary store for a desired replacement segment which is to replace a segment in said second portion;
(B) inserting, under control of the executive program, a first branch instruction in the first memory instruction location of the segment to be replaced and a second branch instruction after the last instruction location of the replacement segment so that the application program is still repetitively executable by using the replacement segment while that segment is still in the third portion;
(C) determining, under control of the executive program, the amount of memory space that the replacement segment will occupy in the second portion;
(D) moving, under control of the executive program, all the application program segments in the memory following the segment to be replaced in said second portion in dependence upon the space requirements determined for said replacement segment; and
(E) writing, under control of the executive program, said replacement segment into the second portion of the memory in the space created by the moving of all the segments.

### Claim 2 (depends on 1)

The invention in accordance with claim 1 wherein, when said replacement segment is larger than the segment to be replaced, all the application program segments following the segment to be replaced are moved prior to the writing of the replacement segment into the second portion of memory.

### Claim 3 (depends on 2)

The invention in accordance with claim 2 including the steps of writing instruction words indicating no operation into instruction location vacated by the moving of the following segments.

### Claim 4 (depends on 1)

The invention in accordance with claim 1 wherein, when said replacement segment is smaller than the segment to be replaced, the step of writing the replacement segment from the third to the second memory portion is performed prior to the step of moving of all the segments.

### Claim 5 (depends on 1)

The invention in accordance with claim 1 wherein a specified maximum number of instructions are moved for each execution of the application program in adjusting the segments in the second portion until the determined space has been provided for the replacement segment.

### Claim 6 (depends on 1)

The invention in accordance with claim 1 including the step of adjusting the end point of the application program while establishing a parameter defining an expansion area for the application program in said second portion.

### Claim 7 (depends on 1)

The invention in accordance with claim 1 wherein a plurality of replacement segments in said third portion replace a corresponding plurality of segments in said second portion and wherein the writing of a first segment and the step of adjusting are completed prior to the writing of a second segment.

### Claim 8

In an on-line data processing system for controlling equipment, a method, by means of an improved executive program, of changing at least a segment of an on-line application program and of optimizing memory space utilization by assuring contiguous positions of identifiable program segments comprised of instructions located in the memory after modification of a segment size while without interruption continuing the control of the equipment in accordance with the instructions in the modified segment comprising the steps:
(A) providing in the memory at least first, second and third portions,
(1) said first portion retaining said improved executive program governing the operation of the data processing system,
(2) said second portion having located therein a repetitively executable application program comprised of a plurality of individually identifiable segments disposed contiguously to one another, the instructions thereof being representative of logical states for controlling the equipment, and
(3) said third portion serving as a temporary store for a desired replacement segment which is to replace a segment in said second portion;
(B) writing, under control of the executive program, a segment to be modified from said second memory portion to said third memory portion;
(C) inserting, under control of the executive program, a first branch instruction in the first memory location of the segment to be replaced and a second branch instruction after the last word of the replacement segment so that the application program may still be run using the replacement segment while that segment is in the third portion;
(D) modifying, under control of the executive program, the copied segment located in said third memory portion;
(E) determining, under control of the executive program, the amount of space that the replacement segment will occupy in the second portion;
(F) adjusting, under control of the executive program, the application program segments in the memory immediately adjacent the segment to be replaced to provide adequate space in said second portion required by said replacement segment; and
(G) writing, under control of the executive program, said replacement segment into the provided space while removing the branch instruction from the first memory location of the segment to be replaced.

### Claim 9 (depends on 8)

The invention in accordance with claim 8 wherein, when said replacement segment is larger than the segment to be replaced, all the application program segments following the segment to be replaced are moved prior to the writing of the replacement segment into the second portion of memory.

### Claim 10 (depends on 9)

The invention in accordance with claim 9 wherein, under control of the executive program, instruction words indicating no operation are placed into spaces vacated by the adjustment of the following segment.

### Claim 11 (depends on 8)

The invention in accordance with claim 8 wherein, when said replacement segment is smaller than the segment to be replaced, the replacement segment is copied from the third to the second memory portion prior to adjustment of an immediately adjacent segment.
