DE3632139A1 - Method of executing two programs which are written in different programming languages - Google Patents

Method of executing two programs which are written in different programming languages

Info

Publication number
DE3632139A1
DE3632139A1 DE19863632139 DE3632139A DE3632139A1 DE 3632139 A1 DE3632139 A1 DE 3632139A1 DE 19863632139 DE19863632139 DE 19863632139 DE 3632139 A DE3632139 A DE 3632139A DE 3632139 A1 DE3632139 A1 DE 3632139A1
Authority
DE
Germany
Prior art keywords
program
language
memory
programming language
loaded
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
DE19863632139
Other languages
German (de)
Inventor
Alexander Dipl Ing Repenning
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BBC Brown Boveri AG Switzerland
Original Assignee
BBC Brown Boveri AG Switzerland
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BBC Brown Boveri AG Switzerland filed Critical BBC Brown Boveri AG Switzerland
Priority to DE19863632139 priority Critical patent/DE3632139A1/en
Publication of DE3632139A1 publication Critical patent/DE3632139A1/en
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Abstract

The method according to the invention is specially intended for a computer with a memory (M) and a processor (CPU), which has registers (R1 - R4), and which runs under an operating system (OS) in which no unified linker for programs (Pr1, Pr2) which are written in different programming languages is available. The operating system (OS) must have a so-called interrupt vector table (IVT), with at least one freely available table position (0002). At least one of the programming languages must have a first language construct (INT2), with which it is possible to implement system calls by reference to the interrupt vector table (IVT) of the operating system (OS). Finally, the other programming language must have a second language construct, with which it is possible to determine the address (1001) of programs (Pr2) in this language, when they are loaded in the memory. According to the invention, the program (Pr2) which is written in the programming language which has the second language construct is loaded to be resident in the memory (M) before the program (Pr1) in the other programming language is executed. Using the second language construct, the address (1001) in the memory (M) of the program (Pr2) which is loaded to be resident is determined, and is entered into a freely available table position, of which there must be at least one, of the interrupt vector table (IVT). The program (Pr2) which is loaded to be resident in the memory (M) is ... Original abstract incomplete. <IMAGE>

Description

Technisches GebietTechnical field

Die vorliegende Erfindung betrifft ein Verfahren zur Aus­ führung von zwei in verschiedenen Programmiersprachen geschriebenen Programmen. Sie betrifft insbesondere ein solches Verfahren auf einem Rechner mit einem Speicher und einem Prozessor mit Registern, der unter einem Betriebs­ system läuft, in dem kein einheitlicher Linker für die genannten Programmiersprachen existiert. Das Betriebs­ system muß über eine sogenannte Interrupt-Vektor-Tabelle mit mindestens einem frei verfügbaren Tabellenplatz ver­ fügen. Mindestens eine der Programmiersprachen muß ein erstes Sprachkonstrukt aufweisen, mit dem es möglich ist, Systemaufrufe mit Bezug auf die Interrupt-Vektor-Tabelle des Betriebssystems zu realisieren. Schließlich muß die andere Programmiersprache noch über ein zweites Sprach­ konstrukt verfügen, mit dem es möglich ist, die Adresse von Programmen dieser Sprache festzustellen, wenn sie im Speicher geladen sind. The present invention relates to a method for leadership of two in different programming languages written programs. It particularly affects one such procedure on a computer with a memory and a processor with registers operating under one system runs in which no uniform linker for the mentioned programming languages exists. The operating system must have a so-called interrupt vector table with at least one freely available table position put. At least one of the programming languages must be one have the first language construct with which it is possible System calls related to the interrupt vector table of the operating system. Finally, must the other programming language via a second language construct with which it is possible to provide the address of programs of that language, if they are loaded in memory.  

Stand der TechnikState of the art

Bei großen, leistungsfähigen Rechnern, wie sie heute vornehmlich in Rechenzentren als Zentralrechner eingesetzt werden und die unter aufwendigen Betriebssystemen laufen, ist es meist möglich, Programme, die in verschiedenen Programmiersprachen geschrieben sind, gemeinsam auszufüh­ ren. Die gemeinsame Ausführung kann beispielsweise darin bestehen, daß eines der Programme von einem anderen Programm, das in einer anderen Programmiersprache geschrieben ist, aufgerufen wird. Die gemeinsame Ausführung der Programme setzt jedoch voraus, daß sie vor ihrer Ausführung zu einem gemeinsamen Programm zusammengebunden (gelinkt) werden. Entsprechende "Linker" exustieren in der Regel in den genannten aufwendigen Betriebssystemen.For large, high-performance computers like the ones today mainly used in data centers as a central computer and that run on complex operating systems, it is usually possible to run programs in different Programming languages are written to run together Ren. The joint execution can, for example, in it exist that one of the programs from another program, written in another programming language is called. The joint execution of the programs however, assumes that it closes before it is executed tied together in a common program (linked) will. Corresponding "linkers" usually exist in the complex operating systems mentioned.

In einfacheren Betriebssystemen, wie sie im Zusammenhang mit Personalcomputern heute überwiegend verwendet werden, sind einheitliche Linker für unterschiedliche Programmier­ sprachen zwar vorgesehen, aber sie werden von vielen Pro­ grammiersprachen nicht unterstützt. Ein Beispiel für ein weit verbreitetes Betriebssystem ist beispielsweise das MS-DOS-System der Firma Microsoft. Es ist in diesem Betriebs­ system nicht vorgesehen, mehrere voneinander völlig unab­ hängige Programme (Applikationen), auch wenn sie in der gleichen Programmsprache geschrieben sein sollten, gleichzeitig zu laden. Das Realisieren eines Projekts unter Ausnutzung der Vorteile unterschiedlicher Programmier­ sprachen ist also auf Personalcomputern, die unter einem Betriebssystem der genannten Art laufen, meist nicht mög­ lich. Die Möglichkeit der Kombination von Programmen unter­ schiedlicher Programmiersprachen wäre allerdings für viele Probleme von großem Vorteil. So lassen sich beispielsweise Probleme in einer Programmiersprache, die von ihrer Kon­ zeption auf grade dieser Probleme zugeschnitten ist, sehr einfach und elegant lösen. Andere Probleme, für die diese Sprache weniger geeignet ist, könnten dagegen große Schwie­ rigkeiten bereiten. Als typisches Beispiel für die er­ läuterte Problematik können die Programmiersprachen LISP und Modula-2 genannt werden. LISP ist eine sogenannte AI-Sprache, die für Probleme der künstlichen Intelligenz (artificial intelligence) speziell geeignet ist. Eine Beschreibung von LISP findet sich beispielsweise in Steele G. L. "Common Lisp, The Language", Digital Press, 1984. Modula-2 ist dagegen eine Systemprogrammiersprache und ist beispielsweise beschrieben in N. Wirth, "Programming in Modula-2", 3rd edition, Springer-Verlag, Berlin, Heidel­ berg, New York, Tokio, 1985.In simpler operating systems as related are mostly used with personal computers today, are uniform linkers for different programming languages provided, but they are used by many pros programming languages not supported. An example of a widespread operating system is for example MS-DOS system from Microsoft. It is in this operating system not provided, several completely independent of each other pending programs (applications), even if they are in the should be written in the same program language, to load at the same time. Realizing a project taking advantage of different programming So languages is on personal computers that are under one Operating system of the type mentioned, mostly not possible Lich. The possibility of combining programs under different programming languages would be for many Problems of great advantage. For example, Problems in a programming language that depend on their con zeption is tailored to these problems, very much solve easily and elegantly. Other problems for this  Language is less suitable, however, could be very difficult prepare. As a typical example of the he The programming languages LISP and Modula-2. LISP is a so-called AI language used for artificial intelligence problems (artificial intelligence) is particularly suitable. A A description of LISP can be found, for example, in Steele G. L. "Common Lisp, The Language", Digital Press, 1984. In contrast, Modula-2 is a system programming language and is described, for example, in N. Wirth, "Programming in Modula-2 ", 3rd edition, Springer-Verlag, Berlin, Heidel Berg, New York, Tokyo, 1985.

Darstellung der ErfindungPresentation of the invention

Es ist Aufgabe der vorliegenden Erfindung, ein Verfahren der eingangs genannten Art anzugeben.It is an object of the present invention to provide a method of the type mentioned at the beginning.

Diese, sowie weitere Aufgaben der Erfindung werden gelöst durch die Angabe eines neuen Verfahrens, wie es in den Patentansprüchen gekennzeichnet ist.These and other objects of the invention are achieved by specifying a new procedure as described in the Is characterized.

