📄 chedit.txt
字号:
1 WHY A CHARACTER SET EDITOR?
On an IBM-PC or compatible computer using a Color Graphics Adapter (CGA),
there are several display modes. You can have straight text in several modes,
such as 25 by 40 or 25 by 80 in either black & white or color, or you can
select a graphics display mode. In graphics, however, you still have the
option of using text on the screen. Although the hardware will not print
characters to the screen, the computer's BIOS software is capable of generating
the standard letters, numbers, and special characters of normal ASCII.
All this would be mundane unless there was something you could do about
changing the characters to suit your tastes. Fortunately, there is a way of
doing this. While the normal ASCII characters are defined for graphics modes
in the BIOS, the extended ASCII characters (those characters with codes
between 128 and 255) are not defined, and are available for the programmer to
use. Thus, while in graphics mode, you can define and display your own custom
characters.
The only problem remaining is how to create and display these characters.
Drawing 128 different shapes, each of which has 64 elements is tedious at
best, and telling the computer how to use them is even more difficult. It is
these tasks that the programs in the CHEDIT package address.
The CHEDIT package consists of a character editor and libraries of support
routines that allow you to use the customized characters in your programs.
The required hardware is an IBM-PC, XT, AT or compatible with a color graphics
card. A monochrome text adapter card is not capable of using the created
character sets or the CHEDIT program.
2 RUNNING THE CHEDIT PROGRAM
To run the CHEDIT program, enter the following at the DOS prompt:
CHEDIT <filename>
where <filename> is optional, and is the name of the character set you want
to edit. If an extension is not supplied, .CHR is appended to the filename.
Upon entry to the program, if a character set name has not specified at the
DOS prompt, or if that file cannot be found, you are given several options:
1) Enter the name of the character set file. If an extension is no
supplied, .CHR is appended to the filename.
2) Enter a Return on a blank line to create a new character set.
3) Press the F1 key to select a name from a directory listing of all
files with a .CHR extension. The Esc key aborts the directory
selection process, and behaves as if you had used a blank filename.
4) Press Esc to abort the program.
Once a character set has been selected, the main menu follows:
1) Save the current character set.
You are asked for a name, and if you were already working on a character
set, a Return press alone defaults to the original name. Pressing Esc
returns you to the main menu. If the filename does not have an extension,
2) Read a new character set.
If you have done any editing, whether or not any changes have actually
occured, you are warned if the current character set has not been saved,
and asked if you want to continue. If you select No, you are returned to
the main menu.
If you continue, you are asked for the name of the character set. The
filename given is checked for an extension and if none is found .CHR is
appended. A Return press by itself at the name prompt will return you to
the main menu. Pressing F1 allows you to select a directory to be checked
for .CHR files. When the directory is displayed, pressing Return selects
the currently highlighted file, and Esc returns you to the main menu.
3) Edit Individual characters (edit one character at a time).
See the description of individual character editing below.
4) Edit Multiple characters (edit multiple characters at a time).
See the description of multiple character editing below.
5) Change the cursor blink speed.
The default cursor in CHEDIT blinks regularly so that its location is more
visible. However, if you do not like the blink speed, or do not want it to
blink at all, this option will allow you to change it. You are asked
to select from Slow, Regular, Fast, or No blinking for your cursor. Simply
press the indicated letter, or press Return to use the default regular.
6) Quit the program.
Although Esc will stop the program elsewhere, a Q is required to exit the
program from the main menu. This is done because Esc is used to return from
editing to the main menu, and a double character would stop the program before
you have a chance to save your work. If you have done any editing, whether or
not any changes have actually occured, you are warned if the current
character set has not been saved, and asked if you want to continue. If you
select No, you are returned to the main menu.
3 INDIVIDUAL CHARACTER EDITING
When Individual character editing is desired, only 1 character is displayed
in large format to be modified at a time. The primary advantage of this mode
is that it is easier to see what is being done, and character selection is
simpler. This mode is used primarily when working on individual characters,
such as letters in an alphabet, when you want to see the maximum detail.
When editing individual characters, the screen has 4 basic parts:
1) a display of all programmable characters at the top of the screen,
arranged in a 4 by 32 matrix, and set off from the rest of the screen
by a box.
2) a large box broken into an 8 by 8 grid, which is the large character
display. Each little box represents 1 pixel in the character being
edited.
3) a character box. This is the "life-size" character being edited,
set apart from the rest of the screen in its own box. Note that the
character set displayed at the top of the screen is updated as
characters are edited as well.
4) a text area, where informational messages, such as currently
available options, the code of the character being edited, etc, are
displayed.
3.1 SELECTING A CHARACTER TO EDIT:
Before editing begins, you must select a character to work on from the set
displayed at the top of the screen. Pressing Esc at this time will return
you to the main menu.
To select a character, you may either move the highlighted square around
the characters via the cursor keys, or press the N (for numeric) key to
enter the numeric code of the desired character. When moving the highlighted
square, the current code of the character, along with a large image of the
character, is displayed.
When using the cursor control keys on the numeric keypad, both the arrow
keys (2,4,6, and 8) and the other keys (1,3,7, and 9) are active. The
arrow keys move the cursor in the indicated direction, while the other
cursor keys move the cursor in a diagonal. When the cursor passes the
boundary of the displayed characters, it wraps back to the opposite side
of the display.
The numeric code for each character is a number, either from 0 to 127, or
from 128 to 255, representing the location of the character. The values 0
to 127 represent the character's location in the editing set, while the
values 128 to 255 represent the extended ASCII code used to reference the
character from various languages or system calls. The routines used
within the editor will recognize either code. When using the N option in
selecting characters, a prompt of "which code?" appears, and at this point
you enter a number. This number is taken modulo 128, and the highlighted
square is placed in this character position.
When you are satisfied with your selection, press either S (for select)
or Return to begin editing this character.
3.2 EDITING A CHARACTER:
There are many options available while editing characters, and they will
be discussed in functional groups below. Note that for all cursor movement,
if the cursor is moved off the edge of the character, it returns on the
opposite side of the character. For example, if the cursor is moved up from
the top row, it returns on the bottom row.
3.2.1 CURSOR MOVEMENT GROUP
(Use the key indicated on the numeric keypad for the command):
DOWN - Also the 2 key on the numeric keypad. This moves the cursor 1 row
down in the character being edited.
UP - Also the 8 key on the numeric keypad. This moves the cursor 1 row up
in the character being edited.
LEFT - Also the 4 key on the numeric keypad. This moves the cursor 1 column
left in the character being edited.
RIGHT - Also the 6 key on the numeric keypad. This moves the cursor 1 column
right in the character being edited.
The following keys move the cursor in diagonal directions.
HOME - Also the 7 key on the numeric keypad. This key, between the UP and LEFT
arrows, moves the cursor UP 1 row and LEFT 1 column.
PgUp - Also the 9 key on the numeric keypad. This key, between the UP and
RIGHT arrows, moves the cursor UP 1 row and RIGHT 1 column.
END - Also the 1 key on the numeric keypad. This key, between the DOWN and
LEFT arrows, moves the cursor DOWN 1 row and LEFT 1 column.
PgDn - Also the 3 key on the numeric keypad. This key, between the DOWN and
RIGHT arrows, moves the cursor DOWN 1 row and RIGHT 1 column.
3.2.2 "SPACEBAR" GROUP
This group of functions is the basic mechanism for setting and clearing
pixels in a character. The commands in this group are
(Use the capital letter for the command itself):
SPACEBAR - change the state of the pixel, according to the mode defined
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -