Electronic dictionary and language interpreter4158236Abstract A portable electronic dictionary with a micro-computer in a hand-held housing which mounts a plurality of alpha-numeric displays and a keyboard. A plug-in ROM stores a plurality of pairs of sequences of alpha-numeric characters and is searched by a central processing unit in the micro-computer under instructions stored as firmware in another ROM forming part of the micro-computer. One sequence of each stored pair is compared with a sequence which is entered into the keyboard and stored in a RAM also forming part of the micro-computer until a match is found. After one or more sequences have been entered into the keyboard and locations of matching pairs stored in the micro-computer RAM, the pairs of stored sequences can be rolled across the display. Either sequence of each pair can be compared with a sequence entered into the keyboard. Claims What is claimed is: Description The invention relates to a portable, self-contained information storage apparatus into which a sequence of alpha-numerical characters can be entered via a keyboard and an associated stored sequence of characters displayed, e.g., defining a foreign language translation of an entered word.
______________________________________
Designation Function
______________________________________
V.sub.SS Circuit ground potential
V.sub.DD, V.sub.CC
+5V supply voltage
P.sub.10 -P.sub.17 (Port 1)
8-bit quasi-bidirectional
port.
P.sub.20 -P.sub.27 (Port 2)
8-bit quasi-bidirectional
port.
D.sub.0 -D.sub.7
True directional port which
can be written or read syn-
chronously using the RD, WR
strobes. The port can also
be statically latched.
T.sub.0 -- Input pin used by micro-
computer 200 to test whether
a key in Row 0 has been dis-
persed.
T.sub.1 -- Input pin used by micro-
computer 200 to test whether
a key in Row 1 has been dis-
persed.
RD---- Output strobe activated during
a microcomputer 200 read opera-
tion. Used as a read strobe
to external data memory.
RS---- Input which is used to initial-
ize the processor.
WR---- Output strobe during a micro-
computer 200 write operation.
Used as a write strobe to ex-
ternal data memory.
X.sub.1-- One side of crystal input for
internal oscillator 205.
--X.sub.2 Other side of crystal input.
______________________________________
The read/only memory (ROM) plug-in module 300 detailed in FIG. 2, stores the translation or dictionary table which microcomputer 200 searches for the appropriate entry. Each entry is a pair of alpha-numeric sequences, one sequence being, the source word and the other being the translation. Both sequences can be displayed following a match as described below. Module 300 preferably consists of two mask programmed 65,536 bit memories 301 and 302, each organized as 8,192.times.8 bits, giving a module capacity of 16,384 alpha-numeric characters. Based on an average of 12 characters per source word and translation word, each module has an average capacity of 2,730 words (1,365 source and 1,369 translation words). The average word capacity of module 300 can be doubled by including four memory chips instead of the two illustrated in FIG. 3. Each memory chip, e.g., chip 301, can be any of the standard read/only memories, such as the MM 5235 N-channel metal gate device manufactured by National Semiconductor. Module 300 is a small assembly which is easily plugged into and removed from the unit without the use of tools. The ROM modules are made easily replaceable since it is contemplated that the unit can be changed from one language or type of dictionary to another by simply changing the ROM, e.g., from English/French to German/Italian. Thus, each language or dictionary table will require a unique set of two ROMs, e.g., 301 and 302. Address lines P.sub.10 -P.sub.24 select one of the 8,192 characters stored in each ROM 301 and 302. Chip select line P.sub.25 selects the correct ROM of the two, P.sub.27 enables the selected ROM, and RD places the selected character from the selected ROM on the data lines D.sub.0 -D.sub.7 to be read by microcomputer 200. The keyboard-display module 400 detailed in FIG. 3 consists of the keyboard-display decoder/driver chip 402, the 16 character, 16 segment alpha-numeric LED display 470, the 33-position keyboard 480 and the initial start-up circuit consisting of resistor 450 and capacitor 452. Chip 402, represented in detail in FIG. 4, consists of a hex character code latch 404, a 16-segment generator 406 (a read/only memory capable of storing patterns for 64 displayable characters), a 16-segment anode driver 408, a 16-bit character/column select shift register 410, a 16-character LED common cathode/keyboard column select driver 412. Although a custom chip is used in this exemplary embodiment, individual components such as in FIG. 4 may alternatively be used. The RST signal in FIG. 4 is generated by the RC start-up circuit, resistor 450 and capacitor 452 in FIG. 3, or by depression of the clear key 486 of keyboard 480 in FIG. 5. It generates, through buffers 414 and 416, the RS signal which resets the microcomputer 200, sets the character latch 404 to a "space" code (i.e., a blank display), sets the shift register 410 to a value associated with the first displayable character position, and causes the entry of a given message identifying the contents of module 300, e.g., English/French, in the display memory area of RAM 202. Upon resetting of module 300, e.g., English/French, in the display memory area of RAM 202. Upon resetting, the microcomputer program sets its display character pointer in RAM 202 (see FIG. 8) to the first position and from then on tracks the position from POS.sub.0 to POS.sub.15. Once per millisecond the next character to be displayed is loaded from the display memory area of RAM 202 over data lines D.sub.0 -D.sub.5 into the hex latch 404 by P.sub.27 and WR logically combined in AND gate 418. This signal also advances shift register 410 to the next character display position. When the display position becomes POS.sub.15 (the last position), a line between the POS.sub.15 output and the data input (DIN) terminal causes the display position to become POS.sub.0 on the next clock pulse. The character stored in the hex latch 404 is supplied to the ROM 406 where its 16-segment code is generated and fed to segment driver 408, for output to display 470. The single selected bit in shift register 410 is fed to the character/column driver 412 for output to the selected character cathode in display 470 and also to the selected keyboard column of keyboard 480 as illustrated in FIG. 3. Information as to whether a key in the particular keyboard column has been depressed is fed back into chip 402 on lines Row 0 and Row 1 where they are sensed and buffered by buffers 420 and 421, respectively, and fed back to the microcomputer chip 200 as T.sub.0 and T.sub.1. The 16 characters in display 470 are multiplexed in operation at a speed such that although only one character is turned on at a time, all are readable by the user because the time for the display to fade is much greater than the time between refreshings. The correct character position is selected on one of the lines POS.sub.0 -POS.sub.15 from keyboard display chip 402. The segments required for the selected character are enabled on lines SEG.sub.A -SEG.sub.P from chip 402. Keyboard 480 is electrically arranged as a 2.times.16 array with clear key 486 (see FIGS. 5a and 5b) separately generating the RST signal. Sequences of alpha-numeric characters and commands can be entered into the keyboard by sequential key manipulation. A signal is applied sequentially to each one of the POS.sub.0 -POS.sub.15 lines from chip 402 to select each column in keyboard 480 in turn. If a key in that column is depressed while it is selected, the signal will be fed back on either ROW0 or ROW 1 through chip 402 to microcomputer 200 for storage in RAM 202. FIG. 6 illustrates the character timing that would occur in the circuitry illustrated in FIGS. 3 and 4 for the display of "LEXICON COMPUTER" and the depression of the "G" key. Each division of the horizontal axis represents a display refresh operation performed by microcomputer 200 approximately once every millisecond. In time period 0, the WR and P.sub.27 signals are logically combined in gate 418 of FIG. 4 to produce a clock signal which sets character latch 404 to the internal code for an "L", presented to latch 404, by microcomputer 200 on lines D.sub.0 through D.sub.5. ROM 406 translates the internal code for "L" into its corresponding 16 segment code so the anodes of the proper segments of each of the 16 characters in the display receive a high voltage. The same clock signal also advances shift register 410 so that the POS.sub.0 line, connected commonly to the cathodes of the segments in the first character of display 480 becomes low. The appropriate diode segments of the first character of the display now conduct so that an "L" appears. Similarly the clock pulse at the beginning of time period 1 latches the internal code for "E" presented by microcomputer 200 to character latch 404. The internal code is translated into the 16 segment code in ROM 406 which is presented to each character of the display. The same clock pulse advances shift register 410 so that the POS.sub.1 line is low, enabling the second character of the display so that an "E" appears. This process continues until an "R" appears in the last character of the display. Upon the next clock pulse, the internal code for "L" presented by microcomputer 200 will be latched, and shift register 410 will recycle as described above so that the POS.sub.0 line will be low. This process continues, with the next character being refreshed approximately once every millisecond. FIG. 7 illustrates the hex representation of the internal code, the 16 segment code, the hex representation of the 16 segment code, and the appearance of the display for each character. It also illustrates the diode segment to which each line, SEG.sub.A through SEG.sub.P, is attached, and the display character to which each line, POS.sub.0 through POS.sub.15, is attached. As illustrated in FIG. 3 and as detailed above, lines POS.sub.0 through POS.sub.15 are connected not only to display 470 to enable the selected character, but also to keyboard 480. Each line POS.sub.0 through POS.sub.15 is uniquely associated with a column of keyboard 480 so that as each line POS.sub.0 through POS.sub.15 in turn becomes low, microcomputer 200 receives information through lines T.sub.0 and T.sub.1 that a key in the enabled column has been depressed. FIG. 6 illustrates the signals created by depression of the "G" key. This particular key is in the column associated with line POS.sub.5. When POS.sub.5 becomes low, during time period 5, the depression of the "G" key causes line T.sub.1 to become low. Microcomputer 200 will translate the simultaneous occurance of a low voltage on line T.sub.1 and a low voltage on line POS.sub.5 into the internal representation of "G" and store the representation in the appropriate location to be described below. II. DESCRIPTION OF GENERAL OPERATION The firmware for the microcomputer system is the code pattern stored in the microcomputer 200 program memory ROM 201 which provides for the intelligence of the unit, such as keyboard handling, display refresh, word translation search and calculation. The firmware can be divided into three main categories: the interrupt service, the mainline program, and the code tables. As mentioned, the translation table is stored in ROM module 300. Each entry in the table is comprised of a pair of alpha-numeric sequences or words: the source word to be defined or translated, e.g., an English word, and a definition or translation of the source word. Each character of each sequence is stored in a "byte" of 8 bits of memory. Each byte is composed of a two-bit word mark followed by the 6 bits representing the character. The 6 character bits can represent as many as 63 different characters. The two bits of the word mark represent one of four different binary numbers. One number indicates that the following character bits represent the last character of one word sequence of the pair. Another number indicates that the following character is the last character of the other sequence of the pair. A third number represents that the following character is a normal byte, i.e., one located within one sequence or the other. The fourth binary number represents that the following character is the end of the translation table. To look up a word, the system checks each of the bytes in sequence. The first character of the entered word is compared to the first character of a stored word, in one part of an entry. If there is a match, then the second character is checked, etc. If all characters match, then the location of entry is retrieved and stored in RAM 202 for later display. If a character does not match, then the system checks the first character of the next pair and continues until a complete match is found or the table is exhausted. If no match is found after the entire table is searched a "NOT FOUND" message is displayed. As a part of RAM 202 in microcomputer 200, 16 bytes (hereinafter called the display memory) represent an image of the display. The mainline program can change the contents of the image. The interrupt service, once per millisecond, will select the next position of the display for refreshment. The proper image character is removed from the RAM and outputted to keyboard display chip 402. The character display pointer into the image is then incremented, in anticipation of the next refresh cycle. The keyboard is entirely controlled by the firmware program as described above. Each entered key is debounced, translated from a row and column representation into an internal code set and then made available to the mainline program. The 16 rows of two keys each are sampled at the same time as the display is refreshed. In fact, the port which reflects the current display position also and concurrently selects the keyboard row, as illustrated in FIG. 3. The mainline program permanently stored as firmware in ROM 201 in microcomputer 200 performs the intelligent functions of the system. This program selects the current function, based on the last function key, accepts data keys, places data into the display, performs word translation, scrolls the display and performs the calculator functions. The mainline program enables the unit to be used in two major modes: the DICTIONARY mode and the CALCULATOR mode, each selected by D/C key 484 of FIG. 5a. FIG. 5a also shows one suitable arrangement of the alpha-numeric and command keys. The DICTIONARY mode also has a number of sub-modes to perform the various dictionary functions. When the dictionary program is in the ENTER sub-mode, the user may either enter data into the display, terminate the word being entered, or select a different mode of operation. Data is entered into the display by indexing the desired keys. The displayed characters will shift one position to the left and the indexed character is inserted on the right. When backspace key 490 of FIG. 5a is entered, the displayed characters are shifted one position to the right, and the right-most character is lost. When space key 492 is operated, the displayed word is terminated, and will then be looked up in the ROM dictionary module 300. If it is not found, the words "NOT FOUND" will be displayed; otherwise, the definition or translation location in ROM 300 will be stored in the ROM module address storage area of RAM 202 (see FIG. 8). The address storage index in RAM 202 will be incremented and the word, if any, stored at that address will be displayed. When step key 496 is entered, the actions depend on whether any entry has been made to the display. If no new key has been entered, the address storage index is incremented and the word stored at the indicated address, if any, is displayed. This permits the editing of words in an entered sentence without retyping the entire sentence. If a key has been previously entered, the actions are the same as for the space key. When translation key ("=") 494 is entered, the DISPLAY sub-mode is entered and the first word is displayed. If a word has been entered into the display, it will be processed before the DISPLAY sub-mode is entered. When mode key 484 is depressed, the CALCULATOR mode is entered. When query key 488 is depressed, the sub-mode is changed to QUERY. In the DISPLAY sub-mode, the user may examine the translation one word at a time or change modes. The display of the translation will proceed by displaying, in order, all the source words followed by all words of the translation. When translation key 494 is entered, the sub-mode is changed to SCROLL. When step key 496 is entered, the next word of either the source or translation is shifted into the display as the previous contents are shifted out. When mode key 484 is depressed, the CALCULATOR mode is entered. When any other key is depressed, the sub-mode is changed to ENTER. When in the SCROLL sub-mode, the user may watch the display or enter another mode. The display will be constantly moving, similar to a theater marquee, with the entire source and then the entire translation entering from the right and exiting from the left. When step key 496 is depressed, the DISPLAY sub-mode is entered. When mode key 484 is depressed, the CALCULATOR mode is entered. When any other key is indexed, the ENTER sub-mode is entered. When in the QUERY sub-mode, the user may either enter a word or partial word into the display and then examine all other words which match the entered letters, or enter another sub-mode. The user enters the letters he is sure of. Any letter position which the user is not sure of is filled by depressing space key 492. When the user has entered the letters he is sure of he depresses either step key 496 or translate key 494. All words stored in ROM 300 which have letters which match the letters entered by the user will be displayed. When step key 496 is indexed, the look-up process is begun. The first word found in ROM 300 which matches the entry will be displayed. Words in ROM 300 which are longer than the entry, but which match the entry, as far as it goes, will be displayed. When space key 492 is depressed, the display is shifted one position to the left and the space character is entered. When searching ROM 300 later, all letters are considered to match a space. When backspace key 490 is entered, the display is shifted one position to the right, and the right-most character is lost. When query key 488 is depressed, the QUERY sub-mode is re-entered from the top. When the mode key is indexed, the CALCULATOR mode is entered. If a data key is depressed, it is placed in the display. The display is shifted one position to the left to make room for this data. No more than 16 data keys may be entered. When in the CALCULATOR mode, the user may enter 10-digit numbers, perform addition, subtraction, multiplication or division operations, examine the current sub-total, clear the current entry or enter the DICTIONARY mode. The decimal point may appear between any two of the 10-digit positions or at either end. The most significant 10 digits of the result will be displayed. III. FIRMWARE DESCRIPTION FIGS. 9-16 represent the steps that microcomputer 200 takes to carry out the functions of the electronic dictionary. FIG. 9 represents the subroutines that control the operation of the microcomputer when a key is depressed. Upon the initial powering of the apparatus, or upon the depressing of clear key 486, the DICTIONARY mode is entered and the interrupt service is initialized. The DICTON subroutine is then entered. A given message identifying the contents of module 300, e.g., English/French, is displayed on display 470, and the word index and all pointers in RAM 202 are cleared. The character count in RAM 202, which counts the number of characters currently being displayed in display 470 is also cleared. As mentioned above, the invention is capable of translating in either direction between the two languages stored in ROM module 300. If the module contains a translation table between English and French, the device can function either as a English/French or French/English dictionary. The order of translation can be reversed from the order indicated on display 470 by depressing backspace key 490. CPU 204 stores a representation of the order of translation in RAM 202. The DMAIN subroutine is then entered. The 8 bit character representing that no key has been depressed is entered in the accumulator of CPU 204. When a key is pressed, the 8 bit character representing that key is stored in a register of RAM 202 called last-key. Periodically, the character in the accumulator is exchanged with the character in the last-key register. The data that has just been placed in the accumulator is also stored in a register of RAM 202 so that the information indicating the depressed key (if a key was depressed) will be available for later processing. CPU 204 then determines whether a key has been depressed. If no key has been depressed, microcomputer 200 then checks RAM 202 to determine whether the SCROLL sub-mode has been entered. If it has not, microcomputer 200 returns to the DMAIN subroutine to determine if a key has been depressed in the meantime. If the SCROLL sub-mode has been entered, microcomputer 200 then examines the contents of a RAM register called 4 Hz Tikker, which is incremented every millisecond by a one khz clock. The register counts from 0 to 256 and then resets to 0. Thus, a period of approximately 0.25 seconds elapses before the register returns to 0. CPU 204 determines if the 0.25 second period has elasped (i.e., if the register has returned to 0). If the time period has not ended, microcomputer 200 returns to the DMAIN subroutine. If the period has elapsed, the data that is currently in the display memory of RAM 202 (see FIG. 8) is shifted to the next higher location, the next data character is retrieved from ROM module 300 and stored in the lowest order location of the display memory of RAM 202. Microcomputer 200 then returns to the DMAIN subroutine. Once it is determined that a key has been depressed, CPU 204 first determines whether mode key 484 has been depressed. If it has, CPU 204 determines the immediately previous mode. If the previous mode was calculation, CPU 204 returns to the DICTON subroutine. If the last mode was DICTIONARY, the display memory of 202 and the character count is cleared, and the CALCULATOR subroutine is entered. If mode key 484 was not depressed, CPU 204 then determines whether the CALCULATOR mode has been entered. If it has, the CPU enters the CALCULATOR subroutine. If the CALCULATOR mode has not been entered, CPU 204 determines whether the apparatus is in the ENTER sub-mode. If it is, the ENTER subroutine is entered. If it is not, CPU 204 determines whether the DISPLAY sub-mode has been entered. If it has, the DISPLAY CONTINUE subroutine is entered. If it has not, CPU 204 determines whether the SCROLL sub-mode has been entered. If it has, the SCROLL subroutine is entered. If it has not, the QUERY CONTINUE subroutine is entered. FIG. 10 details the steps CPU 204 takes to perform the calculator functions of the CALCULATOR subroutine. First, CPU 204 determines whether the depressed key is one of the numerical keys 0-9. If a numerical key has not been depressed, then one of the function keys must have been depressed, and CPU 204 jumps to the corresponding function subroutine. If one of the numerical keys 0-9 has been depressed, microcomputer 200 then determines whether 10 characters have already been entered. If 10 characters have been entered, CPU 204 does not display or store the most recent entry, since it can only operate on at most 10 digit numbers, and CPU 204 returns to the DMAIN subroutine in FIG. 9. If 10 characters have not been entered, the character count, indicative of the number of characters in the display memory, is incremented, the new character is displayed, and the new character is entered in the lowest order location of the display memory in RAM 202, after shifting the already present data to the next highest location. If decimal point key 498 has been depressed, CPU 204 first determines whether the decimal point has been set already. If the decimal point has not been set, the character count is increased, the decimal point is displayed in display 470, the information, stored in the display memory of RAM 202, is advanced to the next highest memory location and the 8 bit representation of the decimal point is entered in the lowest order location. CPU 204 then returns to the DMAIN subroutine in FIG. 9. If decimal point key 498 has already been depressed, CPU 204 simply returns to the DMAIN subroutine in FIG. 9. The four function subroutines are all similar in operation. A register in RAM 202 is set to indicate the indexed key. The number previously entered and stored in the display memory is moved to the WORK 1 area of RAM 202 (see FIG. 8) and stored in a compressed manner. The contents of the WORK 2 area of the RAM are then operated upon by contents of WORK 1. If WORK 2 is clear, the contents of WORK 1 are merely placed in WORK 2. The contents of the WORK 2 area are then copied into the display memory for display. CPU 204 then returns to the DMAIN subroutine in FIG. 9. If total key 494 is depressed the TOTAL subroutine is entered. The representation of the previous non-numeric key that was depressed is moved to the accumulator. CPU 204 then determines whether the non-numeric key was a function key. If it was not (i.e., the key was neither a number of a function) CPU 204 returns to the DMAIN subroutine in FIG. 9. If the key was a function key, CPU 204 enters the corresponding function subroutine. To illustrate, suppose the operator desires the result of "A"+"B". First the operation enters "A" a digit at a time. He then depresses the "+" key whereupon its code is stored in a register of RAM 202. "A" is taken from the display memory and entered in the WORK 1 area of RAM 202. "A" is then moved to the WORK 2 area since WORK 2 was previously clear. The operator then enters "B" a digit at a time. The "+" key 494 is pressed which causes the code of the previously pressed non-numeric key (i.e., the "+" key) to be placed in the accumulator. The ADDITION subroutine is then entered. "B", stored in the display memory, is moved to the WORK 1 area of RAM 202. The contents of WORK 1 (B) are added to the contents of WORK 2 (A) and the result is placed in WORK 2. The contents of WORK 2 are then displayed. FIG. 11 illustrates the ENTER subroutine. CPU 204 first determines whether backspace key 490 has been indexed. If it has, CPU 204 determines whether the character count is zero, that is, whether there are characters already entered in the display. If no characters have been entered, the CPU returns to the DMAIN subroutine in FIG. 9. If at least one character has been entered, the character count is decreased by one, and all the data stored in the display memory of RAM 202 (see FIG. 8) are shifted to the next less significant location, with the information stored in the least significant location being lost. CPU 204 then returns to the DMAIN subroutine of FIG. 9. If backspace key 490 has not been depressed, CPU 204 determines whether translate key 494 has been depressed. If it has, CPU 204 then determines whether the character count is zero, indicating that there is no character on the display or in the display memory. If there is no display, the CPU executes to the DISPLAY START subroutine. If a character has been entered, the CPU executes the SEARCH subroutine. If the entered word is not found in the search of ROM plug-in module 300, where the dictionary table is stored, the words "NOT FOUND" are displayed, the character count is cleared, and CPU 204 returns to the DMAIN subroutine in FIG. 9. If the word has been found in ROM module 300, the DISPLAY START subroutine is entered. If translate key 494 has not been depressed, CPU 204 then determines whether query key 488 has been indexed. If it has, the CPU enters the QUERY START subroutine. If the query key has not been indexed, CPU 204 determines whether step key 496 has been depressed. If it has, CPU 204 determines whether the character count is zero. If it is indicating that no characters have been entered, the pointer indicating the location in RAM 202 of the register containing the ROM module 300 address being accessed is incremented. The word stored at the new ROM module 300 address, if any, is displayed. This permits the editing of words in a sentence without retyping entire sentence. If a character has been entered, the actions are the same as if space key 492 has been depressed, as discussed below. If step key 496 has not been depressed, CPU 204 determines whether space key 492 has been indexed. If it has, the SEARCH subroutine is entered. If the word in the display memory is not found in the ROM module 300, the words "NOT FOUND" are displayed, the character count is cleared to zero, and CPU 204 returns to the DMAIN subroutine in FIG. 9. If the word has been found in ROM module 300, the address of the word within module 300 is stored in the register of RAM 202 indicated by the ROM address storage pointer of RAM 202 (see FIG. 8). The display memory and the character counter is cleared to zero. RAM 202 is capable of storing the ROM 300 addresses of the beginning of from 1 to 8 pairs of sequences, before any of the words, translations or definitions are displayed (see FIG. 8). At this point, in the ENTER subroutine, CPU 204 determines whether 8 sequence pair addresses have already been stored. If 8 addresses have been stored, CPU 204 enters the DISPLAY START subroutine. If 8 addresses have not been stored, the ROM address storage pointer in RAM 202 is incremented and the program returns to the DMAIN subroutine of FIG. 9. If none of the above-mentioned keys have been indexed while in the ENTER sub-mode, then one of the alphabetic keys A-Z must have been indexed. CPU 204 determines, before this character is entered into the display memory, whether the character count is zero, indicating that this character is the first character of a new word. If it is, the data in the display memory of the old word is cleared. After the display memory is cleared, or if the character count did not equal zero, CPU 204 then checks whether the character count is 16, indicating that display 470 and the display memory in RAM 202 are full. If the character count is 16, microcomputer 200 cannot handle another character so the character that has just been indexed is not displayed or stored and CPU 204 returns to the DMAIN subroutine of FIG. 9. If the character count does not equal 16, the memory and the display can take on another character. The data stored in the display memory in RAM 202 is placed in the next higher memory location and the 8 bit representation of the character that has just been indexed is placed in the lowest order location (see FIG. 8). The character count is incremented and CPU 204 returns to the DMAIN subroutine of FIG. 9. FIG. 12 illustrates the DISPLAY START and the DISPLAY CONTINUE subroutines. These subroutines are entered when the display of the results of the various searches that have occurred is desired. Note that both the indexed word, and the translation or definition of it, are stored in ROM module 300 so that the only information that is stored in RAM 202 is the location in ROM 300 of the source word and its translation or definition. When the DISPLAY START subroutine is entered, the display memory in RAM 202 is cleared. As discussed above, each byte stored in ROM module 300 begins with a 2 bit word mark so that a word in the first sequence of a pair can be distinguished from a word in the second sequence of the pair. CPU 204 then enters a character in a particular address of RAM 202 to indicate that only the source words are to be displayed first. The first source word is displayed, and CPU 204 enters the DISPLAY CONTINUE subroutine. CPU 204 then determines whether translate key 494 has been depressed. If it has, the character count is set to 0, the SCROll sub-mode is entered and CPU 204 returns to the DMAIN subroutine of FIG. 9. If translate key 494 has not been depressed, CPU 204 determines whether step key 496 has been pressed. If step key 496 has been depressed, CPU 204 determines the number of source words or translations that have been displayed. If CPU 204 determines that not all the source or translation words have been displayed, CPU 204 commands that the next source word or the next word of the translation be displayed. CPU 204 then returns to the DMAIN subroutine of FIG. 9 to await the next indexed key. If CPU 204 determines that all the source words or all the translations have been displayed, CPU 204 initializes the pointer in RAM 202 that indicates the RAM register containing the next ROM address to be accessed, and determines whether source words or translations are being displayed. CPU 204 then commands that the other class of words be displayed, i.e., if source words had been previously displayed, CPU 204 will indicate that translations are to be displayed, and if translations had been displayed, CPU 204 will indicate that source words are to be displayed. CPU 204 then displays the first word of either the source or the translation as indicated. CPU 204 returns to the DMAIN subroutine of FIG. 9 to wait for the next key to be depressed. If step key 496 was not depressed, the pointer to the RAM 202 register storing the next ROM address to be accessed is set to the first RAM register and the first word from the accessed ROM location is displayed. The character count is set to zero, the ENTER sub-mode is entered, and CPU 204 returns to the DMAIN subroutine in FIG. 9. FIG. 13 represents the SCROLL subroutine which is entered when a key is indexed while the unit is in the SCROLL sub-mode. As discussed above, a key depressed during the SCROLL sub-mode causes the device to enter either the DISPLAY sub-mode or the ENTER sub-mode, depending upon the key depressed. The first step CPU 204 takes is to leave the SCROLL sub-mode. CPU 204 then determines whether step key 496 was depressed. If it was, the CPU enters the DISPLAY sub-mode and returns to the DMAIN subroutine of FIG. 9. If step key 496 was not depressed, display 470 and the display memory in RAM 202 are cleared, the pointer to the RAM 202 register containing the next ROM 300 address to be accessed is initialized, the character that has been indexed is placed in the first position of the display and the display memory, the character count is set to 1, and the ENTER sub-mode is entered. CPU 204 then returns to the DMAIN subroutine of FIG. 9. FIG. 14 contains the QUERY START and the QUERY CONTINUE subroutines. When the QUERY START subroutine is entered, the display memory pointers, and the character count are cleared. CPU 204 then sets the sub-mode to QUERY and returns to the DMAIN subroutine of FIG. 9. When the QUERY CONTINUE subroutine is entered, CPU 204 first determines whether the character indexed was space key 492. If it was, the character count is incremented, the data stored in the display memory of RAM 202 placed in the next highest location, and an 8 bit representation of a character that is assumed to match any character stored in ROM module 300 placed in the lowest order location of the display memory. CPU 204 then returns to the DMAIN subroutine of FIG. 9. If space key 492 was not depressed, CPU 204 then determines whether step key 496 was depressed. If it was, CPU 204 first determines whether step key 490 has been depressed previously while in the current QUERY sub-mode. If it was not, the characters stored in the display memory of RAM 202 are shifted to a different memory area of RAM 202. A flag is then set in a memory location in the RAM 202 that indicates that step key 496 has been pressed while in the current QUERY sub-mode. The steps continue as if the step key were previously depressed while the current QUERY sub-mode. The address of the location in ROM module 300 where the search for the word will begin is entered in a memory location in the RAM of microcomputer 200. The search is then conducted as controlled by the SEARCH subroutine, and if a match for the entered letters is found, the new match is displayed. CPU 204 then returns to the DMAIN subroutine of FIG. 9. If a match is not found, the words "NOT FOUND" are displayed and CPU 204 returns to the DMAIN subroutine of FIG. 9. If CPU 204 determines that step key 496 was not depressed, CPU 204 then determines whether translate key 494 has been depressed. If it has, the same steps are followed as if the step key has been depressed as discussed above. If the translate key has not been depressed, CPU 204 then determines whether query key 488 has been depressed. If it has, the QUERY START subroutine is entered from the top. If query key 488 has not been depressed, CPU 204 determines whether backspace key 490 has been depressed. If it has, CPU 204 checks whether the character count is zero. If the character count is not zero, the character count is decremented by one, the data stored in the display memory of RAM 202 is shifted to the next lower location, losing the data in the lowest location, and CPU 204 returns to the DMAIN subroutine of FIG. 9. If the character count is zero, CPU 204 simply returns to the DMAIN subroutine of FIG. 9. If backspace key 490 was not depressed, one of the alphabetic keys A-Z must have been depressed. CPU 204 then determines whether the character count is 16. If it is, the display and the display memory cannot accommodate another character so CPU 204 does not display or store the character represented by the key just pressed, and returns to the DMAIN subroutine of FIG. 9. If the character count is not 16, the character count is incremented by 1, the data stored in the display memory is advanced to the next highest location, the 8 bit character representing the new key that has been depressed is entered in the lowest order location of memory and the new character is displayed on display 470. CPU 204 then returns to the DMAIN subroutine of FIG. 9. FIGS. 15 and 16 represent the SEARCH subroutine. Two registers in RAM 202 are used to store pertinent ROM 300 addresses. At the end of the search routine, the Start Address register indicates the ROM address of the beginning of the found word (the contents of which are transferred to the ROM Module Address storage area of RAM 302 in FIG. 8). The Next Address register indicates the ROM address of the beginning of the source word after the word that has been found (so that, in the QUERY mode, the search for the next matching word will not duplicate the portion of ROM 300 already searched). Initially, both the Start and Next Addresses are loaded to the address where the search will begin. Generally, the search is conducted by comparing the first character of the word to be searched for with the first character of an appropriate word in ROM 300 until a match is found. Next, the second characters of each are compared. If they match, the third characters of each are compared. If they do not match, the first character of the next appropriate word in ROM 300 is compared with the first character of the word being searched for. The process continues until a perfect match is found, or the entire table is searched. A register in RAM 202 called Argument Length stores the position of the character of the word being searched for that is being or will next be compared (called the image character). This register is initially set to 16, the maximum length that an entered word may be. Removal of the spaces from the left portion of the image field (corresponding to a higher number Argument Length) is first performed. CPU 204 determines if the image character is a space. If it is, the Argument Length register is decremented. If the Argument Length register is now zero, CPU 204 returns to the place from which the SEARCH subroutine was called without a match, since all the image characters were spaces. If the register is not zero, CPU 204 determines if the presently indicated image character is a space, and so on. If the image character is not a space, CPU 204 determines the order of translation. Either the first of the pair of ROM 300 sequences can be searched (the source) with the second sequence displayed as the desired translation (the translation), or the second sequence of the ROM 300 entry can be searched (the source) with the first sequence displayed as the desired translation (the translation). If the first sequence is the source, CPU 204 executed the SLOOP subroutine of FIG. 16, since the Start Address is pointing to the first character of the source word. If the second sequence in the source, the first location of the character of the source must be entered in the Start Address. The ROM 300 byte pointed to by the Start Address is retrieved, and the Start Address is incremented. CPU 204 determines whether this byte is the end of the ROM table. If it is, CPU 204 returns to the place from which the SEARCH subroutine was called with no match, since the second sequence of the ROM data was never found in the table. If the byte is not the end of the table, CPU 204 determines whether the byte is the end of the first sequence. If it is, the CPU enters the SLOOP subroutine of FIG. 16. If it is not, the CPU retrieves the next ROM byte as indicated by the Start Address, and proceeds as above. Referring now to FIG. 16, when CPU 204 enters the SLOOP subroutine, the Start Address indicates the location of the first character of the appropriate word in ROM 300 to be searched. This character is retrieved from ROM 300 and compared to the image byte. If they do not match, CPU 204 enters the NOMATB subroutine described below. If the two bytes do match, CPU 204 determines if the Argument Length is zero, indicating all the characters matched and, therefore, a matching word has been found. If the Argument Length is zero, CPU 204 then searches for the beginning of the next first sequence of ROM 300 so the search for the next match will continue from where it left off, if the device is in the QUERY sub-mode. The Start Address is incremented. CPU 204 then determines if the ROM byte is the end of the table. If it is not, CPU 204 determines if the ROM byte is the end of the second sequence. If it is not, CPU 204 jumps to the SFARG subroutine and the ROM 300 byte indicated by the Start Address is retrieved. If the byte does represent the end of the table, the Start Address is set to the highest possible number (FFFF in hexadecimal) to indicate for the QUERY sub-mode that the last match has been found. If the byte is the end of the second sequence, which is what is eventually desired, CPU 204 continues as if the byte were the end of the table. The data in the Start Address, which currently holds the address of the beginning of the first sequence of the ROM 300 pair after the matched word, and the data in the Next Address, which currently holds the address of the location of the beginning of the first sequence of the matched word, are then exchanged and CPU 204 returns to the point from which the SEARCH subroutine was called with a match. If the Argument Length is not zero, more comparisons must be made to determine if the words match. The Argument Length is decremented, the Start Address is incremented, and CPU 204 determines if the previously retrieved ROM byte is the end of either a first or second sequence. If it is an end, the ROM word is shorter than the entered word, so there is no match and CPU 204 enters the NOMATB subroutine. If the ROM byte is not an end, CPU 204 re-enters the SLOOP subroutine and the ROM byte indicated by the Start Address is retrieved for comparison. The NOMATB subroutine is entered when no match has been found in order to place the location of the beginning of first sequence of the next ROM 300 pair in the Start Address. The most recent ROM byte to be retrieved is examined to determine if it is the end of the second sequence. If it is, the Start Address contains the location of the beginning of the first sequence of the next pair in ROM 300, and CPU 204 returns to the SEARCH subroutine of FIG. 15 to begin the process for the next ROM word. If the most recently retrieved byte is not the end of the second sequence, CPU 204 determines if the byte is the end of the table. If it is, the search is ended, and CPU 204 returns to the point from which the SEARCH subroutine was entered with no match. If the byte is not the end of the table, the location in Start Address is accessed and the Start Address is then incremented. CPU 204 then returns to the NOMATB subroutine. Referring to FIG. 5a, the circuitry, keyboard and display are mounted on or in a housing which may be of any suitable material, e.g., a hard plastic. The unique apparatus of this invention finds particular utility as a hand-held unit. For example, the unit can be 6".times.3".times.11/4" thick. The basic unit can, if desired, be built into or temporarily coupled with a portable desk unit which can contain a magnetic tape cartridge drive and/or a small thermoprinter and/or an acoustic coupler. With a system of this type, up to 500,000 characters of storage could be used to allow for storage of large dictionaries, phone directories, sections of legal or medical information and books of facts. A print capability would then allow for hard copy recording of retrieved information. Telephone interface capability would permit sending and receiving of stored information to and from a remotely located computer. The unit is preferably powered by rechargeable batteries and may include, as an accessory, a compact battery charge unit capable of fully recharging the unit within 16 hours. IV. DETAILED PROGRAM LISTINGS The following lists all of the specific steps for carrying out the functions described above using the instructions in the above-mentioned MCS-48 Microcomputer User's Manual. The calculator steps are conventional and not listed. ##SPC1## ##SPC2## ##SPC3## ##SPC4## ##SPC5## ##SPC6## ##SPC7## ##SPC8## ##SPC9## ##SPC10## ##SPC11## ##SPC12## ##SPC13## ##SPC14## ##SPC15## Other capabilities such as a digital clock and a calendar or providing a game, can, of course, be incorporated without departing from the scope of the invention. Many other changes and modifications in the above-decribed embodiment of the invention can, of course, be carried out without departing from the scope thereof. Accordingly, that scope is intended to be limited only by the scope of the appended claims.
|
Same subclass Same class Consider this |
||||||||||
