396
|
1 PROCEDURE witestb
|
|
2
|
|
3 (* Witestb
|
|
4 (* Copyright November 1987 by Ron Lammardo
|
|
5 (* This program placed into the Public Domain as demonstration
|
|
6 (* detailing use of the WInfo subroutine from a Basic09 calling
|
|
7 (* program
|
|
8 (*
|
|
9
|
|
10 TYPE winf=buff1(7):BYTE; buff2(10):BYTE; bpr:INTEGER; buff3(11):
|
|
11 BYTE; drcrx,drcry:INTEGER; edtn:BYTE; weadr,devm:INTEGER; filler:
|
|
12 STRING[33]; pregs(16):BYTE; ermsg:STRING[40]
|
|
13 DIM wi:winf
|
|
14 DIM wname:STRING[32]
|
|
15 DIM minedition:BYTE
|
|
16 DIM indx1:INTEGER
|
|
17 PRINT
|
|
18 INPUT "Window name :",wname
|
|
19 PRINT
|
|
20 RUN winfo(wname,wi)
|
|
21 IF wi.buff1(1)=$FF THEN
|
|
22 PRINT "The Buffer size is to small for WInfo"
|
|
23 END
|
|
24 ENDIF
|
|
25 minedition=1
|
|
26 IF wi.edtn<minedition THEN
|
|
27
|
|
28 PRINT "You must have WInfo edition #";
|
|
29 PRINT USING "h2"; minedition;
|
|
30 PRINT " or higher"
|
|
31 PRINT
|
|
32 END
|
|
33 ENDIF
|
|
34 PRINT "WI$Stat : ";
|
|
35 PRINT USING "h2"; wi.buff1(1);
|
|
36 PRINT " WI$VDG : ";
|
|
37 PRINT USING "h2"; wi.buff1(2)
|
|
38 PRINT "WI$Sty : ";
|
|
39 PRINT USING "h2"; wi.buff1(3);
|
|
40 PRINT " WI$Block : ";
|
|
41 PRINT USING "h2"; wi.buff1(4)
|
|
42 PRINT "WI$BlCnt : ";
|
|
43 PRINT USING "h2"; wi.buff1(5);
|
|
44 PRINT " WI$Offst :";
|
|
45 PRINT USING "h4"; wi.buff1(6)*256+wi.buff1(7)
|
|
46 PRINT "WI$Cpx : ";
|
|
47 PRINT USING "h2"; wi.buff2(1);
|
|
48 PRINT " WI$Cpy : ";
|
|
49 PRINT USING "h2"; wi.buff2(2)
|
|
50 PRINT "WI$Szx : ";
|
|
51 PRINT USING "h2"; wi.buff2(3);
|
|
52 PRINT " WI$Szy : ";
|
|
53 PRINT USING "h2"; wi.buff2(4)
|
|
54 PRINT "WI$CWCpx : ";
|
|
55 PRINT USING "h2"; wi.buff2(5);
|
|
56 PRINT " WI$CWCpy : ";
|
|
57 PRINT USING "h2"; wi.buff2(6)
|
|
58 PRINT "WI$CWSzx : ";
|
|
59 PRINT USING "h2"; wi.buff2(7);
|
|
60 PRINT " WI$CWSzy : ";
|
|
61 PRINT USING "h2"; wi.buff2(8)
|
|
62 PRINT "WI$Curx : ";
|
|
63 PRINT USING "h2"; wi.buff2(9);
|
|
64 PRINT " WI$Cury : ";
|
|
65 PRINT USING "h2"; wi.buff2(10)
|
|
66 PRINT "WI$BPR :";
|
|
67 PRINT USING "h4"; wi.bpr;
|
|
68 PRINT " WI$CBsw : ";
|
|
69 PRINT USING "h2"; wi.buff3(1)
|
|
70 PRINT "WI$FGPRN : ";
|
|
71 PRINT USING "h2"; wi.buff3(2);
|
|
72 PRINT " WI$BGPRN : ";
|
|
73 PRINT USING "h2"; wi.buff3(3)
|
|
74 PRINT "WI$BDPRN : ";
|
|
75 PRINT USING "h2"; wi.buff3(4);
|
|
76 PRINT " WI$Lset : ";
|
|
77 PRINT USING "h2"; wi.buff3(5)
|
|
78 PRINT "WI$FntGr : ";
|
|
79 PRINT USING "h2"; wi.buff3(6);
|
|
80 PRINT " WI$FntBf : ";
|
|
81 PRINT USING "h2"; wi.buff3(7)
|
|
82 PRINT "WI$PstGr : ";
|
|
83 PRINT USING "h2"; wi.buff3(8);
|
|
84 PRINT " WI$PstBf : ";
|
|
85 PRINT USING "h2"; wi.buff3(9)
|
|
86 PRINT "WI$GcrGr : ";
|
|
87 PRINT USING "h2"; wi.buff3(10);
|
|
88 PRINT " WI$GcrBf : ";
|
|
89 PRINT USING "h2"; wi.buff3(11)
|
|
90 PRINT "WI$DrCrx :";
|
|
91 PRINT USING "h4"; wi.drcrx;
|
|
92 PRINT " WI$DrCry :";
|
|
93 PRINT USING "h4"; wi.drcry
|
|
94 PRINT "WI$Edtn : ";
|
|
95 PRINT USING "h2"; wi.edtn;
|
|
96 PRINT " WI$WEAdr :";
|
|
97 PRINT USING "h4"; wi.weadr
|
|
98 PRINT "WI$Devm :";
|
|
99 PRINT USING "h4"; wi.devm
|
|
100 PRINT "WI$PRegs :";
|
|
101 FOR indx1=1 TO 16
|
|
102 PRINT USING "h2"; wi.pregs(indx1);
|
|
103 PRINT " ";
|
|
104 IF indx1=8 THEN
|
|
105 PRINT
|
|
106 PRINT " ";
|
|
107 ENDIF
|
|
108 NEXT indx1
|
|
109 PRINT
|
|
110 PRINT wi.ermsg
|
|
111 END
|
|
112
|
|
113
|