| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677 |
- Listing:
- 1 (*========================================================
- 2 == TopSpeed Modula-2 V3.10 ==
- 3 == demo program: ==
- 4 == ==
- 5 == Window Demonstration: Window and Process Modules ==
- 6 == ==
- 7 ========================================================*)
- 8 MODULE WinDemoM ;
- 9
- 10 IMPORT SYSTEM,Window,IO,Lib,Str,Process ;
- 11
- 12 (*%F _mthread *)
- 13 "Make in mthread model only";
- 14 (*%E *)
- 15 (*%T _mthread *)
- 16 (*%T _OS2 *)
- 17 IMPORT Vio,Kbd;
- 18 (*%E *)
- 19
- 20 VAR
- 21 IsBW : BOOLEAN ;
- 22
- 23 TYPE KBFlagSet = SET OF ( RShift, LShift, Ctrl, Alt, Scroll, Num, Cap, Ins ) ;
- ***** ^ not supported yet
- 24
- 25 (*%F _OS2*)
- 26 PROCEDURE KBFlags () : KBFlagSet ;
- 27 VAR R : SYSTEM.Registers;
- 28 BEGIN
- 29 R.AH := 2 ;
- 30 Lib.Intr(R,16H);
- 31 RETURN KBFlagSet(R.AL) ;
- 32 END KBFlags ;
- 33 (*%E*)
- 34
- 35 (*%T _OS2*)
- 36 PROCEDURE KBFlags () : KBFlagSet ;
- 37 VAR
- 38 ks : Kbd.KBDINFO;
- ***** ^ not supported yet
- 39 CurFlags: KBFlagSet;
- ***** ^ not supported yet
- 40 BEGIN
- 41 ks.b := SIZE(ks);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 42 IF Kbd.GetStatus(ks,0)=0 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 43 CurFlags := KBFlagSet(ks.state);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 44 END;
- 45 RETURN CurFlags ;
- ***** ^ not supported yet
- 46 END KBFlags ;
- ***** ^ not supported yet
- 47 (*%E*)
- 48
- 49 PROCEDURE CheckScrollLock () ;
- 50 VAR
- 51 kf : KBFlagSet;
- ***** ^ not supported yet
- 52 BEGIN
- 53 IF Scroll IN KBFlags() THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 54 Process.Lock();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 55 REPEAT Lib.Delay(10) UNTIL NOT (Scroll IN KBFlags());
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 56 Process.Unlock();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 57 END;
- 58
- 59 END CheckScrollLock ;
- ***** ^ not supported yet
- 60
- 61 PROCEDURE SetC ( cc,bwc : Window.Color ) ;
- ***** ^ not supported yet
- 62 BEGIN
- 63 IF IsBW THEN cc := bwc END ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 64 Window.TextColor(cc) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 65 END SetC ;
- ***** ^ not supported yet
- 66
- 67
- 68
- 69 PROCEDURE Intro ;
- 70 (* Display startup and demonstration description *)
- 71
- 72 TYPE W = RECORD x,y : CARDINAL END ;
- ***** ^ not supported yet
- 73 WW = ARRAY[0..29] OF W ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 74 CONST
- 75 ww = WW( W(0,0) ,W(5,0) ,W(10,0),W(15,0),W(20,0),
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 76 W(10,2) ,W(10,4),W(10,6),W(10,8),W(10,10),
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 77 W(5,10) ,W(0,10),W(35,4),W(35,2),W(35,0),
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 78 W(40,0), W(45,0),W(50,2),W(50,4),W(45,6),
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 79 W(40,6), W(35,6),W(35,8),W(35,10),W(65,0),
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 80 W(65,2), W(65,4),W(65,6),W(65,8),W(65,10)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 81 ) ;
- 82
- 83 PROCEDURE IntroText ;
- 84 BEGIN
- 85 SetC(Window.White,Window.LightGray);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 86 IO.WrLn ; IO.WrStr(' This is a demonstration of the ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 87 SetC(Window.Yellow,Window.White); IO.WrStr('Window') ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 88 SetC(Window.White,Window.LightGray); IO.WrStr(' and ') ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 89 SetC(Window.Yellow,Window.White) ; IO.WrStr('Process') ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 90 SetC(Window.White,Window.LightGray); IO.WrStr(' Modules') ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 91 IO.WrLn ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 92 IO.WrLn ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 93 SetC(Window.LightGray,Window.LightGray);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 94 IO.WrStr(' 9 time-sliced processes are created, which output to,');IO.WrLn;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 95 IO.WrStr(' move, re-size and re-colour 4 overlapping windows');IO.WrLn;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 96 IO.WrLn ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 97 SetC(Window.White,Window.White);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 98 IO.WrStr(' Press any key to start, Esc to finish and ScrollLock to freeze ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 99 END IntroText ;
- ***** ^ not supported yet
- 100
- 101 VAR
- 102 WD : Window.WinDef ;
- ***** ^ not supported yet
- 103 w : Window.WinType ;
- ***** ^ not supported yet
- 104 title : ARRAY[0..39] OF CHAR ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 105 Win : ARRAY[0..29] OF Window.WinType ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 106 i,j,wn : CARDINAL ;
- 107 num : ARRAY[0..6] OF CHAR ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 108 b,up : BOOLEAN ;
- 109 DescWin : Window.WinType ;
- ***** ^ not supported yet
- 110 delay : CARDINAL ;
- 111 exit,
- 112 change : BOOLEAN ;
- 113 CONST
- 114 targetX = 32 ;
- 115 targetY = 5 ;
- 116 BEGIN
- 117 Window.CursorOff;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 118 FOR i := 0 TO 29 DO
- 119 WITH WD DO
- ***** ^ not supported yet
- 120 IF i<30 THEN
- 121 IF IsBW THEN
- 122 IF ODD(i) THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 123 Background := Window.Black ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 124 Foreground := Window.White ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 125 ELSE
- 126 Background := Window.LightGray ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 127 Foreground := Window.Black ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 128 END ;
- 129 ELSE
- 130 Background := Window.Color(i MOD 8) ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 131 Foreground := Window.Color(15-i MOD 8) ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 132 END ;
- 133 X1 := ww[i].x ; Y1 := ww[i].y ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 134 X2 := X1+9 ; Y2 := Y1+3 ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 135 END ;
- 136 CursorOn := FALSE ;
- ***** ^ undeclared identifier
- 137 WrapOn := FALSE ;
- ***** ^ undeclared identifier
- 138 Hidden := FALSE ;
- ***** ^ undeclared identifier
- 139 FrameOn := TRUE ;
- ***** ^ undeclared identifier
- 140 FrameDef := Window.SingleFrame ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 141 IF NOT IsBW AND (Background=Window.Black) THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 142 FrameBack := Window.Green ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 143 ELSE
- 144 FrameBack := Background ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 145 END ;
- 146 (* Window.Color(ORD(Foreground)MOD 8) *) ;
- 147 IF FrameBack=Window.LightGray THEN FrameFore := Window.Black ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 148 ELSE FrameFore := Window.LightGray ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 149 END ;
- 150 END ;
- ***** ^ not supported yet
- 151 Win[i] := Window.Open(WD) ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 152 Window.SetTitle(Win[i],'JPI',Window.CenterUpperTitle);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 153 Str.CardToStr(LONGCARD(i+1),num,10,b) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 154 (*
- 155 IF (i=29)OR(ww[i].x+5<>ww[i+1].x) THEN IO.WrChar(' '); END ;
- 156 *)
- 157 IO.WrStr('TopSpeed');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 158 IO.WrLn ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 159 IO.WrStr('Modula-2');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 160 END ;
- 161 WD := Window.WinDef(0,15,75,24,Window.White,Window.Black,
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 162 FALSE,TRUE,FALSE,TRUE,
- 163 Window.DoubleFrame,Window.Blue,Window.LightGray) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 164 IF IsBW THEN WD.FrameFore := Window.Black END ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 165 DescWin := Window.Open(WD) ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 166 Window.SetTitle(DescWin,' TopSpeed Modula-2 : Window Demonstration ',Window.CenterUpperTitle);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 167 IntroText ;
- ***** ^ undeclared identifier
- 168 delay := 1000 ;
- ***** ^ undeclared identifier
- 169 i := 0 ;
- ***** ^ undeclared identifier
- 170 WHILE NOT IO.KeyPressed() DO
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 171 CheckScrollLock ;
- ***** ^ not supported yet
- 172 IF delay>100 THEN DEC(delay,20)
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 173 ELSIF delay>1 THEN DEC(delay) ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 174 END ;
- 175 Lib.Delay(delay) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 176 Window.PutOnTop(Win[i]) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 177 i := (i+1)MOD 30 ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 178 END ;
- 179 REPEAT
- 180 exit := TRUE ;
- ***** ^ undeclared identifier
- 181 FOR i := 0 TO 29 DO
- ***** ^ undeclared identifier
- 182 Window.Info(Win[i],WD) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 183 change := TRUE ;
- ***** ^ undeclared identifier
- 184 IF WD.X1<targetX-3 THEN INC(WD.X1,3);INC(WD.X2,3);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 185 ELSIF WD.X1>targetX+3 THEN DEC(WD.X1,3);DEC(WD.X2,3);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 186 ELSIF WD.Y1=targetY THEN change := FALSE ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 187 END ;
- 188 IF WD.Y1<targetY THEN INC(WD.Y1);INC(WD.Y2);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 189 ELSIF WD.Y1>targetY THEN DEC(WD.Y1);DEC(WD.Y2);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 190 END ;
- 191 IF change THEN
- ***** ^ undeclared identifier
- 192 Window.Change(Win[i],WD.X1,WD.Y1,WD.X2,WD.Y2) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 193 exit := FALSE ;
- ***** ^ undeclared identifier
- 194 END ;
- 195 END ;
- 196 UNTIL exit ;
- ***** ^ undeclared identifier
- 197 FOR i := 0 TO 30 DO
- ***** ^ undeclared identifier
- 198 w := Window.Top() ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 199 Lib.Delay(10) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 200 Window.Close(w) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 201 END ;
- 202 IF IO.RdKey()=CHR(27) THEN HALT END ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 203 END Intro;
- ***** ^ not supported yet
- 204
- 205 (* Actual demo starts here *)
- 206 (* ----------------------- *)
- 207
- 208
- 209
- 210
- 211 VAR
- 212 W1,W2,W3,W4 : Window.WinType;
- ***** ^ not supported yet
- 213 DS : Process.SIGNAL ;
- ***** ^ not supported yet
- 214 Initialize : BOOLEAN ;
- 215 pal : Window.PaletteDef ;
- ***** ^ not supported yet
- 216
- 217
- 218 (* Random Colouring *)
- 219
- 220 PROCEDURE RandPalette ( VAR p : Window.PaletteDef ) ;
- ***** ^ not supported yet
- 221 VAR
- 222 i : SHORTCARD ;
- 223 TYPE BW3 = ARRAY[0..2] OF Window.Color ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 224 CONST bw3 = BW3(Window.Black,Window.LightGray,Window.White) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 225 BEGIN
- 226 FOR i := 0 TO Window.PaletteMax DO
- ***** ^ not supported yet
- ***** ^ not supported yet
- 227 IF IsBW THEN
- 228 p[i].Fore := bw3[Lib.RANDOM(3)];
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 229 ELSE
- 230 p[i].Fore := VAL(Window.Color,Lib.RANDOM(16)) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 231 END ;
- 232 REPEAT
- 233 IF IsBW THEN
- 234 p[i].Back := bw3[Lib.RANDOM(2)] ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 235 ELSE
- 236 p[i].Back := VAL(Window.Color,Lib.RANDOM(8)) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 237 END ;
- 238 UNTIL p[i].Back<>p[i].Fore ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 239 END ;
- 240 END RandPalette ;
- ***** ^ not supported yet
- 241
- 242 (* Random Movement *)
- 243
- 244 PROCEDURE Rmove ( W : Window.WinType ) ;
- ***** ^ not supported yet
- 245 (* random move process *)
- 246 VAR
- 247 dx1,dy1 : CARDINAL ;
- 248 ix,iy,nx,ny : CARDINAL ;
- 249 BEGIN
- 250 CheckScrollLock ;
- ***** ^ not supported yet
- 251 LOOP
- 252
- 253 Process.Delay(5+Lib.RANDOM(15)) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 254 REPEAT
- 255 dx1 := W^.WDef.X1+(Lib.RANDOM(16)-8)*2 ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 256 dy1 := W^.WDef.Y1+Lib.RANDOM(16)-8 ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 257 UNTIL (dx1<80)AND(dy1<24)
- 258 AND(dx1+W^.OWidth<=80)AND(dy1+W^.ODepth<=24) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 259 IF dx1>W^.WDef.X1 THEN ix := 2 ELSE ix := 0 END ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 260 IF dy1>W^.WDef.Y1 THEN iy := 2 ELSE iy := 0 END ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 261 WHILE (dx1<>W^.WDef.X1) AND (dy1<>W^.WDef.Y1) DO
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 262 IF (dx1<>W^.WDef.X1) THEN nx := W^.WDef.X1+ix-1 END ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 263 IF (dy1<>W^.WDef.Y1) THEN ny := W^.WDef.Y1+iy-1 END ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 264 Window.Change(W,nx,ny,nx+W^.OWidth-1,ny+W^.ODepth-1) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 265 END ;
- 266 END ;
- 267 END Rmove ;
- ***** ^ not supported yet
- 268
- 269 (* Random Change Size *)
- 270
- 271 PROCEDURE RChangeSize ( W : Window.WinType ) ;
- ***** ^ not supported yet
- 272 (* this randomly changes the size of a window *)
- 273 VAR
- 274 nx,ny : CARDINAL ;
- 275 BEGIN
- 276 CheckScrollLock ;
- ***** ^ not supported yet
- 277 REPEAT
- 278 nx := W^.WDef.X2+(Lib.RANDOM(16)-8)*2 ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 279 ny := W^.WDef.Y2+Lib.RANDOM(16)-8 ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 280 UNTIL (nx-W^.WDef.X1<70)AND(ny-W^.WDef.Y1<18)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 281 AND(nx-W^.WDef.X1>10)AND(ny-W^.WDef.Y1>4) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 282 Window.Change(W,W^.WDef.X1,W^.WDef.Y1,nx,ny) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 283 END RChangeSize ;
- ***** ^ not supported yet
- 284
- 285
- 286 (* Processes *)
- 287
- 288
- 289 (* P1 prints out numbers in Hex, Dec and Binary *)
- 290
- 291 PROCEDURE P1;
- 292 VAR S : ARRAY[0..30] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 293 i : CARDINAL;
- 294 b : BOOLEAN ;
- 295 BEGIN
- 296 Window.Use(W1) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 297 LOOP
- 298 FOR i := 0 TO 1000 DO
- 299 Str.CardToStr(VAL(LONGCARD,i),S,2,b); IO.WrStr(S);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 300 IO.WrCharRep(' ',16-Str.Length(S));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 301 IO.WrCard(i,5) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 302 IO.WrStr(' ') ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 303 Str.CardToStr(VAL(LONGCARD,i),S,16,b); IO.WrStr(S);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 304 IO.WrCharRep(' ',5-Str.Length(S));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 305 IO.WrLn;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 306 END;
- 307 END ;
- 308 END P1;
- ***** ^ not supported yet
- 309
- 310 (* P2 displays out a sideways barchart *)
- 311
- 312
- 313
- 314 PROCEDURE P2;
- 315 VAR i,j : CARDINAL;
- 316 V : ARRAY[1..9] OF CARDINAL ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 317 WD : Window.WinDef ;
- ***** ^ not supported yet
- 318
- 319 PROCEDURE DrawBar ( x,y : CARDINAL ; val : CARDINAL ; on : BOOLEAN ) ;
- 320 BEGIN
- 321 IF ODD(y) THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 322 IF IsBW THEN Window.TextColor(Window.White) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 323 ELSE Window.TextColor(Window.Red) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 324 END ;
- 325 ELSE
- 326 Window.TextColor(Window.LightGray) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 327 END ;
- 328 IF val>0 THEN
- 329 DEC(val) ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 330 Window.GotoXY(x+val DIV 2,y) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 331 IF on THEN
- 332 IF ODD(val) THEN IO.WrChar('Û') ELSE IO.WrChar('Ý') END ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 333 ELSE
- 334 IF ODD(val) THEN IO.WrChar('Ý') ELSE IO.WrChar(' ') END ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 335 END ;
- 336 END ;
- 337 END DrawBar ;
- ***** ^ not supported yet
- 338
- 339 BEGIN
- 340 Window.Use(W2) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 341 i := 0 ;
- 342 FOR i := 1 TO 9 DO
- 343 V[i] := Lib.RANDOM(50) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 344 FOR j := 0 TO V[i] DO
- ***** ^ not supported yet
- ***** ^ not supported yet
- 345 DrawBar(1,i,j,TRUE) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 346 END ;
- 347 END ;
- 348 LOOP
- 349 FOR i := 1 TO 9 DO
- 350 Window.Info(W2,WD) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 351 IF i<WD.X2-WD.X1-2 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 352 IF Lib.RANDOM(2)=0 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 353 IF V[i]<50 THEN INC(V[i]) ; DrawBar(1,i,V[i],TRUE) END ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 354 ELSE
- 355 IF V[i]>0 THEN DrawBar(1,i,V[i],FALSE) ; DEC(V[i]) ; END ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 356 END ;
- 357 END ;
- 358 END ;
- 359 CheckScrollLock ;
- ***** ^ not supported yet
- 360 END ;
- 361 END P2;
- ***** ^ not supported yet
- 362
- 363 (* P3 displays a character grid with randomly changing pallette colours *)
- 364
- 365 PROCEDURE P3;
- 366 VAR
- 367 X,Y,D : CARDINAL;
- 368 CH : CHAR;
- 369 BEGIN
- 370 CH := '*' ;
- 371 D := 0 ;
- 372 Window.Use(W3) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 373 LOOP
- 374 FOR X := 1 TO 8 DO
- 375 FOR Y := 1 TO 8 DO
- 376 Window.SetPaletteColor(VAL(SHORTCARD,(Y*7+X+D))MOD 8) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 377 Window.GotoXY(X,Y);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 378 IO.WrChar(CH);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 379 Window.GotoXY(1,10);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 380 Window.SetPaletteColor(0) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 381 IO.WrCard(X,2);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 382 IO.WrChar(',');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 383 IO.WrCard(Y,2);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 384 END;
- 385 END;
- 386 RandPalette ( pal ) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 387 Window.SetPalette(W3,pal) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 388 INC(D) ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 389 CheckScrollLock ;
- ***** ^ not supported yet
- 390 END ;
- 391 END P3;
- ***** ^ not supported yet
- 392
- 393 (* P4 displays some text *)
- 394
- 395 PROCEDURE P4;
- 396 VAR i : CARDINAL ;
- 397 BEGIN
- 398 Window.Use(W4) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 399 REPEAT
- 400 FOR i := 1 TO 50 DO
- 401 IO.WrStr('This is a test of 9 time-sliced processes, and also of window writing, moving, rearranging and resizing.');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 402 W4^.WDef.Foreground := Window.White ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 403 IF IsBW THEN
- 404 W4^.WDef.Background := Window.Black ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 405 END ;
- 406 IO.WrStr(' Press any key to terminate, ScrollLock to freeze. ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 407 W4^.WDef.Foreground := Window.Black ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 408 IF IsBW THEN
- 409 W4^.WDef.Background := Window.LightGray
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 410 END ;
- 411 END;
- 412 CheckScrollLock ;
- ***** ^ not supported yet
- 413 UNTIL IO.KeyPressed() ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 414 Process.SEND(DS);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 415 Process.StopScheduler ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 416 Window.Use(Window.FullScreen) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 417 Window.SnapShot ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 418 Window.PutOnTop(Window.FullScreen) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 419 Window.GotoXY(1,Window.ScreenDepth-1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 420 Window.CursorOn ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 421 IF IO.RdKey()=' ' THEN END ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 422 HALT ;
- ***** ^ undeclared identifier
- 423 END P4;
- ***** ^ not supported yet
- 424
- 425 (* P5 Re-sizes and Re-arranges text *)
- 426
- 427 PROCEDURE P5;
- 428 BEGIN
- 429 LOOP
- 430 Process.Delay(10+Lib.RANDOM(20)) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 431 CASE Lib.RANDOM(4) OF
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 432 0 : Window.PutOnTop(W1) |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 433 1 : Window.PutOnTop(W2) |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 434 2 : Window.PutOnTop(W3) |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 435 3 : Window.PutOnTop(W4)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 436 END ;
- 437 Process.Delay(10+Lib.RANDOM(20)) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 438 CASE Lib.RANDOM(4) OF
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 439 0 : RChangeSize(W1) |
- ***** ^ not supported yet
- ***** ^ not supported yet
- 440 1 : |
- 441 2 : |
- 442 3 : RChangeSize(W4)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 443 END ;
- 444 END ;
- 445 END P5;
- ***** ^ not supported yet
- 446
- 447 (* P6 Moves window 1 *)
- 448
- 449 PROCEDURE P6 ;
- 450 BEGIN
- 451 Rmove(W1) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 452 END P6 ;
- ***** ^ not supported yet
- 453
- 454 (* P7 Moves window 2 *)
- 455
- 456 PROCEDURE P7 ;
- 457 BEGIN
- 458 Rmove(W2) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 459 END P7;
- ***** ^ not supported yet
- 460
- 461 (* P8 Moves window 2 *)
- 462
- 463 PROCEDURE P8 ;
- 464 BEGIN
- 465 Rmove(W3) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 466 END P8;
- ***** ^ not supported yet
- 467
- 468 (* P9 Moves window 2 *)
- 469
- 470 PROCEDURE P9 ;
- 471 BEGIN
- 472 Rmove(W4) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 473 END P9 ;
- ***** ^ not supported yet
- 474
- 475
- 476 PROCEDURE Demo ;
- 477 VAR
- 478 WD : Window.WinDef ;
- ***** ^ not supported yet
- 479 TW : Window.WinType;
- ***** ^ not supported yet
- 480 k : CHAR;
- 481 BEGIN
- 482 TW := Window.Top();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 483 Lib.RANDOMIZE ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 484 Initialize := TRUE ;
- 485 Window.SetProcessLocks(Process.Lock,Process.Unlock) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 486 Window.CursorOff ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 487 Window.Clear ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 488 WITH WD DO
- ***** ^ not supported yet
- 489 X1 := 10 ; Y1 := 2 ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 490 X2 := 60 ; Y2 := 8 ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 491 Foreground := Window.White ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 492 IF IsBW THEN
- 493 Background := Window.Black ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 494 ELSE
- 495 Background := Window.Red ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 496 END ;
- 497 CursorOn := FALSE ;
- ***** ^ undeclared identifier
- 498 WrapOn := TRUE ;
- ***** ^ undeclared identifier
- 499 Hidden := FALSE ;
- ***** ^ undeclared identifier
- 500 FrameOn := TRUE ;
- ***** ^ undeclared identifier
- 501 FrameDef := Window.SingleFrame ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 502 FrameFore := Window.White ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 503 FrameBack := Background ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 504 END ;
- ***** ^ not supported yet
- 505 W1 := Window.Open(WD) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 506 Window.SetTitle(W1,' Process 1 ',Window.CenterUpperTitle);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 507 WITH WD DO
- ***** ^ undeclared identifier
- 508 X1 := 40 ; Y1 := 2 ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 509 X2 := 70 ; Y2 := 12 ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 510 Foreground := Window.White ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 511 Background := Window.Blue ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 512 CursorOn := FALSE ;
- ***** ^ undeclared identifier
- 513 WrapOn := TRUE ;
- ***** ^ undeclared identifier
- 514 Hidden := FALSE ;
- ***** ^ undeclared identifier
- 515 FrameOn := TRUE ;
- ***** ^ undeclared identifier
- 516 FrameDef := Window.DoubleFrame ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 517 FrameFore := Window.Black ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 518 FrameBack := Window.Cyan ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 519 IF IsBW THEN
- 520 Background := Window.Black ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 521 FrameBack := Window.LightGray
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 522 END ;
- 523 END ;
- ***** ^ not supported yet
- 524 W2 := Window.Open(WD) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 525 Window.SetTitle(W2,' Process 2 ',Window.CenterUpperTitle);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 526 RandPalette(pal) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 527 WITH WD DO
- ***** ^ undeclared identifier
- 528 X1 := 40 ; Y1 := 6 ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 529 X2 := 50 ; Y2 := 17 ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 530 pal[0].Fore:= Window.Yellow ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 531 pal[0].Back:= Window.Black ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 532 CursorOn := FALSE ;
- ***** ^ undeclared identifier
- 533 WrapOn := TRUE ;
- ***** ^ undeclared identifier
- 534 Hidden := FALSE ;
- ***** ^ undeclared identifier
- 535 FrameOn := TRUE ;
- ***** ^ undeclared identifier
- 536 FrameDef := Window.SingleFrame ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 537 pal[1].Fore:= Window.White ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 538 pal[1].Back:= Window.Green ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 539 IF IsBW THEN
- 540 pal[0].Fore:= Window.LightGray ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 541 pal[1].Back:= Window.Black ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 542 END ;
- 543 END ;
- ***** ^ not supported yet
- 544 W3 := Window.PaletteOpen(WD,pal) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 545 Window.SetTitle(W3,'Process 3',Window.CenterUpperTitle);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 546 WITH WD DO
- ***** ^ undeclared identifier
- 547 X1 := 10 ; Y1 := 10 ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 548 X2 := 70 ; Y2 := 20 ;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 549 Foreground := Window.Black ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 550 Background := Window.LightGray ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 551 CursorOn := FALSE ;
- ***** ^ undeclared identifier
- 552 WrapOn := TRUE ;
- ***** ^ undeclared identifier
- 553 Hidden := FALSE ;
- ***** ^ undeclared identifier
- 554 FrameOn := TRUE ;
- ***** ^ undeclared identifier
- 555 FrameDef := Window.DoubleFrame ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 556 FrameFore := Window.White ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 557 FrameBack := Window.Green ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 558 IF IsBW THEN
- 559 FrameBack := Window.Black ;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 560 END ;
- 561 END ;
- ***** ^ not supported yet
- 562 W4 := Window.Open(WD) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 563 Window.SetTitle(W4,' Process 4 ',Window.CenterUpperTitle);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 564
- 565 Process.StartScheduler ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 566
- 567 Process.Init(DS) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 568 Process.StartProcess(P1,2000,1) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 569 Process.StartProcess(P2,2000,1) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 570 Process.StartProcess(P3,2000,1) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 571 Process.StartProcess(P4,2000,1) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 572 Process.StartProcess(P5,2000,1) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 573 Process.StartProcess(P6,2000,1) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 574 Process.StartProcess(P7,2000,1) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 575 Process.StartProcess(P8,2000,1) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 576 Process.StartProcess(P9,2000,1) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 577 Process.WAIT(DS) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 578 Window.PutOnTop(TW);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 579 Window.CursorOn ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 580 WHILE IO.KeyPressed() DO k := IO.RdKey() END;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 581 END Demo;
- ***** ^ not supported yet
- 582
- 583 (*%F _OS2*)
- 584 PROCEDURE CheckBW ;
- 585 VAR
- 586 R : SYSTEM.Registers ;
- 587 BEGIN
- 588 R.AH := 15 ;
- 589 Lib.Intr(R,10H) ;
- 590 IsBW := (R.AL = 0)OR(R.AL = 2)OR(R.AL = 5)OR(R.AL = 6)OR(R.AL = 7) ;
- 591 END CheckBW ;
- 592 (*%E*)
- 593
- 594 (*%T _OS2*)
- 595 PROCEDURE CheckBW;
- 596 VAR
- 597 mode : Vio.MODEINFO;
- ***** ^ not supported yet
- 598 r : CARDINAL;
- 599 TYPE
- 600 sb = SET OF [0..7] ;
- ***** ^ not supported yet
- 601 BEGIN
- 602 mode.b := SIZE(mode);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 603 r := Vio.GetMode(mode,0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 604 IsBW := (NOT (0 IN sb(mode.type)))OR(mode.color<=2)OR(2 IN sb(mode.type)) ;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 605 END CheckBW;
- ***** ^ not supported yet
- 606 (*%E*)
- 607 (*%E*)
- 608
- 609
- 610 BEGIN
- 611 CheckBW ;
- ***** ^ not supported yet
- 612 Intro;
- ***** ^ not supported yet
- 613 Demo;
- ***** ^ not supported yet
- 614 END WinDemoM.
- 1057 errors
|