Durch das erfindungsgemäße Verfahren können Programme unterschiedlicher Programmiersprachen auf kleinen Perso­ nencomputern gemeinsam zur Ausführung gebracht werden, auch wenn für die benutzten Programmiersprachen innerhalb des Betriebssystems kein gemeinsamer Linker existiert. Durch das erfindungsgemäße Verfahren ist ein solcher Linker darüber hinaus überflüssig.Programs can be created using the method according to the invention different programming languages in small person computer are executed together, even if for the programming languages used within no common linker exists in the operating system. The inventive method is one Linker also superfluous.

Besondere Ausgestaltungen der Erfindung zeigen Wege auf, wie zwischen den beiden Programmen unterschiedlicher Pro­ grammiersprache in einfacher und effektiver Weise skalare Parametertypen (z. B. 16 Bit-Größen) und auch Referenzen (Pointer) zu beliebig großen Datenstrukturen übergehen werden können. Die Übergabe dieser Parameter ist nach der Erfindung sehr allgemein. Special embodiments of the invention show ways like different pro between the two programs programming language in a simple and effective way scalar Parameter types (e.g. 16 bit sizes) and also references (Pointer) to data structures of any size can be. The transfer of these parameters is after the invention very generally.  

Das erfindungsgemäße Verfahren funktioniert auch dann, wenn es sich bei einer der Programmiersprachen um eine inter­ pretierte Sprache handelt (z. B. LISP, Prolog). Interpretierte Sprachen lassen sich im allgemeinen nicht linken, da durch den Interpreter kein linkbarer Objektcode erzeugt wird.The method according to the invention also works if one of the programming languages is an inter pretended language (e.g. LISP, prologue). Interpreted Languages cannot be linked in general because of that no linkable object code is generated for the interpreter.

Kurze Beschreibung der ZeichnungenBrief description of the drawings

Weitere Vorteile der Erfindung sowie ein besseres Verständ­ nis derselben ergeben sich aus der nachfolgenden ausführ­ licheren Beschreibung insbesondere unter Berücksichtigung der Zeichnung. Die Zeichnung zeigt in schema­ tischer Darstellung einen Rechner mit einem Prozessor mit Registern, einem Speicher und einem I/O-Gerät. Im Speicher sind neben dem Betriebssystem zwei Programme unterschiedlicher Programmiersprache geladen.Further advantages of the invention and a better understanding The same result from the following explanation more detailed description taking into account the drawing. The drawing shows in schematic table representation of a computer with a processor with registers, a memory and an I / O device. in the Besides the operating system, memory is two programs different programming language loaded.

Wege zur Ausführung der ErfindungWays of Carrying Out the Invention

Es wird nunmehr auf die Zeichnung Bezug genommen. In dieser ist ein Rechner oder zumindest ein Teil eines solchen mit einem Bus B dargestellt. An den Bus sind ein Prozessor CPU, in I/O-Gerät I/O und ein Speicher M angeschlossen. Der Prozessor CPU weist vier Register R 1-R 4 auf. Diese sollen sogenannte "General-Purpose-Register" sein, d. h. dem Benutzer des Rechners zur allgemeinen und freien Verfü­ gung stehen. Der Speicher M soll ein RAM-Speicher sein.Reference is now made to the drawing. A computer or at least a part of such with a bus B is shown in this. A processor CPU , in I / O device I / O and a memory M are connected to the bus. The processor CPU has four registers R 1 - R 4 . These are supposed to be so-called "general-purpose registers", ie are available to the user of the computer for general and free use. The memory M should be a RAM memory.

Im Speicher M sei beispielsweise ein Betriebssystem OS resident geladen und zwar im Speicherbereich zwischen den Adressen 0001 und 1000 (diese Adressen, wie auch alle nachstehend noch verwendeten, sind rein willkürlich gewählt). Im untersten Adreßbereich, zwischen den Adressen 0001 und 0100, soll das Betriebssystem OS eine sogenannte Inter­ rupt-Vektor-Tabelle IVT aufweisen mit mehreren, einzelnen Speicherzellen zugeordneten Tabellenplätzen. Unter den Adressen 0001-0003 sind drei solcher Tabellenplätze einzeln dargestellt. Sie sollen aus einem im Speicher M geladenen Programm jeweils mittels eines Systemaufrufs oder sogenannten Soft-Interrupts frei adressierbar sein. Der gesamte zum Betriebssystem OS einschließlich seiner Interrupt-Vektor-Tabelle gehörende Speicherbereich ist in der Zeichnung strichpunktiert schraffiert.In the memory M , for example, an operating system OS is loaded residently, namely in the memory area between the addresses 0001 and 1000 (these addresses, like all those still used below, are chosen purely arbitrarily). In the lowest address area, between the addresses 0001 and 0100, the operating system OS should have a so-called interrupt vector table IVT with several table spaces assigned to individual memory cells. Three such table spaces are shown individually at addresses 0001-0003. They should be freely addressable from a program loaded in the memory M by means of a system call or so-called soft interrupts. The entire memory area belonging to the operating system OS, including its interrupt vector table, is hatched in dash-dot lines in the drawing.

Im folgenden werden zwei Programme Pr 1 und Pr 2 betrach­ tet, die in dem beschriebenen Rechner gemeinsam zur Ausfüh­ rung gebracht werden sollen. Das Programm Pr 1 sei in einer ersten, das Programm Pr 2 in einer zweiten Programmier­ sprache geschrieben. Das Programm Pr 2 soll vom Programm Pr 1 aus aufgerufen werden.In the following, two programs Pr 1 and Pr 2 are considered, which are to be implemented together in the computer described. The program Pr 1 was written in a first, the program Pr 2 in a second programming language. Program Pr 2 is to be called from program Pr 1 .

Vorausgesetzt wird, daß im Betriebssystem OS kein einheit­ licher Linker existiert, mit dem die beiden Programme Pr 1 und Pr 2 zu einem einheitlichen Programm zusammenge­ linkt werden könnten. Es wird weiter davon ausgegangen, daß es unter dem Betriebssystem OS auch nicht möglich ist, gleichzeitig zwei voneinander unabhängige, nicht zusammengelinkte Programme in den Speicher M zu laden und gleichzeitig zur Ausführung zu bringen.It is assumed that there is no uniform linker in the operating system OS with which the two programs Pr 1 and Pr 2 can be linked together to form a uniform program. It is further assumed that it is also not possible under the OS operating system to simultaneously load two independent, non-linked programs into the memory M and to execute them at the same time.

Um dies dennoch zu ermöglichen wird gemäß der Erfindung zunächst eines der beiden Programme resident in den Speicher M geladen. Im gewählten Beispiel sei dies das Programm Pr 2. Das Laden kann von einem in der Zeichnung nicht dar­ gestellten externen Speichermedium über das I/O-Gerät I/O und unter dessen Kontrolle erfolgen.In order to make this possible, one of the two programs is first loaded into the memory M according to the invention. In the selected example, this is the Pr 2 program. The loading can take place from an external storage medium, not shown in the drawing, via the I / O device I / O and under its control.

Unter dem vorstehend verwendeten Begriff "resident laden" ist zu verstehen, daß das Programm Pr 2 in gleicher Weise wie das Betriebssystem OS fest in den Speicher M geladen wird und nicht nur für die Zeit seiner Bearbeitung. Zu­ sätzlich wird das Programm Pr 2 in der Art und Weise geschützt, daß es durch ein nachfolgendes Laden anderer Programme nicht überschrieben wird. Das Programm Pr 2 ist vorzugsweise ein Modul eines Programms mit mehreren Modulen wobei ein anderes Modul die erforderlichen Instruktionen für das "residente Laden und Sichern" enthält. Das genannte Modul bildet vorzugsweise ein sogenanntes Software-Werkzeug und ist in der gleichen Programmiersprache wie das Programm Pr 2 geschrieben. Dieses Modul muß darüber hinaus eine Instruktion enthalten, mit der es möglich ist, die An­ fangsadresse des Programms Pr 2 nach seinem Laden in den Speicher M zu ermitteln. Die mit dieser Instruktion er­ mittelte Adresse wird in einen freien Tabellenplatz der Interrupt-Vektor-Tabelle IVT des Betriebssystem OS geladen.The term "resident loading" used above means that the program Pr 2 is loaded into the memory M in the same way as the operating system OS and not only for the time of its processing. In addition, the program Pr 2 is protected in such a way that it is not overwritten by subsequent loading of other programs. The program Pr 2 is preferably a module of a program with several modules, with another module containing the necessary instructions for "resident loading and saving". Said module preferably forms a so-called software tool and is written in the same programming language as the Pr 2 program. This module must also contain an instruction with which it is possible to determine the starting address of the program Pr 2 after it has been loaded into the memory M. The address determined with this instruction is loaded into a free table space in the interrupt vector table IVT of the operating system OS .

