Abstract:
An apparatus for displaying display data in desired representations includes a storage section for storing the display data, a attributes being assigned to data portions of the display data, a display section for reading out the display data from the storage section and displaying the display data with the representations determined in accordance with display codes assigned to the attributes, and a changing section for changing a first display code of the display codes to a second display code. The first display code is assigned to one of the attributes which is selected by an input attribute selection instruction, and the second display code is selected by an input code selection instruction in a code change mode.

Description:
This is a continuation of application Ser. No. 07/908,897, filed on Jul. 8, 1992, which was abandoned upon the filing hereof, which was a continuation of application Ser. No. 07/731,381, filed on Jul. 16, 1991, abandoned, which was a continuation of application Ser. No. 07/330,443, filed on Mar. 30, 1989, abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a method and an apparatus capable of converting an attribute of display data into a code and thereby displaying the data without correcting an application program. 
     2. Description of the Related Art 
     With recent developments in computer techniques, advanced functions such as graphic display, multi-color display, and multi-window display are realized in application programs in order to establish a better man-machine interface. A plurality of color palettes are used in such displays. Display data has an attribute for designating a color palette to be used and is displayed on a color display monitor in accordance with a color set in the color palette. That is, many currently-available application programs are designed for a color CRT. 
     Recently, a lap-top computer has been developed which can be conveniently carried by a user. In such a computer, a flat panel display such as an LCD (Liquid Crystal Display) or a PDP (Plasma Display Panel) is generally used as a display device. These display devices are of a mono-color type in which, for example, data can be displayed by only four representations, i.e., four gradation levels by a hardware limitation of four palettes. For this reason, if a commercially-available application program is directly loaded into the lap-top computer without any modification, color competition occurs to disable discrimination of color boundaries. 
     SUMMARY OF THE INVENTION 
     The present invention has been made in consideration of the above situation and has as its object to provide an apparatus and a method capable of displaying display data having a first attribute in a desired representation without changing an application program. 
     In order to achieve the above object, an apparatus according to the present invention includes a memory for storing display data, each portion of the display data having an attribute corresponding to a color to be used, a changing means for changing a first code of display code data corresponding to an attribute designated among a plurality of attributes to a second designated code, and a display unit for displaying the display data in accordance with the display code data. 
     In order to achieve the above object, a method according to the present invention includes changing a first code of display code data corresponding to an designated attribute to a second designated code, and displaying the display data in accordance with the display code data. 
     As described above, according to the present invention, a code change control routine in an operating system (OS) can be started during execution of an application program by operating predetermined keys, Therefore, at an arbitrary timing during the execution of the application program, a code corresponding to a designated attribute can be changed, Thus, a displayed gradation level can be changed, In this manner, an application program for a color display device can be executed in a computer having a monochromatic display without any difficulty, 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram showing a first embodiment of the present invention capable of changing a code corresponding to an attribute; 
     FIG. 2 is a flow chart describing an operation of the first embodiment; 
     FIG. 3 is a memory map of RAM 12 shown in FIG. 1; 
     FIG. 4 is a schematic view describing an operation of the first embodiment; 
     FIGS. 5A to 5C are views for describing a change of the contents in conversion table 26 shown in FIG. 1; and 
     FIG. 6 is a block diagram showing an arrangement of a second embodiment of the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     A code conversion apparatus according to the present invention will be described in detail below with reference to the accompanying drawings, 
     Referring to FIG. 1, an arrangement of the apparatus according to an embodiment of the present invention will be described. 
     In FIG. 1, microprocessor (CPU) 10, RAM 12 and ROM 14 are connected to system bus 36. CPU 10 controls an operation of the overall apparatus in accordance with programs stored in RAM 12 and ROM 14. As shown in FIG. 3, RAM 12 stores an operating system (OS) and an application program to be executed. A code change control routine is included in the OS. ROM 14 stores a BIOS for controlling data input/output from/to devices connected to bus 36. 
     Keyboard 16 is connected to bus 36 through keyboard controller (KBC) 18. Keyboard 16 includes character keys (not shown), code change start key 40, code change end key 42, and left, right, up and down cursor keys 44, 46, 48 and 50. In a display mode in which the application program is executed, cursor keys 44, 46, 48 and 50 are normally operated. When code change start key 40 is pressed, a code change start instruction is generated and supplied to CPU 10 through KBC 18, thereby setting a code change mode. In the code change mode, keys 48 and 50 are used to select an attribute of display data to be changed. Keys 44 and 46 are used to change a code. When code change end key 42 is pressed, the code change mode is ended, and the display mode is restored. 
     Display controller 20 is connected to bus 36 and has sequencer 23, palette register 24 and conversion table 26. Controller 20 stores display data supplied through bus 36 in memory 22. Memory 22 has area 22-1 for storing display data and buffer area 22-2 for temporarily storing display data. In a graphic display mode, the display data is stored with an attribute in memory 22 in units of pixels. The indentical attribute is assigned to the pixels in a data portion of the display data. In a text display mode, each character is stored with an ASCII code and an attribute. An attribute representing a background representation is also stored. 
     Palette register 24 has, for example, 16 palettes, each of which holds a color code representing one of 64 colors. As described above, display data has an attribute representing a palette to be designated from the 16 palettes of register 24. In order to display data, the display data is read out from memory 22 by sequencer 23 and supplied to register 24 and conversion table 26. In accordance with attributes of the supplied display data, register 24 generates and supplies color codes to driver DRV 32. In accordance with the input color code, driver 32 displays the data on color CRT 34. In desribing this embodiment, however, note that CRT 34 need not be connected. 
     Table 26 receives the same attribute of the display data as that supplied to register 24. Table 26 then converts the attributes of the display data to a gradation code, which is output to driver DRV 28. In accordance with the input gradation code, driver 28 displays the data on plasma display panel (PDP) 30. 
     Operations of the first embodiment of the present invention will be described in detail below with reference to FIG. 2. 
     Assume that color codes are written in register 24 and gradation codes are written in table 26, as shown in FIG. 5A. Assume also that an application program stored in area 12-2 of RAM 12 is currently executed and display data is stored in area 22-1 of RAM 22. This application program is developed for a color display device. 
     When the gradation of data displayed on PDP 30 is not satisfactory, an operator depresses code change start key 40 on keyboard 16 to generate a code change start instruction. The generated instruction is supplied to CPU 10 through KBC 18. If CPU 10 determines in step S2 that the code change start instruction is received, CPU 10 interrupts execution of the application program and sets a code change mode. The data of internal registers are stacked as in a normal interruption operation and then CPU 10 starts the code change control routine in the OS stored in area 12-1 of RAM 12. 
     Upon start of the code change control routine, display data for an area in which a window is to be displayed, as shown in FIG. 4, is saved in area 22-2 of RAM 22 in step S4. When saving of the display data is completed, the display data for a window is written in RAM 22 through controller 20 in step S6 and the data including window 38 is displayed on PDP 30, as shown in FIG. 4. Each numeral at the left-hand side of window 38 represents an attribute of the display data stored in RAM 22 and corresponds to an entry in table 26; each numeral at the right-hand side of window 38 represents a gradation code. The mark &#34;&gt;&gt;&#34; in window 38 represents attributes currently used in display, and the hatched portion in the central region of window 38 represents an attribute currently selected. 
     When window 38 is displayed, CPU 10 waits for an input from keyboard 16 in step S8. When an instruction is keyed in at keyboard 16, the input instruction is checked in steps S10, S14 and S18. If the input instruction is other than an end, select or change instruction, the flow returns to step S8 and CPU 10 waits for the next input. 
     When down cursor key 50 is depressed, a downward select instruction is generated and supplied to CPU 10 through KBC 18. If CPU 10 determines in step S14 that the input is the downward select instruction, step S16 is executed. As a result, the hatched portion at the central region in window 38 is moved downward. If the selected entry is already the lowermost entry, down cursor key 50 cannot function. If up cursor key 48 is depressed, an upward select instruction is generated, and the hatched portion at the central region in window 38 is moved upward. If the selected entry is already the uppermost entry, key 48 cannot function. In this manner, the attribute is selected as the entry to be changed. Thereafter, the flow returns to step S8. In FIG. 5A, in order to change display gradation codes of entry &#34;11&#34; from &#34;1&#34; to &#34;3&#34;, entry &#34;11&#34; is selected by depressing key 50 eleven times. 
     Thereafter, when right cursor key 46 is depressed, an increment instruction is generated. If CPU 10 determines in step S18 that the input is the increment instruction, the display code for entry &#34;11&#34; is changed in step S20 from &#34;1&#34; to &#34;2&#34; as shown in FIG. 5B. In this manner, the gradation code is incremented by one unit each time key 46 is depressed. On the contrary, whenever left cursor key 44 is depressed, the gradation code is decremented one at a time. Thus, data can be displayed on PDP 30 in a desired level of four gradation levels. Since data can be displayed on PDP 30 in only four gradation levels, left cursor key 44 cannot function when the gradation code is 0, and right cursor key 46 cannot function when the gradation code is 3. 
     The first operation described above permits a user to further change the display code of entry &#34;11&#34;: when key 46 is depressed again, the display code of entry &#34;11&#34; is changed from &#34;2&#34; to &#34;3&#34; as shown in FIG. 5C. Thereafter, the flow returns to step S8. 
     When code change end key 42 is depressed, a code change instruction is generated and supplied to CPU 10. If CPU 10 determines in step S10 that the input is the end instruction, it executes step S12. In step S12, the data of the internal register of CPU 10 are recovered from the stack and the display data 22-2 is recovered corresponding locations of area 22-1. Then, the display mode is set and the application program is re-executed from the interrupted step. At this time, since the contents in conversion table 26 have been changed, the data stored in memory 22 is displayed on PDP 30 in accordance with the changed contents. 
     Referring to FIG. 6, a second embodiment of the present invention will be described. Since the arrangement and operation of this embodiment are similar to those of the first embodiment, only the differences will be described below. 
     In the first embodiment, the same entry is input to palette register 24 and conversion table 26. In the second embodiment, however, a color code output from palette register 24 is used as an input for conversion table 26. Therefore, while the conversion table of the first embodiment has 16 entries, the number of entries in the second emboeiment is 64. For this reason, even if a single color is designated by different attributes, the single color can be displayed at a single gradation level. 
     As has been described above, according to the present invention, a color display application program can be directly run without changes by a computer having a mono-color display device such as a PDP. In addition, since a gradation level can be freely selected, no color competition occurs and therefore discrimination between color boundaries is not interferred. 
     The present invention can be apparently applied not only to a change from a color code to a mono-color code but also to that between color codes. 
     While this invention has been described in connection with what is presently considered to be the most practical and preferred embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, but, on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.