─── Box of knowledge ───
The procedure for constructing windows.
Small introduction.
Recently, the other day, when I called Rulez
(aka R.S. aka Shurik Ragozin), I listened
in the receiver, mournfully cry about what kind of
ryag in NETUS NEWS with material(*).
And now I’m rushing to help.
In general, people, I give you my windows
and several programs in the package with them. All
this was written in December 97 and since
hasn't changed since then, don't try to find it
there's fancy code: it's simply not there,
but overall everything works.
So, first I’ll outline all the pros and cons
nuses the program, and then I’ll crawl over to it myself
description.
Pros:
1 - quite fast;
2 - can do relatively a lot.
Cons:
1 - quite slow;
2 - knows relatively little;
3 - somewhat stressful data format for
print.
4 - large in volume (about a kilo).
Well, although there are more minuses than pluses,
owls, it’s still better than nothing and besides
it works (probably).
Well, here’s a description of the package itself.
First, let's go through the related
program Printing procedure - PRINT uses
font 64 characters, matrix dimensions 4*6, 256
characters. Quite fast, although not a fountain.
Contact her:
in HL - text address;
in DE - address on the screen;
in A - the number of letters divided by 2.Uses a font that is 4096 bytes long
located from address #B000. The font itself is long
Noah in 1536 bytes is loaded to any address,
then the program DECHR IX is unpacked -
font download address. Prog RAMPAGE clicks
pages, in A - the logical number of the country
prostrate Oops, I forgot, RAMPAGE is fixed on
Scorpio and similar computers. Subprogram
ma ADDR_AT - counts addresses in ekram% and at-
ributah.
Login:
D - X coordinate.
E - Y coordinate.
Output:
HL - address on the screen.
DE - address in attributes.
Now let's move on to the windows themselves.
1 - the number of nested windows is not limited.
2 - the buffer for the saved background begins
from the WIND_BU label in this version from the address
#C121, more specifically, in jar 14
Scorpov's memory.
3 - buffer for the addresses of the Windows data starting
is found from the WIND_ST label i.e. from address #C120
and goes down. a buffer of 32 bytes is enough for
16 nested windows.
4 - frames live in the file "BOX_SPR". B
memory they must be located at the address
#C000 in 14 jar.
How to initialize Windows:
Use the INITWIN program.
How to open a window:
in IX - the address of the descriptor, then CALL OP_WIND
if the window does not retain the background, then
It’s better not to fill up the address buffer and use
call not OP_WIND, but CALL WIND
How to close a window:
CALL CL_WIND - last open window
closes. Open windows close
only by op_wind.
Header format description:
The length of the descriptor may vary fromminimum - 6 bytes, to maximum -
21 bytes. Coordinates are counted starting from 0
i.e. 0-31 in X and 0-23 in Y
1 - initial horizontal coordinate;
2 - initial vertical coordinate;
3 - window height;
4 - window width;
5 - system byte;
6 - frame color;
7 - the color of the window itself;
8,9,10,11 - window fill bytes;
12,13 - header address;
14,15 - data address for printing;
16,17 - text address for printing;
18,19 - data address for horizontal
lines;
20,21 - data address for vertical lines
ny.
System byte descriptor:
bits are counted from 0 to 7;
the bit is set - yes, reset - no.
7 - saving the background under the window;
6 - filling. if the bit is reset then the window is not
will be filled not only with fill bytes
but also an attribute. If you just want
clean the window then it needs to be filled
setting fill bytes to 0;
5 - title;
4 - vertical lines;
3 - horizontal lines;
2 - text printing;
1 and 0 - not used.
Fill:
Standard option - #55,#55,#AA,#AA
although any other is possible.
Heading:
Only English letters, due to the fact
that a custom font is used, ending
header - code greater than 128.
Print data:
1 byte - number of words (lines) then 3
descriptor byte╛╛ words (strings) descriptor
words:
1 byte - high byte of the screen address;
2 bytes - low bytescreen address;
3 bytes - the number of letters divided by 2;
Example:
┌─ number of words
│ ┌─ descriptor 1 word
│ │ ┌─ 2 words
│ ┌──┼──┐ ┌──┼──┐
DATA DB 2,#40,#01.9,#40,#21.9
TEXT DB "print data"
DB "font 4*6 in window"
Data for horizontal lines:
1 byte - number of lines,
then 3 bytes of line descriptor
Line descriptor:
X and Y coordinates in familiar places.
1 byte - X coordinate;
2 bytes - Y coordinate;
3 bytes - line length.
Data for vertical lines:
The descriptor is the same as for horizontal
tal.
Well, that's all.
With best wishes, Oleg Dokukin aka
Light - D.C.G.
Comment by R.S.
Source code of the program in assembler format
STORM is included in the newspaper supplement. There
There is also a font and a table with frames.
P.S. Reprint of this material and publication
glee of this program in any other
publications are only allowedwith permission
author.
For any questions please contact
at VEC-04.00
-------------------------------------------
* with good material. Main note:
th editor.
Share your thoughts about the article