In der Zeichnung soll das Programm Pr 2 im Speicher M zwi­ schen den Adressen 1001 und 2000 in der beschriebenen Weise resident, d. h. gegen Überschreiben durch nachfolgendes Laden gesichert abgespeichert sein. Der entsprechende Speicherbereich ist durch eine nach rechts geneigte Schraf­ fur gekennzeichnet. In dem Tabellenplatz mit der Adresse 0002 der Interrupt-Vektor-Tabelle ist die erwähnte An­ fangsadresse 1001 des Programms Pr 2 eingetragen.In the drawing, the program Pr 2 is to be resident in the memory M between the addresses 1001 and 2000 in the manner described, ie secured against being overwritten by subsequent loading. The corresponding memory area is indicated by a hat for. In the table space with the address 0002 of the interrupt vector table, the aforementioned starting address 1001 of the program Pr 2 is entered.

Nach dem resistenten Laden des Programms Pr 2 und dem Eintrag seiner Anfangsadresse 1001 in die Interrupt-Vektor-Tabelle IVT wird wieder zur Kommandoebene des Betriebssystems (wie vor dem Laden) zurückgekehrt.After the resistant loading of the program Pr 2 and the entry of its start address 1001 in the interrupt vector table IVT , the command level of the operating system is returned (as before loading).

Es kann nunmehr mit dem normalen, für das Betriebssystem OS charakteristischen Befehl das Programm Pr 1 zur Aus­ führung gebracht werden. Es wird nach Eingabe des Befehls zunächst in üblicher Weise, beispielsweise wie zuvor das Programm Pr 2 von einem externen Speichermedium über das I/O-Gerät in den Speicher M geladen. In der Zeichnung soll das Programm Pr 1 im Speicher M im Speicherbereich zwischen den Adressen 2499 und 4000 gespeichert sein. Der entsprechende Speicherbereich ist durch eine nach links geneigte Schraffur hervorgehoben. The program Pr 1 can now be executed with the normal command characteristic of the operating system OS . It is after input of the command, first in a conventional manner, for example, as before, the program Pr 2 O-device loaded from an external storage medium via the I / M in the memory. In the drawing, the program Pr 1 is to be stored in the memory M in the memory area between the addresses 2499 and 4000. The corresponding memory area is highlighted by hatching to the left.

Nach dem Laden wird das Programm Pr 1 in üblicher Weise, beginnend mit seiner Startadresse 2499, ausgeführt. Im Verlaufe der Ausführung des Programms Pr 1 wird irgendwann auch die Adresse 3000 erreicht. An dieser Stelle des Pro­ gramms Pr 1 soll die Ausführung des Programms Pr 2 erfor­ derlich sein. Anstatt des für die Programmiersprache, in der das Programm Pr 1 geschrieben ist, üblichen Programm­ aufrufs (oder auch Unterprogrammaufrufs), mit der das in einer anderen Programmiersprache geschriebene Programm Pr 2 nicht aufrufbar ist, enthält die Adresse 3000 gemäß der Erfindung einen Systemaufruf mit Bezug auf die Adresse 0002 der Interrupt-Vektor-Tabelle IVT des Betriebssystems OS. In diesem Tabellenplatz befindet sich aber, wie vor­ stehend erläutert die Anfangsadresse 1001 des Programms Pr 2. Beginnend mit dieser Adresse kann das Programm Pr 2 anschließend ausgeführt werden. Nach Beendigung der Aus­ führung des Programms Pr 2 wird die Ausführung des Programms Pr 1 mit dem in der Adresse 3001 enthaltenen Befehl fort­ gesetzt.After loading, the program Pr 1 is executed in the usual way, starting with its start address 2499. In the course of executing program Pr 1 , address 3000 is also reached at some point. At this point of the program Pr 1 the execution of the program Pr 2 should be necessary. Instead of the usual program call (or also subroutine call) for the programming language in which the program Pr 1 is written, with which the program Pr 2 written in another programming language cannot be called, the address 3000 according to the invention contains a system call with reference to the address 0002 of the interrupt vector table IVT of the operating system OS . However, as explained above, this table position contains the start address 1001 of the program Pr 2 . The program Pr 2 can then be executed starting with this address. After completion of the execution of the program Pr 2 , the execution of the program Pr 1 is continued with the command contained in the address 3001.

