back to Command Reference
DEFCHR$
[All Models] [Undocumented: codes 252-255]
Purpose
Define custom character display patterns.
DEFCHR$(code) = "hex_pattern"
Example
DEFCHR$(252) = "FFFFFFFFFF"
PRINT CHR$(252)
Parameters
- code: Character code to define (252 to 255).
- hex_pattern: A 12-character hexadecimal string defining the 5x7 pixel
character pattern.
Explanation
- Defines a custom display pattern for the character at the specified code.
- The character codes 252 through 255 (the last 4 character codes) are
available for user-defined characters.
- The hex pattern is a 12-character hexadecimal string. Each pair of hex
characters is assigned from left to right to define the pixel columns of
the character in a 5x7 grid.
- Once defined, the custom character can be displayed using
PRINT CHR$(code).
- Custom character definitions are lost when the calculator is reset.
See
Sample Program
10 DEFCHR$(252) = "FFFFFFFFFF"
20 PRINT CHR$(252)
Defines a custom character at code 252 and displays it.