| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223 |
- Listing:
- 1 (* Release 3.10 *)
- 2 (*-------------------------------------------------------------------------*
- 3 * *
- 4 * SCRIPTPR.MOD - COMMS Toolkit script processor *
- 5 * *
- 6 * COPYRIGHT (C) 1988..1992 Clarion Software Corporation. *
- 7 * All Rights Reserved *
- 8 * *
- 9 *--------------------------------------------------------------------------*)
- 10
- 11 IMPLEMENTATION MODULE ScriptProcessor;
- 12 IMPORT CommUtil,FIO,FTSupport,IO,Kermit,Lib,RS232,ScriptCompiler,Storage,
- 13 Str,Term,Timer,Window,WXModem,XModem,YModem;
- 14
- 15 CONST
- 16 StackSize = 40;
- 17
- 18 TYPE
- 19 StringPtr = POINTER TO String80;
- ***** ^ undeclared identifier
- 20
- 21 VAR
- 22 CPUFlag,
- 23 KbdWait,WaitForever : BOOLEAN;
- 24 IPC,SLnth,StackPtr : CARDINAL;
- 25 Stack : ARRAY[0..StackSize-1] OF CARDINAL;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 26 SVar : ARRAY[0..9] OF String80; (* Script Variables *)
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 27
- 28 (*.............................................*)
- 29
- 30 PROCEDURE TerminateScript;
- 31 VAR
- 32 flag : ScriptFlags;
- ***** ^ undeclared identifier
- 33 BEGIN
- 34 IF ScriptState<>Off THEN
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 35 ScriptState := Off;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 36 CommUtil.ScriptFile := '';
- ***** ^ not supported yet
- ***** ^ not supported yet
- 37 CommUtil.StatusLine(CommUtil.script);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 38 END;
- 39 WhenProcessing := FALSE;
- ***** ^ undeclared identifier
- 40 FOR flag:=Linked TO WaitFor DO
- ***** ^ FOR needs integer variable and bounds
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 41 Flags[flag] := FALSE;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 42 END;
- 43 END TerminateScript;
- ***** ^ not supported yet
- 44
- 45 (*.............................................*)
- 46
- 47 PROCEDURE InitScriptProcessor;
- 48 BEGIN
- 49 TerminateScript;
- ***** ^ not supported yet
- 50 END InitScriptProcessor;
- ***** ^ not supported yet
- 51
- 52 (*.............................................*)
- 53
- 54 PROCEDURE LoadScript(Filename:ARRAY OF CHAR):BOOLEAN;
- ***** ^ not supported yet
- 55 BEGIN
- 56 TerminateScript;
- ***** ^ not supported yet
- 57 Lib.Move(ADR(Filename),ADR(CommUtil.ScriptFile),81);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 58 IF ScriptCompiler.Compile(CommUtil.ScriptFile) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 59 Lib.Fill(ADR(SVar),SIZE(SVar),0C);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 60 IPC := 0;
- 61 StackPtr:=0;
- 62 ScriptState := Running;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 63 CommUtil.StatusLine(CommUtil.script);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 64 RETURN TRUE;
- 65 ELSE
- 66 RETURN FALSE;
- 67 END;
- 68 END LoadScript;
- ***** ^ not supported yet
- 69
- 70 (*.............................................*)
- 71
- 72 PROCEDURE Push(w:CARDINAL);
- 73 BEGIN
- 74 IF StackPtr<StackSize THEN
- 75 Stack[StackPtr] := w;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 76 INC(StackPtr)
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 77 ELSE
- 78 IO.WrStr('Script Error: GOSUB Stack Overflow!!');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 79 IO.WrLn;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 80 TerminateScript;
- ***** ^ not supported yet
- 81 END;
- 82 END Push;
- ***** ^ not supported yet
- 83
- 84 (*.............................................*)
- 85
- 86 PROCEDURE Pop(VAR w:CARDINAL);
- 87 BEGIN
- 88 IF StackPtr>0 THEN
- 89 DEC(StackPtr);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 90 w := Stack[StackPtr];
- ***** ^ not supported yet
- ***** ^ not supported yet
- 91 ELSE
- 92 IO.WrStr('Script Error: GOSUB Stack Underflow!!');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 93 IO.WrLn;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 94 TerminateScript;
- ***** ^ not supported yet
- 95 END;
- 96 END Pop;
- ***** ^ not supported yet
- 97
- 98 (*.............................................*)
- 99
- 100 PROCEDURE IFetch(VAR op:SHORTCARD);
- 101 BEGIN
- 102 op := ScriptCompiler.CodeBuff^[IPC];
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 103 INC(IPC);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 104 END IFetch;
- ***** ^ not supported yet
- 105
- 106 (*.............................................*)
- 107
- 108 PROCEDURE IFetchW(VAR op:CARDINAL);
- 109 VAR
- 110 lsb,msb : SHORTCARD;
- 111 BEGIN
- 112 IFetch(lsb);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 113 IFetch(msb);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 114 op := CARDINAL(lsb)+CARDINAL(msb)*100H;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 115 END IFetchW;
- ***** ^ not supported yet
- 116
- 117 (*.............................................*)
- 118
- 119 PROCEDURE IFetchS(VAR p:StringPtr);
- 120 VAR
- 121 op : SHORTCARD;
- 122 BEGIN
- 123 IFetch(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 124 IF op<>255 THEN
- 125 p := ADR(SVar[CARDINAL(op)]);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 126 SLnth := Str.Length(p^);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 127 ELSE
- 128 p := ADR(ScriptCompiler.CodeBuff^[IPC]);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 129 SLnth := Str.Length(p^);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 130 INC(IPC,SLnth+1);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 131 END;
- 132 END IFetchS;
- ***** ^ not supported yet
- 133
- 134 (*.............................................*)
- 135
- 136 PROCEDURE SetSuccess(Setting:BOOLEAN);
- 137 BEGIN
- 138 Flags[Success] := Setting;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 139 Flags[Failure] := NOT Setting;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 140 END SetSuccess;
- ***** ^ not supported yet
- 141
- 142 (*.............................................*)
- 143
- 144 PROCEDURE Dos(CmdLine:ARRAY OF CHAR);
- ***** ^ not supported yet
- 145 BEGIN
- 146 SetSuccess(FALSE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 147 END Dos;
- ***** ^ not supported yet
- 148
- 149 (*.............................................*)
- 150
- 151 PROCEDURE Run(CmdLine:ARRAY OF CHAR);
- ***** ^ not supported yet
- 152 BEGIN
- 153 SetSuccess(FALSE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 154 END Run;
- ***** ^ not supported yet
- 155
- 156 (*.............................................*)
- 157
- 158 PROCEDURE ChangeEmulation(name:ARRAY OF CHAR);
- ***** ^ not supported yet
- 159 BEGIN
- 160 Str.Caps(name);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 161 IF Str.Compare(name,'VT100')=0 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 162 Term.EmulateVT100
- ***** ^ not supported yet
- ***** ^ not supported yet
- 163 ELSIF Str.Compare(name,'VT52')=0 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 164 Term.EmulateVT52
- ***** ^ not supported yet
- ***** ^ not supported yet
- 165 ELSIF Str.Compare(name,'ANSI')=0 THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 166 Term.EmulateANSI
- ***** ^ not supported yet
- ***** ^ not supported yet
- 167 END;
- 168 END ChangeEmulation;
- ***** ^ not supported yet
- 169
- 170 (*.............................................*)
- 171
- 172 PROCEDURE RdStr(VAR s:ARRAY OF CHAR; Max:CARDINAL; Echo:BOOLEAN);
- ***** ^ not supported yet
- 173 VAR
- 174 ch : CHAR;
- 175 ptr : CARDINAL;
- 176 BEGIN
- 177 ptr:=0;
- 178 REPEAT
- 179 REPEAT
- 180 ch := IO.RdKey();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 181 UNTIL (ch=CHR(13)) OR ((ch=CHR(8)) AND (ptr>0)) OR ((ch>=' ') AND (ch<=CHR(126)) AND (ptr<Max));
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 182 IF ch=CHR(13) THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 183 CommUtil.WrChar(ch);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 184 CommUtil.WrChar(CHR(10))
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 185 ELSIF ch=CHR(8) THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 186 CommUtil.WrChar(ch);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 187 CommUtil.WrChar(' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 188 CommUtil.WrChar(ch);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 189 DEC(ptr);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 190 ELSE
- 191 IF Echo THEN
- 192 CommUtil.WrChar(ch)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 193 ELSE
- 194 CommUtil.WrChar('*');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 195 END;
- 196 s[ptr]:=ch;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 197 INC(ptr);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 198 END;
- 199 UNTIL ch=CHR(13);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 200 IF ptr<=HIGH(s) THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 201 s[ptr]:=0C;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 202 END;
- 203 END RdStr;
- ***** ^ not supported yet
- 204
- 205 (*....................................................*)
- 206
- 207 PROCEDURE FileTransfer(Download:BOOLEAN;Protocol:CARDINAL;FileSpec:ARRAY OF CHAR);
- ***** ^ not supported yet
- 208
- 209 (*. . . . . . . . . . . . . . . . . . . . . . . . . . .*)
- 210
- 211 PROCEDURE ReceiveFile():BOOLEAN;
- 212 BEGIN
- 213 CASE Protocol OF
- 214 0 : RETURN FALSE; (*Ascii - not allowed *) |
- 215 1 : RETURN Kermit.KermitReceive()=0; |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 216 2 : RETURN XModem.XModemReceive(FileSpec)=0; |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 217 3 : RETURN WXModem.WXModemReceive(FileSpec)=0; |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 218 4 : RETURN YModem.YModemReceive(FileSpec)=0; |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 219 5 : RETURN YModem.YModemBatchReceive()=0; |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 220 6 : RETURN FALSE; (*Spare*) |
- 221 END;
- 222 RETURN TRUE
- 223 END ReceiveFile;
- ***** ^ not supported yet
- 224
- 225 (*. . . . . . . . . . . . . . . . . . . . . . . . . . .*)
- 226
- 227 PROCEDURE SendFile():BOOLEAN;
- 228 BEGIN
- 229 CASE Protocol OF
- 230 0 : RETURN FTSupport.ASCIISend(FileSpec)=0; |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 231 1 : RETURN Kermit.KermitSend(FileSpec)=0; |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 232 2 : RETURN XModem.XModemSend(FileSpec)=0; |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 233 3 : RETURN WXModem.WXModemSend(FileSpec)=0; |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 234 4 : RETURN YModem.YModemSend(FileSpec)=0; |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 235 5 : RETURN YModem.YModemBatchSend(FileSpec)=0; |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 236 6 : RETURN FALSE; |
- 237 END;
- 238 RETURN TRUE
- 239 END SendFile;
- ***** ^ not supported yet
- 240
- 241 (*. . . . . . . . . . . . . . . . . . . . . . . . . . .*)
- 242
- 243 BEGIN (* FileTransfer *)
- 244 IF Download THEN
- 245 SetSuccess(ReceiveFile());
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 246 ELSE
- 247 SetSuccess(SendFile());
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 248 END;
- 249 END FileTransfer;
- ***** ^ not supported yet
- 250
- 251 (*....................................................*)
- 252
- 253 PROCEDURE Value(VAR s:ARRAY OF CHAR):CARDINAL;
- ***** ^ not supported yet
- 254 VAR
- 255 i,x : CARDINAL;
- 256 c : CHAR;
- 257 BEGIN
- 258 x := 0;
- 259 FOR i:=0 TO HIGH(s) DO
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 260 c := s[i];
- ***** ^ not supported yet
- ***** ^ not supported yet
- 261 IF c=0C THEN
- 262 RETURN x
- 263 ELSIF (c>='0') AND (c<='9') THEN
- 264 x := x*10+ORD(c)-48;
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 265 END;
- 266 END;
- 267 RETURN x;
- 268 END Value;
- ***** ^ not supported yet
- 269
- 270 (*..............................................*)
- 271
- 272 PROCEDURE Hangup;
- 273 BEGIN
- 274 RS232.UnInstall;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 275 Lib.Delay(500);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 276 RS232.Install;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 277 SetSuccess(TRUE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 278 CommUtil.StatusLine(CommUtil.carrier);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 279 END Hangup;
- ***** ^ not supported yet
- 280
- 281 (*..............................................*)
- 282
- 283 PROCEDURE RFlush;
- 284 VAR
- 285 c : CHAR;
- 286 BEGIN
- 287 WHILE RS232.SerialRead(c,0) DO
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 288 (* flush *)
- 289 END;
- 290 END RFlush;
- ***** ^ not supported yet
- 291
- 292 (*..............................................*)
- 293
- 294 PROCEDURE NextInstruction;
- 295 VAR
- 296 c : CHAR;
- 297 op : SHORTCARD;
- 298 i,temp,opw : CARDINAL;
- 299 sp,sp2 : StringPtr;
- ***** ^ not supported yet
- 300 BEGIN
- 301 Flags[Connected] := RS232.CarrierDetect();
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 302 IFetch(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 303 CASE op OF
- 304 0 : (*Alarm*)
- 305 IFetch(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 306 temp := CARDINAL(op)*2;
- ***** ^ not supported yet
- 307 WHILE temp>0 DO
- 308 CommUtil.WrChar(7C);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 309 Lib.Delay(500);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 310 DEC(temp);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 311 END; |
- 312 1 : (*Assign*)
- 313 IFetch(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 314 i:=CARDINAL(op);
- ***** ^ not supported yet
- 315 IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 316 Lib.Move(sp,ADR(SVar[i]),SLnth+1); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 317 3 : (* Unconditional Jump *)
- 318 IFetchW(opw);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 319 IPC := opw; |
- 320 6 : (* Clear Screen using default colours *)
- 321 Term.ClearScreen; |
- ***** ^ not supported yet
- ***** ^ not supported yet
- 322 7 : (* Clear Screen using new colours *)
- 323 IFetch(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 324 Window.TextColor(Window.Color(op MOD 16));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 325 Window.TextBackground(Window.Color(op DIV 16));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 326 Term.ClearScreen; |
- ***** ^ not supported yet
- ***** ^ not supported yet
- 327 8 : (* Run program via DOS command interpreter *)
- 328 IFetch(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 329 KbdWait := (op=1);
- 330 IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 331 Dos(sp^); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- 332 9 : (* Message *)
- 333 IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 334 i:=0;
- 335 WHILE i<SLnth DO
- 336 c := sp^[i];
- ***** ^ not supported yet
- ***** ^ not supported yet
- 337 IF c='|' THEN
- 338 CommUtil.WrChar(CHR(13));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 339 c:=CHR(10);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 340 END;
- 341 CommUtil.WrChar(c);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 342 INC(i);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 343 END; |
- 344 10 : (* Transmit string *)
- 345 IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 346 Lib.Move(sp,ADR(TransmitString),SLnth+1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 347 TxPtr := 0;
- ***** ^ undeclared identifier
- 348 ScriptState := Transmitting; |
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 349 11 : (* WaitFor *)
- 350 IFetch(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 351 IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 352 Lib.Move(sp,ADR(WaitString),SLnth+1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 353 Timer.SetAppTimer(CARDINAL(op));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 354 WaitForever := (op=0);
- 355 ScriptState := Waiting; |
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 356 12..17 : (* Test a flag *)
- 357 CPUFlag := Flags[VAL(ScriptFlags,CARDINAL(op-12))];|
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 358 18 : (* Jump if test was TRUE *)
- 359 IFetchW(opw);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 360 IF CPUFlag THEN
- 361 IPC:=opw;
- 362 END; |
- 363 19 : (* Jump if test was FALSE *)
- 364 IFetchW(opw);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 365 IF NOT CPUFlag THEN
- 366 IPC:=opw;
- 367 END; |
- 368 20 : (* EXIT - terminate script *)
- 369 TerminateScript;
- ***** ^ not supported yet
- 370 IF ScriptCompiler.CodeBuff<>NIL THEN (* it shouldnt be!! *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 371 Storage.DEALLOCATE(ScriptCompiler.CodeBuff,ScriptCompiler.MaxCodeBytes);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 372 END; |
- 373 21 : (* PAUSE *)
- 374 IFetch(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 375 ScriptState := Pausing;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 376 Timer.SetAppTimer(CARDINAL(op)); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 377 22 : (* Emulate *)
- 378 IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 379 ChangeEmulation(sp^); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- 380 23 : (* Execute script (chain) *)
- 381 IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 382 IF LoadScript(sp^) THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- 383 IO.WrStr('Script Error: Script "');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 384 IO.WrStr(sp^);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 385 IO.WrStr('" not found.');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 386 IO.WrLn;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 387 END; |
- 388 24 : (* Find *)
- 389 IFetch(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 390 IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 391 i:=CARDINAL(op);
- ***** ^ not supported yet
- 392 Str.Caps(SVar[i]);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 393 Str.Caps(sp^);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 394 Flags[Found] := (Str.Pos(SVar[i],sp^)<>0FFFFH); |
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 395 25,26 : (* Get, MGet *)
- 396 temp := CARDINAL(op);
- ***** ^ not supported yet
- 397 IFetch(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 398 i:=CARDINAL(op);
- ***** ^ not supported yet
- 399 IFetch(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 400 SLnth:=CARDINAL(op);
- ***** ^ not supported yet
- 401 RdStr(SVar[i],SLnth,(temp=25)); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 402 27,28 : (* GetFile, SendFile *)
- 403 temp := CARDINAL(op);
- ***** ^ not supported yet
- 404 IFetch(op); i:=CARDINAL(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 405 IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 406 FileTransfer((temp=27),i,sp^); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- 407 29 : (* Gosub *)
- 408 IFetchW(opw);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 409 Push(IPC);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 410 IPC:=opw; |
- 411 30 : (* Goto *)
- 412 IFetchW(opw);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 413 IPC:=opw; |
- 414 31 : (* Hangup *)
- 415 Hangup; |
- ***** ^ not supported yet
- 416 32 : (* Return *)
- 417 Pop(IPC); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- 418 33 : (* IsFile *)
- 419 IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 420 SetSuccess(FIO.Exists(sp^)); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 421 34 : (* KFlush *)
- 422 WHILE IO.KeyPressed() DO
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 423 c:=IO.RdKey();
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 424 END; |
- 425 35 : (* Locate(row,col) *)
- 426 IFetch(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 427 temp:=CARDINAL(op);
- ***** ^ not supported yet
- 428 IFetch(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 429 Window.GotoXY(CARDINAL(op)+1,temp+1); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 430 36 : (* Open Logfile *)
- 431 IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 432 Lib.Move(sp,ADR(CommUtil.CaptureFile),SLnth+1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 433 IF CommUtil.CaptureFile[0]=0C THEN
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 434 CommUtil.CaptureFile:='ODYSSEY.LOG';
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 435 END;
- 436 CommUtil.SetLogMode(CommUtil.OpenLogging);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 437 SetSuccess(FIO.IOresult()=0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 438 CommUtil.StatusLine(CommUtil.capture); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 439 37 : CommUtil.SetLogMode(CommUtil.CloseLogging);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 440 CommUtil.StatusLine(CommUtil.capture); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 441 38 : CommUtil.SetLogMode(CommUtil.SuspendLogging);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 442 CommUtil.StatusLine(CommUtil.capture); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 443 39 : CommUtil.SetLogMode(CommUtil.ResumeLogging);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 444 CommUtil.StatusLine(CommUtil.capture); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 445 40 : (* Send Macro String *)
- 446 IFetch(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 447 i:=CARDINAL(op);
- ***** ^ not supported yet
- 448 CommUtil.TransmitMacro(i); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 449 41 : IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 450 i:=Value(sp^);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 451 IF i<10 THEN
- 452 CommUtil.TransmitMacro(i);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 453 END; |
- 454 42 : (* Load Macro File *)
- 455 IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 456 (*ErrorMessage('Load Macro File command not supported!');*)|
- 457 43 : CommUtil.Printer(TRUE); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 458 44 : CommUtil.Printer(FALSE); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 459 45 : (* Quit *)
- 460 Hangup;
- ***** ^ not supported yet
- 461 Window.Clear;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 462 HALT; |
- ***** ^ undeclared identifier
- 463 46 : RFlush; |
- ***** ^ not supported yet
- 464 47 : (* RGet *)
- 465 IFetch(op); IFetch(op); IFetch(op); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 466 48 : (* Run *)
- 467 IFetch(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 468 KbdWait := (op=1);
- 469 IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 470 Run(sp^); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- 471 49,50,51 : (* Empty *); |
- 472 52 : (* CompareStr - used in SWITCH code *)
- 473 IFetch(op);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 474 i:=CARDINAL(op);
- ***** ^ not supported yet
- 475 IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 476 Str.Caps(SVar[i]);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 477 Str.Caps(sp^);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 478 SetSuccess(Str.Compare(SVar[i],sp^)=0); |
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 479 53 : (* When *)
- 480 IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 481 Lib.Move(sp,ADR(WhenString),SLnth+1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 482 IFetchS(sp);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 483 Lib.Move(sp,ADR(WhenAction),SLnth+1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 484 WhenProcessing := TRUE; |
- ***** ^ undeclared identifier
- 485 54 : (* CWhen *)
- 486 WhenProcessing := FALSE; |
- ***** ^ undeclared identifier
- 487 55 : (* NOP *) |
- 488 56 : (* NOP *) |
- 489 ELSE
- 490 IO.WrStr('Illegal Script Instruction!');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 491 IO.WrLn;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 492 TerminateScript;
- ***** ^ not supported yet
- 493 END; (* cases *)
- 494 END NextInstruction;
- ***** ^ not supported yet
- 495
- 496 (*.............................................*)
- 497
- 498 PROCEDURE GetChar(VAR c:CHAR) : BOOLEAN;
- 499 VAR
- 500 res : BOOLEAN;
- 501 BEGIN
- 502 res := TRUE;
- 503 c := TransmitString[TxPtr];
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 504 INC(TxPtr);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 505 IF c='^' THEN
- 506 c := TransmitString[TxPtr];
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 507 INC(TxPtr);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 508 IF (c>='@') AND (c<='_') THEN
- 509 c := CHR(ORD(c)-64);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 510 END;
- 511 ELSIF c='|' THEN
- 512 c := CHR(13);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 513 ELSIF c='~' THEN
- 514 Lib.Delay(500);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 515 res := FALSE;
- 516 END;
- 517 IF TransmitString[TxPtr]=0C THEN
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 518 ScriptState := Running
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 519 END;
- 520 RETURN res;
- 521 END GetChar;
- ***** ^ not supported yet
- 522
- 523 (*.............................................*)
- 524
- 525 PROCEDURE SingleStep;
- 526 VAR
- 527 c : CHAR;
- 528 BEGIN
- 529 CASE ScriptState OF
- ***** ^ undeclared identifier
- 530 Off : RETURN; |
- ***** ^ undeclared identifier
- 531 Running : NextInstruction; |
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 532 Transmitting : IF GetChar(c) THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 533 RS232.SerialWrite(c,1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 534 Lib.Delay(20);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 535 END; |
- 536 Waiting : IF (NOT WaitForever) AND Timer.AppTimerExpired() THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 537 Flags[WaitFor] := FALSE;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 538 ScriptState := Running;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 539 END; |
- 540 Pausing : IF Timer.AppTimerExpired() THEN
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 541 ScriptState := Running;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 542 END; |
- 543 WaitSuccess : Flags[WaitFor]:=TRUE;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 544 ScriptState:=Running; |
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 545 END; (* cases *)
- 546 Timer.UpdateTimer;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 547 END SingleStep;
- ***** ^ not supported yet
- 548
- 549 (*.............................................*)
- 550
- 551 BEGIN
- 552 ScriptState := Off;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 553 END ScriptProcessor.
- ***** ^ not supported yet
- 554
- 663 errors
|