Appendix Ci Character Codes - Radio Shack TRS-80 Model 4 Owner's Manual

Hide thumbs Also See for TRS-80 Model 4:
Table of Contents

Advertisement

Appendix C/ Character Codes
Text, control functions, and graphics are represented in the computer
by codes. The character codes range from zero through 255.
Code 0 is a prefix code. It tells the video driver to display the special
character for codes 1 - 31. These codes are normally treated as
cursor control commands.
Codes 1 through 31 normally represent certain control functions. For
example, code 13 represents a carriage return or "end of line." These
same codes also represent special display characters. To display the
special character that corresponds to a particular code (1 - 31),
precede the code with a code zero. (Note: Some screen control
characters cannot be entered from the TRSDOS Ready or BASIC
Ready prompts, but can be directed to the screen by program control.
See the CHR$ and ASC functions in the BASIC portion of this
manual.)
Codes 32 through 127 represent the text characters -
all those
letters, numbers, and other characters that are commonly used to
represent textual information.
Codes 128 through 191, when output to the video display, represent
64 graphics characters.
Codes 192 through 255, when output to the video display, represent
either space compression codes or special or alternate characters, as
determined by software. Toggling between these modes is done via
codes 21 and 22.
Code 21 toggles the video driver between space compression codes
and the special/alternate character set. Code 22 toggles the video
driver between the special character set and the alternate character
set. The setting of the toggle controlled by code 21 determines if the
code 22 toggle will have any effect on what is SUbsequently
displayed.
The following chart illustrates the power-up and first toggle states for
codes 21 and 22:
Code 21
Code 22
Power-up state
space compression
special
characters
characters
First toggle state
special/alternate
alternate
characters
characters
At power-up, codes in the range 192 to 255 will produce one or more
spaces (space compression mode). From this point, you can enter the
special character set by outputting a code 21 to the display. You can
then enter the alternate character set by outputting a code 22 to the
display. To switch back to the special set, output another code 22. To
switch back to space compression codes from either the special or
alternate character set, output a code 21.
A-45

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Trs-80 model 4p

Table of Contents