Normalerweise ist es üblich, daß zwischen einem rufenden und dem aufgerufenen Programm Parameter ausgetauscht werden. Um dies auch im vorliegenden Fall für zwei Programme, die in verschiedenen Programmiersprachen geschrieben sind, zu ermöglichen, werden Variable, deren Werte als Para­ meter übergeben werden sollen, vor dem Aufruf an Register des Prozessors gebunden. Die Register werden mit dem Wert der betreffenden Variablen geladen. Nach dem Aufruf kann das aufgerufene Programm die Inhalte der Register lesen und diese Inhalte eigenen Variablen zuweisen. Die Über­ gabe von Parametern vom aufgerufenen Programm an das rufende Programm kann auf die gleiche Art und Weise erfolgen.Usually it is common for a caller to be between and the called program parameters are exchanged. In order to do this for two programs, written in different programming languages to allow variables whose values as Para meters should be passed before calling registers processor bound. The registers are with the value of the relevant variable loaded. After the call can the called program read the contents of the registers and assign this content to its own variables. The About Passing parameters from the called program to the calling one Program can be done in the same way.

In der Zeichnung ist der Prozessor CPU mit vier Registern R 1-R 4 ausgestattet, die für den gewünschten Zweck der Parameterübergabe verwendbar sind. Um in der Parameter­ übergabe nicht durch die im allgemeinen nicht sehr große Anzahl von verfügbaren Registern in den Prozessoren be­ schränkt zu sein, können anstatt der Werte der zu über­ gebenden Parameter auch Zeiger auf Datenstrukturen (Adressen der Datenstrukturen) in die Register geladen werden. Dadurch ist es grundsätzlich möglich, beliebig große Datenmengen zwischen den Programmen zu übergeben.In the drawing, the processor CPU is equipped with four registers R 1 -R 4 , which can be used for the desired purpose of parameter transfer. In order not to be limited in the parameter transfer by the generally not very large number of available registers in the processors, instead of the values of the parameters to be transferred, pointers to data structures (addresses of the data structures) can also be loaded into the registers. This makes it possible in principle to transfer any amount of data between the programs.

In der Zeichnung ist im Speicher M ein bisher noch nicht angesprochener Speicherbereich RM oberhalb des resident geladenen Programms Pr 2 dargestellt. Bei diesem soll es sich um ein beim Laden des Programms Pr 2 ebenfalls resident reservierten Speicherbereich handeln, den das Programm Pr 2 zur Ausführung benötigt, beispielsweise für ein Stack, Heap und für globale Daten.In the drawing, a memory area RM, which has not yet been addressed, is shown in the memory M above the residently loaded program Pr 2 . This is to be a memory area which is also residently reserved when the program Pr 2 is loaded and which the program Pr 2 needs for execution, for example for a stack, heap and for global data.

Die globalen Daten beschreiben den Zustand, in welchem sich das Programm Pr 2 befindet, der Stack wird zur Para­ meterübergabe innerhalb der unterschiedlichen Prozeduren des Programms Pr 2 benötigt und auf dem Heap befinden sich dynamisch allocierte Daten.The global data describe the state in which the program Pr 2 is located, the stack is required for parameter transfer within the different procedures of the program Pr 2 and there are dynamically allocated data on the heap.

Claims (6)

1. Verfahren zur Ausführung von zwei in verschiedenen Programmiersprachen geschriebenen Programmen (Pr 1, Pr 2) auf einen Rechner mit einem Speicher (M) und einem Prozessor (CPU) mit Registern (R 1-R 4) der unter einem Betriebssystem (OS) läuft, in dem kein einheitlicher Linker für die genannten Programiersprachen existiert,
  • - wobei das Betriebssystem über eine sogenannte Inter­ rupt-Vektor-Tabelle (IVT) mit mindestens einem frei verfügbaren und adressierbaren Tabellenplatz (0001- 0100) verfügt,
  • - wobei mindestens die eine der Programmiersprachen (Pr 1) ein erstes Sprachkonstrukt (INT 2) aufweist, mit dem es möglich ist, Systemaufrufe mit Bezug auf die Interrupt-Vektor-Tabelle (IVT) zu realisieren und
  • - wobei die andere Programmiersprache (Pr 2) über ein zweites Sprachkonstrukt verfügt, mit dem es möglich ist, die Adresse (1001) von Programmen dieser Sprache festzustellen, wenn sie im Speicher (M) geladen sind,
1. Method for executing two programs (Pr 1 , Pr 2 ) written in different programming languages on a computer with a memory (M) and a processor (CPU) with registers (R 1 - R 4 ) running under an operating system (OS) runs in which there is no uniform linker for the programming languages mentioned,
  • - The operating system has a so-called interrupt vector table (IVT) with at least one freely available and addressable table space (0001-0100),
  • - Wherein at least one of the programming languages (Pr 1 ) has a first language construct (INT 2 ) with which it is possible to implement system calls with reference to the interrupt vector table (IVT) and
  • the other programming language (Pr 2 ) has a second language construct with which it is possible to determine the address (1001) of programs of this language when they are loaded in the memory (M) ,
dadurch gekennzeichnet,characterized,
  • - daß vor der Ausführung eines Programms der einen Programmiersprache (Pr 1) das Programm der anderen Programmiersprache (Pr 2) resident in den Speicher (M) geladen wird,that before the execution of a program of one programming language (Pr 1 ) the program of the other programming language (Pr 2 ) is residently loaded into the memory (M) ,
  • - daß mittels des zweiten Sprachkonstrukts die Adresse (1001) des resident geladenen Programms (Pr 2) im Speicher (M) ermittelt wird,that the address (1001) of the residently loaded program (Pr 2 ) in the memory (M) is determined by means of the second language construct,
  • - daß diese Adresse (1001) in den mindestens einen frei verfügbaren Tabellenplatz (0002) der Interrupt- Vektor-Tabelle (IVT) eingetragen wird, und- That this address (1001) in the at least one freely available table space (0002) of the interrupt vector table (IVT) is entered, and
  • - daß das resident im Speicher geladene Programm (Pr 2) der anderen Programmiersprache von dem Programm (Pr 1) der einen Programmiersprache bei deren normaler Aus­ führung über das erste Sprachkonstrukt (INT 2) mit Bezug auf die Adresse (0002) des genannten Tabellen­ platzes der Interrupt-Vektor-Tabelle (IVT) aufgerufen wird.- That the resident in the loaded program (Pr 2 ) of the other programming language from the program (Pr 1 ) of the one programming language in its normal execution from the first language construct (INT 2 ) with reference to the address (0002) of said table space the interrupt vector table (IVT) is called.
2. Verfahren nach Anspruch 1, dadurch gekennzeichnet, daß Register (R 1-R 4) des Prozessors (CPU) der Para­ meterübergabe zwischen den beiden Programmen (Pr 1, Pr 2) verwendet werden.2. The method according to claim 1, characterized in that registers (R 1 - R 4 ) of the processor (CPU) of the parameter transfer between the two programs (Pr 1 , Pr 2 ) are used. 3. Verfahren nach Anspruch 2, dadurch gekennzeichnet, daß vor dem Aufruf des Programms (Pr 2) der anderen Programmiersprache die als Parameter zu verwendenden Variablen des aufrufenden Programms (Pr 1) der einen Programmiersprache an die genannten Register (R 1-R 4) gebunden werden, daß die Registerinhalte nach dem Aufruf in Variable des aufgerufenen Programms (Pr 2) der anderen Programmiersprache transferiert werden und daß vor einer Rückkehr zum aufrufenden Programm (Pr 1) die zuletzt genannten Variablen an die genannten Register (R 1-R 4) gebunden werden.3. The method according to claim 2, characterized in that before calling the program (Pr 2 ) of the other programming language, the variables to be used as parameters of the calling program (Pr 1 ) of the one programming language to the said registers (R 1 - R 4 ) that the register contents are transferred to the variable of the called program (Pr 2 ) of the other programming language after the call and that before returning to the calling program (Pr 1 ) the last-mentioned variables are transferred to the mentioned registers (R 1 - R 4 ) be bound. 4. Verfahren nach Anspruch 2, dadurch gekennzeichnet, daß zur Übergabe größerer Datenstrukturen mindestens ein Paar der genannten Register (R 1-R 4) mit einem Zeiger auf eine zu übergebende Datenstruktur, d. h. mit der Anfangsadresse dieser Datenstruktur geladen wird.4. The method according to claim 2, characterized in that for the transfer of larger data structures at least one pair of said registers (R 1 - R 4 ) is loaded with a pointer to a data structure to be transferred, ie with the start address of this data structure. 5. Verfahren nach Anspruch 1, dadurch gekennzeichnet, daß bei der residenten Ladung des Programms (Pr 2) der anderen Programmiersprache in den Speicher (M) in diesem gleichzeitig Speicherplatz (RM) resident reserviert wird, der zur Ausführung des resident gela­ denen Programms (Pr 2) der anderen Programmiersprache erforderlich ist.5. The method according to claim 1, characterized in that with the resident loading of the program (Pr 2 ) of the other programming language in the memory (M) in this memory space (RM) is reserved at the same time, which is used to execute the resident program ( Pr 2 ) the other programming language is required.
DE19863632139 1986-09-22 1986-09-22 Method of executing two programs which are written in different programming languages Ceased DE3632139A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
DE19863632139 DE3632139A1 (en) 1986-09-22 1986-09-22 Method of executing two programs which are written in different programming languages

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE19863632139 DE3632139A1 (en) 1986-09-22 1986-09-22 Method of executing two programs which are written in different programming languages

