English
Language : 

EF9345 Datasheet, PDF (19/38 Pages) STMicroelectronics – HMOS2 SINGLE CHIP SEMI-GRAPHIC DISPLAY PROCESSOR
EF9345
Variable Codes
In many cases, successive characters on screen
belong to the same character set and have the
same attributes. Variable codes achieve memory
saving by storing B and A bytes only when it is
required by exploiting the C7 bit.
C7 = 1 This is a long 3-byte code.
Character set and attribute values are
completely redefined by B and A bytes.
C7 = 0 This is a short 1-byte code.
Character set and attributes value are
identical to the previous code.
A further saving comes from the fact that an accen-
tuated alphabetic character is, more often than not,
followed by a not accentuatedalphabetic character.
So, G20 or G21 sets are processed as one-shot
escape with return to G0. For normal operation,
variable codes should obey the following rules :
- The first character code of any row (X = 0) should
be long.
- A character code may be short when it has the
same attributes as the previous character code
and belongs to the same set.
Figure 17 : Expansion/Compression Move
EXP and CMP
COMMANDS
0
R1
-
R2
-
R3
-
R4 ZW, YW
R5 BF, XF
R6 D, Y YW
R7 B, X
However :
- Any code belonging to G20 or G21 must be long
and must be repeated if the character is double
width,
- A code belonging to G0 following a G20 or G21
code may be short.
Handling the Variable Codes
During the display process, a row of variable code
should be laid in an 80/120 byte row buffer. The
first buffer holds the C bytes. The second buffer
holds the B, A file providing up to 20 long codes per
row (Figure 18). In the exceptional case when this
is not enough, the second buffer overflows in the
third one. Every code may then be long. Variable
codes can almost always achieve a memory saving
over long fixed codes and can never be worse.
The KRV command gives a very easy sequential
access to/from a row buffer from/to the microproc-
essor. This command automatically updates the C
byte and B, A file pointers (the last one when C7 is
set).
X
39
DW
B
BW (even)
EXPANDED
CODE
A
BW + 1
D
C
B (even)
Y
VARIABLE
CODE
BA
B + 1 = BF
XF
19/38