HTBasic Help
×
Menu
Index

Using LABELCHR.BAS

 
LABELCHR.BAS is an example program that can be used to examine the definitions of characters, or develop new definitions. LABELCHR.BAS will not fully automate the task of adding characters, but is presented as an aid in developing character definitions.
 
When you run LABELCHR.BAS the screen will be painted with four grids. Grid #1 will be blank and is the current grid. Grid #2 displays an ASCII table of existing LABEL definitions for characters in the range 128 to 255. (The grid is actually too small to enclose all the characters. It is normal for the last row and last column to be displayed outside of the grid.) Grid #3 displays the letter "g", a good example of where a descender is located in the character cell. Grid #4 displays the letter "H", a good example of where an uppercase letter is located in the character cell.
 
The softkey menu displays the available choices. Softkey 1 is "Digitize Char", 2 is "Display Char", 3 is "Which Grid?", 4 is "Erase ON/OFF", 5 is "Show Chars", and 8 is "EXIT". Pressing "EXIT" will cause the program to end; control is returned to the BASIC system. Pressing "Which Grid?" will specify one of the four grids as the current grid. Pressing "Show Chars" will display an ASCII table in the current grid. The table is just like the one displayed in grid 2 at start up, unless you have changed some character definitions.
 
Pressing "Display Char" will display a character in the current grid. You will be asked to input the character you wish to display. Type the character and hit ENTER, or type the NUM of the character and hit ENTER. Depending on the Erase Flag, the character will be displayed on a fresh grid, or it will be displayed on top of the old contents of the grid. This capability is useful when building a new definition based on existing characters.
 
Pressing softkey 4, the "Erase ON/OFF" flag is toggled between ON and OFF. When ON, the current grid is cleared before each character is displayed. When OFF, the current grid is overlaid with each displayed character. An asterisk, "*", is displayed next to the ON or OFF to show the current state of Erase.
 
Pressing "Digitize Char" allows you to construct a new character definition. Typically, you would display in one or more of the grids whatever characters will assist you in creating a new definition, and then you would display in the current grid a character that is most like the new one you wish to define. Then you would press "Digitize Char" and begin digitizing the new character. You may use a mouse, or the arrow keys to move the cursor in the grid.
 
When using a mouse, move the cursor to the desired coordinate and then press the left button to Draw or the right button to Move there. Click either mouse button with the cursor outside the grid to end the definition. If using the arrow keys, move to the location you wish to Move/Draw to and press ENTER. The softkey menu will change, displaying "Draw", "Move", and "Digitize Done". Press "Move" or "Draw". When you are done, press ENTER and then "Digitize Done".
 
As each point is digitized, the correct value to use in CHR$ is printed on the display line. You should write these values down and use them when constructing your definitions. When you are done digitizing a character you are given the option of immediately assigning it to a character. If you wish to do so, enter the NUM of the character; if you do not wish to do so, enter -1 for the NUM. If you immediately define the character, you can then see it using "Display Char" or "Show Chars". The definition lasts until you QUIT HTBasic.