Publications (1)

Publication Number Publication Date
DE3632139A1 true DE3632139A1 (en) 1988-04-07

Family

ID=6310065

Family Applications (1)

Application Number Title Priority Date Filing Date
DE19863632139 Ceased DE3632139A1 (en) 1986-09-22 1986-09-22 Method of executing two programs which are written in different programming languages

Country Status (1)

Country Link
DE (1) DE3632139A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014001801A1 (en) * 2012-06-27 2014-01-03 Nordic Semiconductor Asa Integrated-circuit radio
WO2015097426A1 (en) * 2013-12-23 2015-07-02 Nordic Semiconductor Asa Integrated-circuit radio
US10515024B2 (en) 2015-06-16 2019-12-24 Nordic Semiconductor Asa Event generating unit

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
US-B.: "Operting Systems" D. Tsichritzis, P. Bernstein Academic Press 1974, S. 69-74 *
US-B.: "Structured Computer Organization" A. Tanenbaum, Prentice Hall Inc. 1976, S. 328-338 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014001801A1 (en) * 2012-06-27 2014-01-03 Nordic Semiconductor Asa Integrated-circuit radio
US9317348B2 (en) 2012-06-27 2016-04-19 Nordic Semiconductor Asa Integrated-circuit radio
WO2015097426A1 (en) * 2013-12-23 2015-07-02 Nordic Semiconductor Asa Integrated-circuit radio
US10055367B2 (en) 2013-12-23 2018-08-21 Nordic Semiconductor Asa Integrated-circuit radio
US10515024B2 (en) 2015-06-16 2019-12-24 Nordic Semiconductor Asa Event generating unit

Similar Documents

Publication Publication Date Title
DE2423194C2 (en) Device for calculating an absolute main memory address in a data processing system
EP0764899B1 (en) Method for converting data formats
DE2364408A1 (en) SYSTEM FOR CREATING CIRCUIT ARRANGEMENTS FROM HIGHLY INTEGRATED CHIPS
DE1952158A1 (en) Storage protection procedure and facility for carrying out this procedure
DE2556661A1 (en) CONTROL CIRCUIT WITH ADDRESS EXTENSION
DE3210816A1 (en) DATA PROCESSING SYSTEM WITH SEPARATE DEVICES FOR PROCESSING SCALAR AND VECTOR DATA
DE2758830A1 (en) COMPUTING DEVICE
DE2101949A1 (en) Method for protecting data groups in a multiprocessing data processing system
DE4220698A1 (en) SYSTEM FOR THE DYNAMIC LINKING OF MODULAR SECTIONS OF COMPUTER SOFTWARE
DE10329680A1 (en) Processor architecture for exact pointer identification
DE2522343C3 (en) Arrangement for the control of process flows
EP0010263B1 (en) Method and circuit for memory-space extension of a central processing unit, especially of a microprocessor
DE3632139A1 (en) Method of executing two programs which are written in different programming languages
DE2723706A1 (en) DEVICE FOR ADDRESS COMPARISON
DE3025167C2 (en) Data processing device
DE2349590A1 (en) DATA PROCESSING DEVICE
AT354783B (en) PROGRAMMABLE CIRCUIT FOR DATA PROCESSING
DE1499286B2 (en) DATA PROCESSING SYSTEM
DE2331394B1 (en) DATA PROCESSING SYSTEM WITH VIRTUAL ADDRESSING
DE2442014A1 (en) METHOD AND DEVICE FOR ORGANIZING A CONTROL MEMORY
DE3016952C2 (en) Circuit arrangement for expanding the address range of a computer-controlled switching system
DE1549528A1 (en) Digital computer system
DE2150292A1 (en) Microprogram-controlled data processing system with superimposed execution and extraction of commands
DE2345098C3 (en) Control unit for a processor of a computer
DE2122659A1 (en)

Legal Events

Date Code Title Description
OP8 Request for examination as to paragraph 44 patent law
8131 Rejection