Background of the Invention
The embodiments of the present invention relate to a portable computer that operates by application programs.
Many conventional portable computers store a plurality of application programs having program running-start lines that correspond to different keys so that a desired program is designated by a single key input. In such computers, each program running-start line has a label that corresponds to a particular key and enables a desired program to be run when the key corresponding to the particular program is depressed.
However, the above-described conventional portable computer must retrieve each label for every program in order to determine the appropriate program running-start line corresponding to a key input. Therefore, the computer will take a long amount of time to locate the appropriate program running-start line where the amount of time is proportional to the program capacity. As a result, a slow processing speed will occur.
Summary of the Invention
An object of the embodiments of the present invention is to provide a computer having a high processing speed.
Another object of an embodiment of the invention is to provide a portable computer that retrieves a program running-start line of a program in response to a key input. The address of the program running-start line that is retrieved is stored in a memory so that the program corresponding to the key input of the program running-start line is executed only with reference to the address stored in the memory without having to retrieve the program.
Briefly described, in accordance with the embodiments of the present invention, a portable computer includes a memory for storing the address of the program running-start line of the previously executed program, a decision unit for determining the presence or absence of the address of the program running-start line in the memory for the program corresponding to a key input and a processing unit for executing the program that corresponds to the key input when the address of the program running-start line for the program corresponding to the key input exists in the memory or for storing the address of the program running-start line for the program in the memory and running the program when the address does not exist in the memory.
Brief Description of the Drawings
The embodiments of the present invention will become more fully understood from the detailed description given hereinbelow and the accompanying drawings which are given by way of illustration only, and thus are not limitative of the present invention, wherein:
FIG. 1 shows the functional block configuration of an embodiment of the present invention;
FIG. 2 shows the appearance of the embodiment of the present invention;
FIG. 3 shows the hardware construction of the embodiment of the present invention; and
FIG. 4 is a flow chart that explains the processing sequence of the embodiment of the present invention.
Description of the Preferred Embodiment
FIG. 1 shows the functional configuration of the portable computer in an embodiment of the present invention. Referring to FIG. 1, a key input unit 1, a memory 2, a decision unit 3, and processing units 4 and 5 are shown.
The key input unit 1 designates a program running-start line for an application program that is written in BASIC. The memory 2 stores the address of the program running-start line for the previously executed program. The decision unit 3 determines whether or not the memory 2 retains the address of the program running-start line that corresponds to a key input from the key input unit 1. In response to the determination by the decision unit 3, the processing unit 4 runs the program from the program running-start line that corresponds to the key input. When the decision unit 3 determines that the address does not exist in the memory 2, the processing unit 5 stores the address of the program running-start line in the memory 2 that corresponds to the key input.
In the computer of the present embodiment, the decision unit 3 determines whether or not the address for the program running-start line that corresponds to the key input has been stored in the memory 2 in response to a key input from the key input unit 1. If the corresponding running-start line has been stored in the memory 2, the processing unit 4 executes the appropriate program from the program running-start line. If the corresponding running-start line has not been stored in the memory 2, the processing unit 5 stores the address of the program running-start line in the memory 2 and the processing unit 4 simultaneously executes the appropriate program from the program running-start line.
FIG. 2 shows the appearance of the portable computer for the present embodiment. The portable computer is small enough to be hand held when operated, and may be folded in two for carrying convenience. Referring to FIG. 2, a liquid crystal display (LCD) 5 and a keyboard are shown.
Input keys for inputting numerals and other data, operational keys for four rule calculations, and various function keys are arranged on the keyboard 7. Among the function keys are the keys "A", "B", "C", "D", "J", "K", "L" and "M" that correspond to the labels "A", "B", "C", "D", "J", "K", "L"and "M"and are respectively assigned to the program running-start lines in the BASIC application programs. A user is required to make application programs having labels that correspond to the function keys "A", "B", "C", "D", "J", "K", "L" and "M" (hereinafter referred to as definition keys) that are allotted to the respective program running-start lines. (Such programs are hereinafter referred to as definition programs.) To execute a particular program, the user depresses the definition key that corresponds to the label of the particular program.
FIG. 3 shows the hardware construction of the portable computer of the present embodiment. The LCD 6, the keyboard 7, a CPU 10, a display controller 11, an I/O device 12, a ROM 13 and a RAM 14 are shown in FIG. 3.
The CPU 10 processes data according to various programs stored in the ROM 13. The ROM 13 is connected via a bus line 16 to the CPU 10. The CPU 10 also activates the decision unit 3 and the processing units 4 and 5 that are shown in FIG. 1 in order to perform their functions.
The LCD 6 is driven by the display controller 11 which contains a display buffer 11a for storing display data (dot data). The keyboard 7 supplies the CPU 10 with a code signal that corresponds to a key input.
The ROM 13 includes a region 13a for storing a system program and the system program has a key-processing program and I/O device control programs, a region 13b for storing a BASIC language interpreter, a region 13c for storing a calculation program which simulates the functions of a desk top calculator, and a region 13d for assigning a character pattern generator (abbreviated as CG) which develops a dot pattern from the code data of characters supplied by the CPU 10 to output to the display in this embodiment.
Like the ROM 13, the RAM 14 is also connected via the bus line 16 to the CPU 10. The RAM 14 includes a region 14a for storing BASIC application programs written as desired by the user, and a region 14b for various buffers and counters. The system region 14b includes a program running-start address buffer 14c for storing program running-start line addresses which will be described later.
The I/O device 12 is connected via a bus line 17 to the CPU 10. The I/O device 12 contains external deviceconnecting terminals for data communication with external devices (such as a printer and a magnetic disc device). The external devices are connected to the terminals according to the I/O device control programs stored in the ROM 13.
FIG. 4 is a flow chart showing the processing sequence of the portable computer of the present embodiment. The procedure for designating a program running-start line of a particular program by a key input for executing the particular program is described below with reference to the flow chart of FIG. 4.
When a certain key is depressed (step S0), the key processing program determines whether or not the key is a definition key (S1). If the key is not a definition key, the program determines whether or not the key is an I/O instruction key (S2 and S3). If the key is an I/O instruction key, the key input is processed according to an I/O device control program (S11 and S12 or S13). Otherwise, the key input is processed according to the calculation program (S14).
If the depressed key is determined to be a definition key in step S1, the presence or absence of the program that corresponds to the key input is checked in steps S4 through S6 by the following method. First, the content of the program running-start address buffer 14c is checked (S4). The buffer 14c stores the labels and addresses of the program running-start lines for the previously executed programs. The content of the buffer 14c is checked to determine whether or not the data of the label and address for the program running-start line that corresponds to the definition key input (S5) is contained thereon. If the data is contained in the buffer 14c, the CPU determines that the corresponding data has been previously executed and the program running-start address data (S7) is fetched in order to start running the program from the fetched address (S10).
If the program running-start address buffer 14c does not contain the program running-start address data that corresponds to the definition key input, then the CPU determines that the program has never been executed. The CPU searches for the program that has the label corresponding to the definition key for all of the application programs stored in the RAM 14 (S6). When an appropriate program is not found, the CPU waits for the next key input. When an appropriate program is found, the label and address of the program running-start line are stored in the program running-start address buffer 14c (S9) so that the program can be executed in the future only by depressing the appropriate definition key. Finally, the program is executed (S10). When the same definition key is depressed in the future, the CPU surveys the program running-start address buffer 14c and retrieves the label and program running-start line address that corresponds to the definition key for executing the program from the program running-start line.
The data of the labels and addresses of the registered program running-start lines are cleared (S12) when a program is input through the I/O device 12 by depressing the input instruction key (S11).
According to the present embodiment, as mentioned above, a program running-start line for a program is retrieved in response to a key input. When the appropriate program running-start line address is found, the address is stored in the memory and the computer is enabled to execute the program in the future in response to the appropriate key input by referring to the address stored in the memory without looking for the program in each of the application programs. Thereby, the program retrieval task time is substantially reduced and the processing speed is increased.
While only certain embodiments of the present invention have been described, it will be apparent to those skilled in the art that various changes and modifications may be made therein without departing from the spirit and scope of the present invention as claimed.