PORTABLE DATA ENTRY DEVICE INCLUDING DYNAMIC PARTITIONING OF DATA MEMORY
Background and Field of the Invention
The present invention relates to the art of portable, handheld data entry devices, and more particularly to such a device capable of storing data in a number of partitions. Recently, portable data entry devices have come into wide acceptance in those businesses in which large amounts of data must be collected on a daily basis, and transmitted to a central data collection point. They are widely used, for example, in supermarkets and other retail business endeavors to collect stock order information or other inventory control data.
A portable data entry device of this type conventionally includes some form of bulk data storage, such as magnetic tape or solid state memory, into which data may be entered by means of a keyboard, scanning
"wand", or other input device. The data collected by the unit is transmitted directly from the device to a central collection point over ordinary telephone- lines.
In many cases, the business which use these portable handheld data entry devices are organized into a number of departments which must each maintain inventory levels independently of the others. Moreover, in certain applications a single handheld device may be used at several stores. It is therefore desirable that the data entry device include some means of segregating the information from each data collection locality so that it may be handled independently of the others. To this end, some of the portable data entry devices presently in use are controllable by the operator to define separate portions of memory, known as partitions, into which data may be selectively entered. Prior to beginning the data collection process, the operator will define the number and length of the partitions which he intends to use. Thereafter, during the actual data collection, the partition structure is fixed and may not be changed.
This type of system, however, does not make efficient use of the memory, in that a given partition may fill up more rapidly than the others. Since the partitions are fixed, the operator is unable to correct any initial miscalculation as to the required size of a partition.
Other factors also impact on the efficiency of memory usage. When a scanning wand is being used for data entry,
for example, some operators have developed the habit of scanning a bar code two or more times when two or more cases of the item are to be ordered. Although this expedites the entry of data into the unit, it also results in the inefficient use of memory, since a single item code is stored multiple times. Moreover, certain editing procedures also hinder efficient use of memory. Thus, in some editing techniques, an item is "deleted", not by eliminating the item from the data file, but by entering another item which will cancel the first item when the data is collated at the central collection point.
Summary of the Invention ϊt would be desirable to provide a system in which data memory was used more efficiently than had been the case in the past. It would more specifically be desirable to provide a portable data entry device including a partitioned data memory wherein the partition lengths were not fixed during the data collection process, but rather had data storage lengths which varied as required by the entry of data into the unit.
There is disclosed herein a portable, handheld data entry device which accomplishes the goal of providing efficient use of memory by dynamically allocating the size of the various partitions as needed. To this end, the
length of a given partition is fully flexible throughout the data collection process.
The data entered by the operator is recorded in the partition selected by him, with sequentially entered data for a given partition being stored within sequential locations in the memory. To enter data into a different partition, the operator will actuate the keyboard to request entry into that partition. The electronics within the portable, handheld data entry unit will then relocate the data within the memory such that all of the free memory space is adjacent the data previously entered into that partition. Because of this, all of the remaining available memory space is open to each partition when data is being entered in that partition. In the disclosed embodiment, the data entry unit includes a microprocessor which operates under program control. Whenever the operator requests the opening of a partition, the microprocessor executes a partition procedure. This procedure causes the relocation of all of the data which has already been entered in that partition, as well as the data contained at locations "below" (i.e., having memory addresses which are smaller than the memory addresses within the selected partition) as far down in memory as possible. All data which is "above" (i.e., stored in the memory at locations having higher addresses
than the addresses contained within the selected partition) are moved as far up in memory as possible. Through this operation, all of the free memory space is relocated immediately above the selected partition. The disclosed portable, handheld data entry device also includes a method of editing the variable length records stored within the memory without producing gaps in memory, or entering redundant records. Record deletion is accomplished by moving all of the data above the record to be deleted down by the length of that record. The record to be deleted is actually eliminated from data storage, and a correspondingly sized free memory space is tacked onto the end of the data. Insertions, on the other hand, are accomplished by first determining the character length of the data record to be inserted, parting the data by a corresponding number of character storage locations, and inserting the data record in the memory gap thus created.
Efficient use of memory is also achieved by eliminating redundant successive entries into the memory. Thus, each time the operator enters the same record into the memory (as by wand scanning an item label plural times) the record is stored memory only once, with an appropriate "quantity" character tacked onto the end thereof to identify the number of times which that record was. successively entered in memory.
Moreover, the various defined partitions in memory can be transmitted to an external device in any desired order. The operator will first enter a list of partitions into the device, with this list indicating the order in which the partitions are to be transmitted. The device will then transmit each listed partition one after another, in the order in which they are listed.
Brief Description of the Drawings The foregoing and other objects and advantages of the present invention will become more readily apparent from the following detailed description, as taken in conjunction with the accompanying drawings, wherein: Fig. 1 is an illustration of a portable, handheld data entry device of the type in which the present invention i s used ;
Fig. 2 is a general block diagram of the electronics carried within the portable data entry device of Fig. 1; Figs. 3A-3C are schematic representations of the data stored within memory, useful in understanding the operation of the dynamic partitioning method disclosed herein;
Fig. 4 is a more detailed representation of the manner in which the individual characters are stored within the memory;
Fig. 5 is a broad flow chart diagramming the sequence of operation of the portable, handheld data entry device;
Fig. 6 is a more detailed flow chart illustrating the manner in which the portable data entry device accomplishes the dynamic partitioning function;
Fig. 7 is a broad flow chart illustrating the sequence of operation of the portable data entry device in performing an insert operation;
Fig. 8 is a flow chart illustrating the sequence of operation of the portable data entry device in performing a delete operation; and,
Fig. 9 is a flow chart illustrating the sequence of operation of the portable data entry device in performing a "send" function.
Detailed Description
Fig. 1 broadly illustrates a portable, handheld data entry device of the type in which the present invention.
This portable data entry device 10 includes a housing 12 within which will be. located the electronics, including a solid state memory and a display device, and a. battery power source for maintaining operation of the device, independent of external power sources. This portable data entry device also includes a keyboard 14 for entering functional commands and data into the device. A display
window 16 permits the operator to view the display mounted within the housing 12. This display is controlled by the electronics to display not only the data stored in the memory, but also various prompting or operational messages. The portable device also includes one or more connectors 18 for permitting such external devices as a scanning wand or an acoustical coupler, to be interconnected with the unit. The scanning wand is used to facilitate the entry of data into the portable data entry device, while the acoustical coupler, on the other hand, is used to communicate the data stored within the memory to a central data collection point over conventional telephone lines.
Fig. 2 is a broad block diagram of the electronics carried within the portable data entry device 10 of Fig. 1. As can be seen in this figure, the system is controlled by a microprocessor (MPU) 20 which is interconnected with a solid state memory 22 and various other peripheral circuits by means of a system bus 24. The system bus 24 includes data, control, and address lines as required by the microprocessor 20.
The solid state memory 22 will preferably include both read only memory (ROM) and random access memory (RAM). Stored within the ROM is the control programs which control the operation of the microprocessor 20, as well a
various look-up tables containing, for example, prompting messages, etc. The RAM is used for storing the data collected by the unit, and also for various scratch pad purposes. The keyboard 14 is interfaced with the microprocessor 20 by means of a keyboard scanner 26, which scans the keys under microprocessor control and provides multibit codes to the microprocessor through the system bus 24, identifying the various keys as they are depressed by the operator. This data is supplied for operator viewing on a display 28, viewable through the display window 16 shown in Fig. 1. This display 28 is interfaced with the system bus 24 by means of a display control circuit 30, which may take any conventional form.
An input/output port 32 is interconnected between the connector 18 and the system bus 24, and provides a means by which data may be entered into or read out of the system, other than by the keyboard 14 and display 28. This input/output port may be adapted to interconnect such external devices as an acoustical coupler or scanning wand into the system bus.
As stated previously, it is preferable in a system of this sort, that the portion of the RAM memory 22 in which data is to be stored be separable into a number of independent blocks, or partitions, wherein the operator may arbitrarily select a partition into which data is to
be entered. In previous systems, it was necessary to define the length of each partition prior to the entry of any data into the unit. Thereafter, the length of the individual partitions could not be changed. This necessarily resulted in an inefficient use of the memory, unless the operator could precisely determine the number of records which were to be stored in each of the partitions. If the operator guessed incorrectly at the outset, there might be inadequate space in a given partition to store all the records which needed to be stored therein, even though free memory space were available in other partitions.
In accordance with the present invention, a partitioning method is used which renders all of the free memory space available to each partition, as data is being entered into that partition. Rather than having a fixed length, the length of each of the partitions is determined only by the amount of data which is actually stored' therein. This length will vary as the amount of data stored in the partition is varied, with the result being that no excess memory space is wasted by being allocated to partitions not requiring that free space.
The manner in which this is carried out may be more readily understood by reference to Figs. 3A-3C, which each represent that portion of memory 22 utilized for storage
of data. In this representation, the memory is treated as a chain of sequential memory locations 34, with each location providing storage of a single data character. This chain of memory locations 34 extends from a memory address 36, representing the lowest memory address at which data may be stored, to a memory address 38, corresponding to the highest memory address in which data may be stored. For convenience of description, this lower order memory address 36 will occasionally be referred to hereinafter as the start of data field address (SODF), whereas the higher order memory address will be referred to as the end of data field address (EODF).
In Figs. 3A-3C, this chain of memory locations is shown as being-separated into seven partitions, which together occupy the entire data field. The shaded portion 40 of the data field represents that portion of the data field in which no data has yet been stored. The unshaded portions represent the data blocks of the respective partitions. In Fig. 3A, the free memory 40 is located within partition 3, immediately adjacent the last data entry within that partition. Partition 3 is therefore said to be "open" in Fig. 3A, in the sense that data may be added to the data already stored within this partition. The remaining partitions are "closed" in the sense that no additional memory space is available
adjacent these partitions, hence no further data may be added to these partitions at this time.
Figs. 3B and 3C correspond to Fig. 3A, but illustrate the manner in which data is rearranged within the memory so as to open up other partitions within the memory, for example, partition 1. To initiate this operation, the operator will depress a partition control button on the keyboard 14, shown labelled "partition". Thereafter, the operator will depress one of the numeric keys 1-7 to identify which of the partitions the operator desires to enter data into. These commands cause the microprocessor to jump into a procedure for rearranging the data within the memory so that the partition designated by the operator is opened, and all other partitions are closed. Fig. 3B illustrates the contents of the memory in the middle of a data move operation resulting from a command by the operator that partition 1 be opened. In this figure, all of the data within partition 3 has been moved to the end of the free memory 40, so that no free memory exists between the end of partition 3, and partition 4. Furthermore, the boundaries of partitions 2 and 3 have been redefined so that the free memory 40 is now considered part of partition 2, immediately following the last data entry therein, rather than being part of partition 3.
Fig. 3C illustrates the contents of the memory at the conclusion of the programmed operation to open partition 1. In this figure, the data within partition 2 has been moved to the end of the free memory space so that no free memory space exists between the end of partition 2 , and the beginning of partition 3. Furthermore, the boundaries of partitions 1 and 2 have been redefined so that the free memory space is now considered as existing within partition 1, immediately following the last data entry therein, and so that partition 2 now includes only that memory space necessary to contain the data which has already been stored therein. Thus, in Fig. 3C, the movement of partitions is completed with all of partitions 2-7 being closed, and partition 1 being opened. At this point, the operator is free to. enter data into the memory, with this data being entered sequentially following the last data entry into partition 1.
Of course, the operator may select any other partition, if he so desires, by merely depressing the "partition" button, followed once again by a partition number. In the event that partition 3 is selected, for example, the microprocessor moves the data about within the memory in exactly the reverse sequence illustrated in Figs. 3A-3C. Thus, the boundaries of partitions 1 and 2 would first be redefined so that the free memory space
existed at the top of partition 2, rather than at the bottom of partition 1, after which all of the data within partition 2 would be moved to the top of that partition. Then, the boundaries of partitions 2 and 3 would be redefined so that the free memory space would be considered as existing within partition 3, rather than partition 2. Finally, all of the data within partition 3 would be moved to the top of the free memory space, so that all of the free memory is now adjacent the last sequential data record entered in partition 3. Partition 3 will then be open, and available for further data entries. Other partitions will be opened in a similar manner, when selected by the operator.
In order to perform this dynamic partitioning function, various "pointers" are defined which designate the beginning and end of each partition, etc. These pointers are, in actuality, memory addresses which specify a particular location within the data field, and can be thought of as "pointing" to that location within the data field. Each of the partitions has three pointers: All partition pointers are stored within a specific area in scratch pad memory (a portion of RAM memory outside of the data field). These pointers may be recalled by the microprocessor as needed. Fig. 4 illustrates in greater detail the transition between the open partition (partition I) and the
succeeding partition (partition I + 1), and is useful in understanding the nature of the pointers used in the dynamic partitioning procedure performed by the microprocessor. In Fig. 4, the respective boxes 42 each represent a single character location within memory, wherein each of the character locations may be randomly addressed by the microprocessor. In Fig. 4, a plurality of character locations are illustrated, extending from a lowest memory address of N and a highest memory address of M + 22.
A single "record" stored in memory comprises a string of sequentially characters within memory, with the various records being set apart from one another by special characters, referred to hereinafter as "delimiters". The delimiters may, for example, be arithmatic expressions, such as "+" or "-". In Fig. 4, the memory location N+1 is illustrated as containing a delimiter, in this case defining the end of the last complete record in partition I. Locations N+2 and N+3 are illustrated as containing characters representing an, as yet, incomplete record entered by the operator. Locations N+4 to M do not as yet contain characters entered by the operator, and instead correspond to the free memory space 40 illustrated in Figs. 3A-3C. The contents of this intervening free memory space are undefined, and may include any arbitrary and
meaningless sequence of characters. The microprocessor keeps track of the meaningful data entries by means of the various pointers, defined below. All of these free memory locations may be filled by the operator by entering characters through the keyboard 14.
Location M corresponds to the end of the free memory space, and represents the last character location in which data may be entered. When this location is filled, the entire memory will be filled and no further characters may be entered. Locations M+1 to M+15 will never contain data, as they instead represent a guard band separating partition I from partition I+1, the purpose of which is to prevent the accidental overlap of the two partitions. The data stored within partition I+1 thus begins with location M+16, and extends on from there. The first record stored within partition I+l, and, in fact, the first record stored in each of the partitions, corresponds to a "header" identifying the source of the body of data stored within that partition. Each of the seven partitions has three pointers associated with it which define the boundaries of that partition. These pointers serve the following functions:
POINTER DESCRIPTION HOME (I) Home pointer of partition
(I). This pointer will have
value i dentifying the first character location in which a character for that partition is stored.
WP(I) Write pointer of partition
(I). This pointer will have a value identifying the location of the last delimiter entered in that partition.
DSTP(I) Data stop pointer of, partition
(I). This pointer will have a value identifying the last location in that partition in which a data character may be entered. When partition (I) is closed, DSTP(I) will equal WP(I). When partition (I) is open, however, the entire free memory space will intervene in the locations between DSTP(I) and WP(I). In addition to these pointers, two other pointers, INPTR and RP, are used by the microprocessor during
programmed operation. These pointers exist independently of the various partitions, and may have values identifying locations within any partition, at a given time. These pointers serve the following functions:
POINTER DESCRIPTION
INPTR Input pointer. During data entry, this pointer has a value identifying the next character location into which data is to be entered. In other words, INPTR will point to the character location following the last character entered in the open partition. This pointer is also used as a destination pointer in the data move procedures, described hereinafter.
RP Read pointer. This pointer is used to identify the data record to be displayed. It
will point to the delimiter immediately preceding the record to be displayed, and may be moved about from delimiter to delimiter in the open partition under control of the memory review keys on the keyboard 14. Also used as a general purpose pointer.
DATA ENTRY PROCEDURE
Fig. 5 is a flow chart which broadly illustrates the sequence of operations performed by the microprocessor 20 duririg data entry under control of program instructions contained within the ROM portion of memory 22. For simplicity of description, the portions of the operational flow dealing the display of data on the display 28 are not shown. This procedure. includes the following steps.
Step No. Description
100 Upon initial application of power to the microprocessor within the data entry unit, the microprocessor will be automatically reset to begin programmed operation at the initial instructions contained within program memory.
These instructions include those steps necessary to initialize the data entry unit for normal data entry operations. It, more specifically, includes the initialization of all the pointers associated with the seven partitions available to the user, and the automatic loading of headers into the first- data locations in each partition.
102. Following the initialization procedure, the microprocessor waits for the first character to be entered by the operator through the keyboard 14. A character so entered will be applied to the microprocessor 20 by means of the keyboard scanner 26.
104 When a character is entered, it will first be checked to determine whether or not it is a control code. If it is a control code, the MPU will continue with step 106. Otherwise, it will jump to step 108.
106 In the event that the character entered by the operator is a control code, indicating that a control key has been depressed by the operator, the MPU will jump to whatever control procedure
is identified by that control code. Thus, for example, if a partition button has been depressed by the operator, the MPU will jump to and execute the partition procedure. Thereafter, the MPU will return to step 102 for reading the next character.
Xn this step, the character entered by the operator (which must be a data character) is entered into the next sequential location in memory, identified by the input pointer INPTR.
INPTR is then incremented by one so that it will point to the next available character location in memory.
The last entered character is examined to see if it is a delimiter, indicating that the record being entered is completed. If it is not a delimiter, then the MPU jumps back to step 102 to read the next character entered by the operator. Otherwise, the MPU continues with step 112.
The entire last record is compared with the entire record previous to that record to determine whether or not the two are the same.
If the two records are not the same, then the MPU jumps back to step 102 to read the next entry by the operator. If the last two records entered by the operator are the same, however, the MPU continues with step 114.
114 The number carried in the "quantity" field of the second previous record is incremented, if no quantity field yet exists in the second previous record, one is tacked on and given an initial value of 2. The record just. entered is then deleted by simply moving the write pointer to the delimiter of the second previous record, and the input pointer to the character field following - the one identified by the write pointer.
The operation of the procedure described above improves the efficiency of use of the memory by eliminating sequential identical entries in the memory, and replacing them by a simple number indicating the number of times which that record had been repeated. The following tables illustrate the entries by the operator, and the contents of memory resulting from the inclusion of those entries. In table 1, fixed character length records are employed (each five characters in length) so that the
quantity character may be readily identified simply by the presence of an additional character (i.e., the sixth character in this example). Thus, in step 114 above, the microprocessor will examine the sixth character position in the second previous record to determine whether or not a quantity character is already present. If not, then a quantity character of two will be inserted, and the delimiter moved up in memory by one character position.
If a quantity character is already present in a quanitity character field, however, then this character will merely be incremented.
TABLE 1
Data Record Entered Memory Contents
20530 20530+ 75763 20530+75763+ 20530 20530+75763+20530+ 20530 20530+75763+205302+ 20530 20530+75763+205303+ 20530 20530+75763+205304+ 75763 20530+75763+205304+75763+
In the event that the portable data entry device is operated in a mode wherein variable character length records are usedj then some other means must be used to identify the quantity character field. This may be accomplished by including a unique character (i.e.. A) to separate the quantity character field from the rest of the
record. In this mode, the microprocessor will operate, in step 114 above, to examine the second previous record to determine whether or not this unique character is carried within that field. If so, then the number following that alphanumeric character is merely incremented by one. If not, then that character is added to the second previous record, followed by the quantity character "2" and a delimiter. This is illustrated in Table II, below.
TABLE II
Data Record Entered Memory Contents
20530 20530+ 75763 20530+75763+ 20530 20530+75763+20530+ 20530 20530+75763+20530A2+
As stated previously, the operator may call certain control procedures by depressing the correspondingly labeled key on the keyboard 14. The MPU will then jump into the appropriate procedure via step 106 of the data entry procedure. Several of these procedures will now be described in detail.
Partition Procedure
When the operator desires to enter data in a partition other than the one into which data is presently being entered, the operator will depress the partition control
key on the keyboard 14 of the portable data entry unit. This will cause the microprocessor to jump into a partition procedure, via step 106 of Fig. 5. This procedure, shown in flow chart format in Fig. 6, includes the following steps:
Step No. Description
200 Upon first entering the partition procedure, the microprocessor 20 waits for the operator to enter a partition number via the keyboard 14. The variable PAR is then assigned this entered value, which identifies the partition which the operator would like to open.
202 In the partition procedure which is being described, the partitions are moved about one at a time. The variable PARMOD identifies the. particular partition being considered by the program at any given time. In this step, the variable PARMOD is initialized to identify partition 2. PARMOD is not initialized to identify partition 1, since the data block of partition 1 will always be located adjacent the SODF (start of the data field), and will therefore never have to be moved. Also in this
step, the highest order bit of the variable PARMOD will be set to a logic value of "1" for purposes which will become clearer hereinafter. The net result is that the variable PARMOD is initialized to a value of 82H.
204 The pointers for the partition identified by the variable PARMOD are retrieved from scratchpad memory and stored within, registers in the microprocessor so that they will be available for immediate use in the steps which follow.
206 The variable PARMOD (ignoring the higher order bit) is compared with a variable PAR to determine whether or not the partition being examined is above or below the partition which the operator would like to open. If PARMOD is greater than
PAR, then the partition being examined is above the partition to be opened, and the MPU jumps to step 216. Otherwise, the partition being examined by the microprocessor (MPU) is below the partition to be opened, and the MPU continues with step 208.
208 In this step, the partition immediately below the partition being considered (i.e., the PARMOD-1
partition) is examined to determine whether or not the free memory is located within that partition. This is done by comparing the data stop pointer for that partition (identified in Fig. 6 as DSTP(P-l)) with the write pointer for that partition (identified in Fig. 6 as WP(P-1)). If the two pointers have the same value, then no free memory space exists between them, and the MPU jumps to step 212. Otherwise, the MPU continues with step 210.
Before moving the data across the free memory, the boundaries of the PARMOD partition and the PARMOD-1 partition are moved. Thus, the DSTP pointer for the PARMOD-1 partition will be set equal to the present value of the write pointer for that partition, thus effectively eliminating any free memory space within the PARMOD-1 partition. Then, the HOME pointer for the PARMOD partition will be set equal to the present value of the write pointer for the PARMOD-1 partition plus a number corresponding to the number of character positions in the guard band which separates each two adjacent partitions from one another. In the example being described, this
guardband is 16 characters in length. Free memory space now exists below the PARMOD partition, and the data within that partition may be moved down through the free space. The data will be moved one character at a time from a position identified by a source register to a position identified by a destination register. After each character move, the source and destination registers will be incremented so as to point respectively to the next character to moved, and the position into which that charact is to be moved. The input pointer may be used the destination pointer. Following the movemet of the entire PARMOD partition, the write point for that partition will be corrected by setting it equal to the present value of the input pointer, decremented by one.
212 The value of PARMOD is compared with seven to determine whether or not all of the partitions have been moved. If PARMOD is equal to seven, then all of the seven partitions have been, moved, as necessary, to close all of partitions 1-7. This, of course, will only occur when partition seven is to be opened. In this event, the MPU
will jump to step 230. If PARMOD is not equal to seven, however, the MPU will continue with step 214.
214 In this step, the variable PARMOD is incremented so that in the next cycle the partition immediately above the partition which has just been moved will be examined. The MPU then returns to step 204.
If the partition to be opened is not partition seven, then at some point PARMOD will be greater than PAR. When this occurs, the partition procedure will have moved the data block in the partition to be opened and all data blocks of the partitions below it to new positions . immediately adjacent one another and the lower boundary of the data memory SODF. Any free space remaining will therefore exist above the partition to be opened. In subsequent steps, the data blocks of all of the partitions above the partition to be opened are moved upward so that they are adjacent one another and the upper boundary of the data memory EODF. All of the free memory space will then be located immediately above the partition to be opened.
216 In this step, the high bit of the variable PARMOD is examined. If it has a value of 1 (this only occurs on the first pass through decision block 216), the MPU will continue with step 218. Otherwise, the MPU will jump to step 222.
218 PARMOD is reinitialized to a value of seven, so that the movement of data blocks above the partition to be opened begins with the top partition. Also, the high bit of the variable PARMOD is cleared so that in previous passes through the decision block 216, steps 218 and 22 will be bypassed.
220 In this step, the pointers for partition 7 are loaded into the working registers of the MPU so as to be available for immediate use in the step which follow.
222 The DSTP and WP pointers of the PARMOD partition are compared to determine if they have the same values. If so, then no free memory space exists within that partition, and step 224 may be bypassed. The MPU will then jump to step 226. If the two variables do not have the same value.
however, then free memory space exists within the partition, and the data must be moved up in memory. In this event, the MPU will continue with step 224.
224 In this step, data in the PARMOD partition is moved up until it is adjacent the data stop pointer DSTP of that partition. As in step 210, this is accomplished by moving the data character-by-character from a location identified by a source pointer to a location identified by a destination pointer. Initially, the source pointer will have a value equal to the write pointer for that partition, whereas the destination pointer (which again, preferably, will be the input pointer), will have a value equal to the value of the data stop pointer
DSTP. When all of the data has been moved up, the value of the pointers will be corrected. Thus, the HOME pointer for the PARMOD partition will be given a value equal to the input pointer INPTR, and the data stop pointer DSTP for the partition immediately below the PARMOD partition (i.e., the PARMOD-1 partition) will be moved up to the input pointer, minus a character length corresponding to the length of the guard band between partitions.
226 The variable PARMOD is decremented, to now identify the partition immediately below the partition which has just been examined.
228 The variable PARMOD is compared with the variable PAR to determine whether or not the partition being examined is the same as the partition which is to be opened. If these two variables do not have the same value, then the MPU returns to step 204 to determine whether the new PARMOD partition needs to be moved, and to move it if is does.
If the two have the same value, however, then all data movement has been completed, and the MPU continues with step 230.
230 All of the data movement having been completed, the partition pointers for the partition which has just been opened will be loaded into the working registers of the microprocessor so as to be available for use during the normal entry of data into that open partition. Also, the read pointer is set equal to the write pointer of the newly opened partition, and the input pointer is set equal to that value, incremented by one. The MPU will then return to the main body of program, shown in Fig. 5.
Insert Procedure
Fig. 7 illustrates the procedure performed by the microprocessor in order to insert a new data record between two records previously entered. Prior to calling this procedure, the operator will move the read pointer RP to the position in memory at which the insert is to be placed. The keyboard 14 includes two keys for this purpose, labeled as "memory review" keys. When one of these keys is depressed, the microprocessor will either increment or decrement the read pointer (depending upon the key depressed) to point to the record immediately prior to or following the record at which it had previously pointed. In this fashion, the read pointer may be moved about within the open partition to locate a particular data entry. When the entry is located which follows the position at which the insert is to be inserted, the operator will depress the insert key on the keyboard 14. The record to be entered at the position identified by the read pointer will then be entered in a normal manner by the operator. As soon as the delimiter is entered by the operator, the insert procedure will automatically move the insert record into the appropriate location within memory. The insert procedure includes the following steps:
300 When the operator depresses the insert key, the microprocessor first enters a wait loop, where it waits until the key has been depressed continuously for a given length of time, say three seconds. The purpose for this wait loop is to assure that the insert function is not accidentally called . If the operator does not depress the insert key for a long enough period of time, the MPU will jump out of step 300, and return to the data entry procedure. Also in this step, a counting variable N is initialized to a value of 0.
302 The microprocessor now waits for a character to be entered by the operator. The character entered by the operator is then stored within a temporary location in memory (which may be a register within the microprocessor), and the counting variable is incremented by 1.
304 The character which has thus been entered is examined to determine if it is a delimiter. If the character is a delimiter, then the record has been completely entered, and the insertion process proceeds to step 306. Otherwise, the MPU returns to step 302 to await the entry of the next character in that record.
306 Beginning with the last delimiter entered regularly into the open partition, and including all of the data between that location and the present position of the read pointer, all of the data characters are moved up in memory by N character locations, thereby providing a gap of N character spaces between the record identified by the read pointer and the record immediately previous to that. The read, write, and input pointers are then all incremented by N.
308 The record entered by the operator for insertion into the data is then moved from the temporary storage location into the newly created gap in the data, thus again creating a continuous chain of data, substantially without gaps. The MPU then, returns to the data entry procedure.
Delete Procedure
This procedure is used to delete a selected entry by moving all of the data located above the record to be deleted down by the length of that record. To utilize this procedure, the operator will first position the read pointer RP so that the record to be deleted is displayed on the display 28. This, again, will be accomplished by depressing the memory review keys on the keyboard 14 to
increment or decrement the position of the read pointer. Then, the operator simply depresses the delete button, causing the microprocessor to jump into the delete routine, and delete the entry. This procedure includes the following steps:
400 This step is similar to step 300 in that the microprocessor will monitor the delete key to determine whether or not it is held down for a predetermined length of time, for example three seconds. If held down for this predetermined length of time, the microprocessor will continue on with step 402. If the delete key is released prior to the expiration of this predetermined length of time, however, the microprocessor will simply return to the body of the program, essentially ignoring the actuation of the delete key. 402 In this step, the microprocessor counts the number of characters from the present position of the read pointer (which will point to the delimiter immediately prior to the data record being displayed), and the next succeeding delimiter. The resulting numeric value then defines the character length N of the record to be deleted. This step is, of course, unnecessar if all records have the same length.
404 The microprocessor now moves all of the data above the record to be deleted down by N character spaces in memory, thereby effectively eliminating that entry by writing over it with subsequent entries. Upon the conclusion of thedata move operation, the write pointer will also be decremented by N characters, thus again causing it to point at the last regularly entered delimiter in the partition. The input pointer will similarly be decremented. The microprocessor, thus having completed the delete procedure, will return to the body of the program.
Send Procedure
The send procedure is used to send the data which has been stored within the solid state memory to a remote data collection point through the input/output port 32, which will be connected to an acoustical coupler data set, or other data transmission means by way of the connector 18. In order to call the send procedure, the operator will first enter a sequence of characters identifying the sequence in which the partitions are to be transmitted. If, for example, the operator desires to send partition 3 first, then partition 7, then partition 3 once again, and thereafter partitions 1 and 2, the operator will enter the characters 3, 7, 3, 1, 2 in the normal fashion. Through
the normal data entry operation of the microprocessor, as illustrated in Fig. 5, these characters will be entered into the open partition immediately following the last complete data record. After the operator has entered the desired sequence in which the partitions are to be transmitted, the send button on the keyboard 14 will be depressed. The microprocessor will then jump into the send procedure whose flow chart is shown in Fig. 9, and under control of this procedure will send the partitions via the acoustical coupler or other output device in the requested sequence. The send procedure includes the following steps:
500 In this, step, the microprocessor relocates the "send list" S (i.e., those characters stored in character locations between the write pointer an the present location of the input pointer) in a temporary storage location, for example the working registers of the microprocessor itself. A delimiter will also be entered at the conclusion of this send list in the working registers of the microprocessor, to define the end of the list. 502 In this step, a counting variable N is initialized to a value of 1.
The microprocessor examines the Nth entry in the send list S to determine whether or not that entry is a delimiter. If it is not a delimiter, then the MPU continues with step 506. If it is a delimiter, however, then all of the partitions identified in the send list have been transmitted, and the send procedure is completed. In this event, the microprocessor jumps out of the send procedure and returns to the body of the program, shown in Fig. 5.
When the Nth item on the send list is not a delimiter, it is a partition number identifying a partition which is to be transmitted. In this step, that partition is transmitted, one character at a time, beginning with the location in memory identified by the home pointer of that partition, and ending with the character stored in the location identified by the write pointer for that partition. When all of these characters have been transmitted, the counting variable N is incremented, and the MPU returns to step 504. The procedure will jump back and forth between steps 504 and 506 until all partitions listed in the send list have been transmitted.
Although the invention has been described with respect to a preferred embodiment, it will be appreciated that various rearrangements and alterations of parts may be made without departing from the spirit and scope of the present invention, as defined in the appended claims.