
+-----------------------------------+
│(1,1) Whole screen│
│ │
│ +-------------------+ │
│ │(y1,x1) │ │
│ │ │ │
│ │ │ │
│ │ (y2,x2)│ │
│ +-------------------+ │
│ Attribute setting region │
│ │
│ (ymax,xmax)│
+-----------------------------------+
ymax=30, xmax=80
This function changes the attributes of all characters included in
the rectangle region specified by y1,x1,y2,x2.
Specify the bit pattern of newly set attributes in "attr" as follows.
15 8 7 0
+------------------------+------------------------+
│ 0 0 0 Ib Bb Gb Rb I │ B G R r b 0 0 0 │
+------------------------+------------------------+
B: Blue r: Reverse
G: Green b: Blink
R: Red
I: Low intensity
Bb:Background Blue
Gb:Background Green
Rb:Background Red
Ib:Background Low intensity
The available setting values are as follows.
Normal Reverse Blink Reverse+Blink
Black 0x0000 0x0010 0x0008 0x0018
Red 0x0020 0x0030 0x0028 0x0038
Green 0x0040 0x0050 0x0048 0x0058
Yellow 0x0060 0x0070 0x0068 0x0078
Blue 0x0080 0x0090 0x0088 0x0098
Magenta 0x00a0 0x00b0 0x00a8 0x00b8
Cyan 0x00c0 0x00d0 0x00c8 0x00d8
White 0x00e0 0x00f0 0x00e8 0x00f8
Actually, 4-bits of "IRGB" and "IbRbGbBb" indicate the palette index
number of character and background.
Specify the logical operation method of attribute setting in "op".
op Operation Set attributes
-------+---------------+-----------------
3 Set attr
2 Set negative attr
0 Or Char_attr │ attr
1 And Char_attr & attr
4 Xor Char_attr ^ attr