Method for modifying code sequences and related device

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S152000, C717S152000, C717S152000, C717S152000, C710S022000, C710S023000, C710S024000, C710S025000

Reexamination Certificate

active

06536034

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to a process for modifying code sequences and the associated device.
2. Description of Related Art
The present invention relates to computer programs, particularly those intended to be recorded on a medium in such a way that they cannot be modified, at least not easily. These media are integrated into a data processing system comprising, among other things, a central processing unit, a working memory, a nonvolatile memory and input/output means. More specifically, this data processing system can be incorporated into a chip card. In this case, the card contains a circuit comprising at least one microprocessor, a read-only memory containing a program and possibly data, a working memory and a programmable nonvolatile memory. Advantageously, the circuit is designed in monolithic form. The nonvolatile memory can store data and/or code; thus, the microprocessor can execute this code just in the same way as the code stored in read-only memory. Hence, there are two types of memory in one card; the content of the first memory is written when the circuit is manufactured and cannot be modified. The content of the second is initially blank, the values being written during the normal utilization of the object.
These days, chip cards can technically meet many needs. The program incorporated into the card, also called the “operating system,” makes it possible to adapt the functions of the card to its end use. Currently, the operating system is stored in a ROM that is etched during the production of the integrated circuit. The modification of the program in order to meet new requirements is a long operation that poses a huge problem when the client is pressed for time. Moreover, this operation is very costly; this discourages many “small” clients who wish to buy several thousand cards, and often they settle for a card that only partially meets their expectations. One solution is comprised of using an existing mask and adding the functions requested by the client into the programmable memory or of modifying the functions existing in ROM.
The capability to input and execute additional code in programmable memory offers the advantage of being easily able to add new functions to an old program or to adapt old functions to specific needs.
Application Ser. No. 08/981,607 filed Dec. 27, 1998, for “Method And Device Enabling A Fixed Program To Be Developed”, which is assigned to the assignee of the present invention describes a specific mechanism for branching a program during the execution of certain instructions. The preceding invention is comprised of establishing polling points and orientation points at certain locations in the ROM, using respective instructions. a polling point is indicated by a number and makes it possible to access a routine in the programmable memory if there is an existing code sequence corresponding to the address indicated by this number. If there is, a flag is set and the branch address is stored in RAM. An orientation point is active if a polling point has previously been executed. If it has, the branch is triggered by having in the normal program execute a jump to the programmed address. The code sequence to be executed can be in programmable memory or read-only memory.
However, this embodiment entails several problems if there are a number of modifications in the execution of the program that must be able to be handled. In this case, it is necessary to implement a large number of orientation points in the read-only memory. In the extreme, if high adaptability is desired, the program contains more code for executing branches than there is code constituting the main program. The multiplicity of these points is a major drawback if the size of the read-only memory is limited. Moreover, the execution time increases in proportion to the number of points. If the number of branch points is limited to adapt to constraints, the embodiment loses flexibility, since it does not make it possible to branch a program during the execution of any instruction whatsoever.
SUMMARY OF THE INVENTION
The object of the present invention is to provide a device that makes it possible to correct certain abnormalities in the execution of a fixed program, and thus makes it possible to correctly run, or easily add functionalities to, an existing program, while optimizing the code sequence to be written.
This object is achieved by the fact that the device for modifying code sequences written into a memory of a medium comprising a central processing unit capable of executing these code sequences, said memory containing a main program executable by the central processing unit, which also comprises a second programmable nonvolatile memory, possibly containing new executable code sequences, and a third working memory, is characterized in that a branch table TAB-DER contained in the second programmable memory contains at least one field containing reference data for a new code sequence, branching means allowing a deferred branch from the executed code sequence to the new code sequence written into one of the three memories and means in the new code sequence allowing the return to a point of the code sequence executed before the branch.
Another object of the present invention is to interrupt the normal running of a program prior to the execution of any instruction, even with a limited number of orientation points.
This object is achieved by the fact that the branching means comprise activatable orientation instructions (IORi) previously stored in the memory containing the code of the main program, each orientation instruction being associated with a reference i of the branch table TAB-DER written into programmable memory.
According to another characteristic, each orientation instruction (IORi) activated triggers the execution of a new code sequence comprising:
means for reading in the table TAB-DER of the programmable memory a time delay &Dgr;Ti corresponding to the reference of the orientation instruction, this time delay making it possible to defer the triggering of an interrupt that executes a jump to a new code sequence whose address (Adri) is indicated in the table, in association with the time delay,
means for storing the address (Adri) in a memory of the device, and
means for starting a timer of the device, for counting down the time required for the time delay of the jump.
Another object of the present invention is to make it possible to mask certain so-called sensitive operations performed by the central processing unit.
This object is achieved by the fact that the device for modifying code sequences comprises a second table TAB-SEC stored in the memory of the device and associating with each branch point (i) a time interval [&Dgr;Tmini; &Dgr;Tmaxi] associated with the time delay &Dgr;Ti prior to the execution of a new code sequence, and means for verifying that the time delay is authorized by the associated time interval supplied by this table.
According to another characteristic, the device for modifying code sequences comprises means that allow the time delay &Dgr;Ti to be shifted by the value of the time interval [&Dgr;Tmini; &Dgr;Tmaxi].
According o another characteristic, the device for modifying code sequences comprises means for triggering an error message when the time delay &Dgr;Ti is within the time interval.
According to another characteristic, the device for modifying code sequences comprises, following the end of the time delay (&Dgr;Ti) when the timer reaches the null value, means for triggering an interrupt, means for storing the current value of a program counter register PC in a stack, then means for branching the program to the address defined in the part of the ROM containing interrupt vectors, which supply the start address of the code sequence of the interrupt, means for verifying that the value Val_PC of the program counter register PC stored in the stack is not an address value of a sensitive sequence contained in a table TAB_SEC, and means for modifying the execution of

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Method for modifying code sequences and related device does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Method for modifying code sequences and related device, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method for modifying code sequences and related device will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3013252

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.