|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 410880 (0x64500) Types: TextFile Names: »mon8part3«
└─⟦a8311e020⟧ Bits:30003039 RC 8000 Monitor Kildetekst └─⟦9ab0fc1ed⟧ └─⟦this⟧ »mon8part3«
9264 9022 9264 9022 \f 9264 9022 \f 9264 9022 9264 9022 m. 9264 9022 monfpaline - fpa-main, -transmitter and -receiver drivers 9265 9022 9265 9022 b.i30 w. 9266 9022 i0=82 02 08, i1=15 40 00 9267 9022 9267 9022 ; if newtime (i0,i1) > oldtime (a133,a134) then oldtime:=newtime; 9268 9022 c.i0-a133 9269 9022 c.i0-a133-1, a133=i0, a134=i1, z. 9270 9022 c.i1-a134-1, a134=i1, z. 9271 9022 z. 9272 9022 9272 9022 i10=i0, i20=i1 9273 9022 9273 9022 i15=i10/100000 , i10=i10-i15*100000 , i25=i20/100000 , i20=i20-i25*100000 9274 9022 i14=i10/10000 , i10=i10-i14*10000 , i24=i20/10000 , i20=i20-i24*10000 9275 9022 i13=i10/1000 , i10=i10-i13*1000 , i23=i20/1000 , i20=i20-i23*1000 9276 9022 i12=i10/100 , i10=i10-i12*100 , i22=i20/100 , i20=i20-i22*100 9277 9022 i11=i10/10 , i10=i10-i11*10 , i21=i20/10 , i20=i20-i21*10 9278 9022 9278 9022 i2: <: date :> 9279 9046 (:i15+48:)<16+(:i14+48:)<8+46 9280 9048 (:i13+48:)<16+(:i12+48:)<8+46 9281 9050 (:i11+48:)<16+(:i10+48:)<8+32 9282 9052 9282 9052 (:i25+48:)<16+(:i24+48:)<8+46 9283 9054 (:i23+48:)<16+(:i22+48:)<8+46 9284 9056 (:i21+48:)<16+(:i20+48:)<8+ 0 9285 9058 9285 9058 i3: al. w0 i2. ; write date: 9286 9060 rs w0 x2+0 ; first free:=start(text); 9287 9062 al w2 0 ; 9288 9064 jl x3 ; return to slang(status ok); 9289 9066 9289 9066 jl. i3. ; 9290 9068 e. 9291 9068 j. 9291 9022 date 82.02.08 15.40.00 9292 9022 \f 9292 9022 9292 9022 9292 9022 ; fpa 801 driver complex. 9293 9022 ; the fpa 801 driver complex consists of a number of drivers -- 9294 9022 ; mainprocess driver 9295 9022 ; line-process drivers: receiver driver 9296 9022 ; transmitter driver 9297 9022 ; subprocess drivers: hostprocess driver 9298 9022 ; general driver 9299 9022 ; terminal driver 9300 9022 ; magtape driver 9301 9022 ; disc driver 9302 9022 ; 9303 9022 9303 9022 ; block including all drivers. 9304 9022 9304 9022 b.f12,p340,v120 w. 9305 9022 9305 9022 ; block including main- and line-drivers. 9306 9022 9306 9022 b.e12 w. 9307 9022 9307 9022 ; block including main-process driver. 9308 9022 9308 9022 b.m20,n20,s20 w. 9309 9022 9309 9022 m. 9309 9022 fpa mainprocess 9310 9022 9310 9022 9310 9022 9310 9022 ; the following define global formats and constants 9311 9022 9311 9022 v0 = 8 ; highest number of buffers at the same time transmitted to a device 9312 9022 v1 = 12 ; number of bytes in private part of subproc description 9313 9022 v2 = 1<16-1 ; maximum buffer size for datanet 9314 9022 v3 = 16 ; max number of operations at the same time transmitted from a hostproc 9315 9022 9315 9022 ; function codes for mainproc 9316 9022 ; bit 1<0 should be added if data follows 9317 9022 9317 9022 v31 = 0<2 ; 0 ; create 9318 9022 v32 = v31+1<1 ; 2 ; answer create 9319 9022 v37 = 1<2 ; 4 ; remove 9320 9022 v38 = v37+1<1 ; 6 ; answer remove 9321 9022 v35 = 2<2 ; 8 ; release 9322 9022 v36 = v35+1<1 ; 10 ; answer release 9323 9022 v33 = 3<2 ; 12 ; lookup 9324 9022 v34 = v33+1<1 ; 14 ; answer lookup 9325 9022 9325 9022 v22 = 10<2 ; 40 ; operator output-input 9326 9022 v23 = v22+1<1 ; 42 ; answer operator output-input 9327 9022 v24 = 11<2 ; 44 ; operator output 9328 9022 v25 = v24+1<1 ; 46 ; answer operator output 9329 9022 9329 9022 ; smallest function value for the subprocs 9330 9022 9330 9022 v40 = 1<7+0<2 ; 128 ; min subproc func value 9331 9022 9331 9022 ; function codes for subprocs 9332 9022 ; bit 1<0 should be added, if data follows 9333 9022 9333 9022 v50 = 1<7+3<2 ; 140 ; input 9334 9022 v51 = v50+1<1 ; 142 ; answer input 9335 9022 v52 = 1<7+4<2 ; 144 ; output 9336 9022 v53 = v52+1<1 ; 146 ; answer output 9337 9022 v54 = 1<7+5<2 ; 148 ; message 9338 9022 v55 = v54+1<1 ; 150 ; answer message 9339 9022 v56 = 1<7+6<2 ; 152 ; user name 9340 9022 v57 = v56+1<1 ; 154 ; answer user name 9341 9022 v58 = 1<7+7<2 ; 156 ; attention 9342 9022 v59 = v58+1<1 ; 158 ; answer attention 9343 9022 9343 9022 ; definition of bitpatterns in state-field of subprocs (p12) 9344 9022 9344 9022 v70 = 2.0001 <8 ; subproc blocked 9345 9022 v71 = 2.0010 <8 ; answer attention pending 9346 9022 v72 = 2.0100 <8 ; messages pending 9347 9022 9347 9022 ; bit 0 - 7 are reserved for bufno (used in answer attention) 9348 9022 \f 9348 9022 9348 9022 9348 9022 ; process description of subprocess: 9349 9022 ; 9350 9022 ; monitor part: 9351 9022 ; a48: ; interval 9352 9022 ; a49: ; interval 9353 9022 ; a10: ; kind 9354 9022 ; a11: ; name 9355 9022 ; a50: ; mainproc 9356 9022 ; a52: ; reserver 9357 9022 ; a53: ; users 9358 9022 ; a54: ; first message 9359 9022 ; a55: ; last message 9360 9022 ; a56: ; external state 9361 9022 9361 9022 ; specific part: 9362 9022 p0 =a56+2 ; first(specific part) 9363 9022 p1 =p0+v1 ; top(specific part) 9364 9022 9364 9022 ; mainprocess part: 9365 9022 p11=p1 , p9=p11+1 ; devhost linkno, jobhost linkno 9366 9022 p10=p11+2 , p8=p10+1 ; subkind, data quality 9367 9022 p12=p10+2 ; state(sub) 9368 9022 p14=p12+2 ; next subprocess 9369 9022 p15=p14+2 ; last subprocess 9370 9022 p16=p15+2 , p17=p16+1 ; buffers free , current bufno 9371 9022 p18=p16+2 ; max bufsize(in bytes) 9372 9022 p7=p18+2 , p6=p7+1 ; devhost net-id, devhost home-reg 9373 9022 p5=p7+2 ; devhost host-id 9374 9022 p13=p5+2 ; current message 9375 9022 p19=p13+2 ; start(mess buf table): 9376 9022 a79=p19+v0<1 ; top(mess buf table) 9377 9022 9377 9022 c.(:a63-p10:)*(:a63-p10:)-1, m. name error a63 9378 9022 z. 9379 9022 c.(:a64-p12:)*(:a64-p12:)-1, m. name error a64 9380 9022 z. 9381 9022 9381 9022 ; process description of mainprocess: 9382 9022 ; 9383 9022 ; monitor part: 9384 9022 ; a48: ; interval 9385 9022 ; a49: ; interval 9386 9022 ; a10: ; kind 9387 9022 ; a11: ; name 9388 9022 ; a50: ; 9389 9022 ; a52: ; reserver 9390 9022 ; a53: ; users 9391 9022 ; a54: ; first message 9392 9022 ; a55: ; last message 9393 9022 ; a56: ; 9394 9022 9394 9022 ; p0 ; start of spec part: 9395 9022 s0=p0 ; start(ne t record) 9396 9022 s1=s0+2 ; top(test buffer) 9397 9022 s4=s1+2 ; start(testbuffer) 9398 9022 s5=s4+2 ; top(testbuffer) 9399 9022 ; mask0(00:23) 9400 9022 s2=s5+4 ; mask0(24:47) 9401 9022 ; mask1(48:71) 9402 9022 s3=s2+4 ; mask1(72:95) 9403 9022 9403 9022 ; subprocess queue: 9404 9022 ; ; not used 9405 9022 ; p14 ; next subprocess 9406 9022 ; p15 ; last subprocess 9407 9022 s16=p15+2 , s17=s16+1 ; ready flag (operation,mode) 9408 9022 s6=s16+2 ; counter 9409 9022 s7=s6+2 ; home-reg<16+host-id 9410 9022 \f 9410 9022 9410 9022 ; transmit parameters: 9411 9022 ; ******************** 9412 9022 9412 9022 b. i0 w. 9413 9022 i0=s7+2 9414 9022 9414 9022 ; line parameters 9415 9022 p66=i0 , i0=i0+2; size 9416 9022 p60=i0 , , i0=i0+2; internal status, unused 9417 9022 p65=i0 , i0=i0+2; first data 9418 9022 p72=i0 , i0=i0+2; address code, unused 9419 9022 p71=i0 , i0=i0+2; message buffer 9420 9022 9420 9022 ; intermediate control parameters 9421 9022 9421 9022 p79=i0 , i0=i0+2; local function 9422 9022 9422 9022 ; packet control parameters 9423 9022 9423 9022 p301=i0 , p302=i0 , i0=i0+2; rec net-id, rec home-reg 9424 9022 p303=i0 , i0=i0+2; rec host-id 9425 9022 p304=i0 , i0=i0+2; packet-id 9426 9022 p305=i0 , i0=i0+2; facility mask 9427 9022 p306=i0 , i0=i0+2; priority 9428 9022 9428 9022 ; device control parameters 9429 9022 9429 9022 p69=i0 , p78=i0+1 , i0=i0+2; rec linkno, sender linkno 9430 9022 p64=i0 , i0=i0+2; size 9431 9022 p61=i0 , p68=i0+1 , i0=i0+2; function, bufno 9432 9022 p62=i0 , p308=i0+1, i0=i0+2; state, data quality 9433 9022 p63=i0 , i0=i0+2; mode 9434 9022 9434 9022 ; internal mainproc parameters 9435 9022 9435 9022 p67=i0 , , i0=i0+2; error count, unused 9436 9022 p70=i0 , i0=i0+2; proc. description 9437 9022 p73=i0 , p76=i0+1 , i0=i0+2; operation, blockcontrol 9438 9022 p77=i0 , p74=i0+1 , i0=i0+2; contents, result 9439 9022 p75=i0 , i0=i0+16; header transmit area 9440 9022 \f 9440 9022 9440 9022 ; receive parameters 9441 9022 ; ****************** 9442 9022 9442 9022 ; line parameters 9443 9022 9443 9022 p86=i0 , i0=i0+2; size 9444 9022 p80=i0 , , i0=i0+2; internal status, unused 9445 9022 p85=i0 , i0=i0+2; first data 9446 9022 p92=i0 , , i0=i0+2; address code, unused 9447 9022 p91=i0 , i0=i0+2; message buffer 9448 9022 9448 9022 ; intermediate control parameters 9449 9022 9449 9022 p99=i0 , , i0=i0+2; local function, unused 9450 9022 9450 9022 ; packet control parameters 9451 9022 9451 9022 p321=i0, p322=i0+1, i0=i0+2; sender net-id, sender home-reg 9452 9022 p323=i0 , i0=i0+2; sender host-id 9453 9022 p324=i0 , i0=i0+2; packet-id 9454 9022 p325=i0 , i0=i0+2; facility mask 9455 9022 p326=i0, p327=i0+1, i0=i0+2; packets in unit, packetno in unit 9456 9022 9456 9022 ; device control parameters 9457 9022 9457 9022 p89=i0 , p98=i0+1 , i0=i0+2; rec linkno, sender linkno 9458 9022 p84=i0 , i0=i0+2; size 9459 9022 p81=i0 , p88=i0+1 , i0=i0+2; function, bufno 9460 9022 p82=i0 , p328=i0+1, i0=i0+2; result, data quality 9461 9022 p83=i0 , i0=i0+2; status 9462 9022 9462 9022 ; internal mainproc parameters 9463 9022 9463 9022 p87=i0 , , i0=i0+2; error count, unused 9464 9022 p90=i0 , i0=i0+2; proc. description 9465 9022 p93=i0 , p96=i0+1 , i0=i0+2; operation, blockcontrol 9466 9022 p97=i0 , p94=i0+1 , i0=i0+2; contents, result 9467 9022 p95=i0 , i0=i0+16; header rec. area 9468 9022 9468 9022 p100=i0 ; top of std process description 9469 9022 9469 9022 e. ; 9470 9022 \f 9470 9022 9470 9022 9470 9022 ; definition of internal constants. 9471 9022 9471 9022 p101=(:a84>2a.1:)-1 ; test switch, on: 0, off: -1 9472 9022 p102=(:a82>2a.1:)-1 ; statistics , on: 0, off: -1 9473 9022 p103=1 ; rc4000: 0, rc8000: 1 9474 9022 9474 9022 a65=p100 ; top of process description 9475 9022 9475 9022 p109=100 ; monitor procedure number of start-io 9476 9022 9476 9022 p110=80 ; kind of mainproc 9477 9022 p111=82 ; kind of hostproc 9478 9022 p112=84 ; kind of local subproc 9479 9022 p113=85 ; kind of free or remote subproc 9480 9022 p114=86 ; kind of receiver 9481 9022 p115=88 ; kind of transmitter 9482 9022 9482 9022 p120=2.0000 ; state:=ready 9483 9022 p121=2.0001 ; state:=waiting for buffers 9484 9022 p122=2.0010 ; state:=waiting for poll 9485 9022 9485 9022 p140=5 ; max number of errors 9486 9022 p141=50 ; max number of errors using short timer under initiation 9487 9022 9487 9022 p160=0 ; internal status:=ok 9488 9022 p161=1 ; internal status:=wait 9489 9022 p162=2 ; internal status:=skip 9490 9022 p163=3 ; internal status:=reject 9491 9022 p164=-1 ; internal status:=regret 9492 9022 9492 9022 p210=p0+42+7*6 ; rel top of proc desc(rec) 9493 9022 p211=p0+58+7*6 ; rel top of proc desc(trm) 9494 9022 9494 9022 p200=p100-a220 ; start(receiver proc) - start (mainproc) 9495 9022 p201=p200+p210-a220 ; start(transmitter proc) - start(mainproc) 9496 9022 p202=p201+p211-a250 ; start(hostproc) - start(mainproc) 9497 9022 9497 9022 9497 9022 ; format of startbyte: 9498 9022 ; (0:0) blocknumber mod 2 9499 9022 ; (1:3) not used 9500 9022 ; (4:4) data bit 9501 9022 ; (5:5) header bit 9502 9022 ; (6:6) data flag 9503 9022 ; (7:7) special function bit 9504 9022 9504 9022 ; format of header block: 9505 9022 ; line control: 9506 9022 ; word0 (00:15) size of succeeding text block 9507 9022 ; host control: 9508 9022 ; (16:23) local function 9509 9022 ; word1 (08:15) net-id 9510 9022 ; (16:23) home-reg 9511 9022 ; word2 (00:15) host-id 9512 9022 ; message control: 9513 9022 ; word4 (15:23) format 9514 9022 ; word5 (00:23) depends on format 9515 9022 ; word6 (00:23) depends on format 9516 9022 ; word7 (00:23) depends on format 9517 9022 ; 9518 9022 ; if device control protocol (format=0) then 9519 9022 ; device control: 9520 9022 ; (15:23) sender linkno 9521 9022 ; word5 (00:05) data quality 9522 9022 ; (06:15) receiver linkno 9523 9022 ; word5,6 (16:07) size 9524 9022 ; word6 (08:15) bufferno 9525 9022 ; (16:23) function 9526 9022 ; word7 (00:02) state/result 9527 9022 ; (03:15) mode/status 9528 9022 9528 9022 ; format of statusbyte: 9529 9022 ; (0:0) blocknumber mod 2 9530 9022 ; (1:3) not used 9531 9022 ; (4:5) blockcontrol 9532 9022 ; (6:6) blocklength flag 9533 9022 ; (7:7) parity flag 9534 9022 9534 9022 ; the value of operation should be interpreted in this way: 9535 9022 ; value= 2.00xxxxxx1x : the block contains a data area 9536 9022 ; 2.00xxxxx1xx : the block contains a header area 9537 9022 ; 2.00xxxx11xx : the header implies a data block 9538 9022 ; 2.xxxx01xxxx : short delay (wait delay, reset delay) 9539 9022 ; 2.xxxx10xxxx : long delay (poll delay) 9540 9022 ; 2.xxxxxxxxx1 : error actions off 9541 9022 ; 2.xxx1xxxxxx : initiate 9542 9022 ; 2.xx1xxxxxxx : reset 9543 9022 ; 2.01xxxxxxxx : master clear 9544 9022 ; 2.10xxxxxxxx : accept master clear 9545 9022 \f 9545 9022 9545 9022 9545 9022 ; log and test facility. 9546 9022 9546 9022 ; format of test record: 9547 9022 ; +0 : type, length(record) 9548 9022 ; +2 : time1 9549 9022 ; +4 : time2 9550 9022 ; +6 : test information 9551 9022 ; +8 : ... 9552 9022 ; +10: ... 9553 9022 ; 9554 9022 ; the call of the test facility is performed like this: 9555 9022 ; b.f1 w. ; 9556 9022 ; rs. w3 f0. ; save w3; 9557 9022 ; jl. w3 f4. ; check condition(type,on/off); 9558 9022 ; <type> ; type of test point 9559 9022 ; f0:<saved w3> ; saved w3 9560 9022 ; ; off: w0-w2: unchanged, w3: saved w3; 9561 9022 ; jl. f1. ; goto end of test; 9562 9022 ; ..... ; on: w0-w2: unchanged, w3: start(internal test area); 9563 9022 ; ..... ; pack testinformation; 9564 9022 ; al w0 <first> ; first:=first(test area); 9565 9022 ; al w1 <last> ; last:=last(test area); 9566 9022 ; jl. w3 f5. ; create test record; 9567 9022 ; f1: ; end of test: 9568 9022 ; e. ; 9569 9022 9569 9022 ; the entry f6 may be used instead of f5 to 9570 9022 ; generate the testrecord. 9571 9022 ; additionally it will cause testoutput-generation to stop after 9572 9022 ; the number of records specified in w2. 9573 9022 9573 9022 c.p101 9574 9022 9574 9022 ; saved w-registers: 9575 9022 f0: 0 ; w0 9576 9024 f1: 0 ; w1 9577 9026 f2: 0 ; w2 9578 9028 f3: 0 ; w3 9579 9030 9579 9030 ; parameters: 9580 9030 f7: 0 ; proc 9581 9032 f8: 0 ; buffer 9582 9034 f9: 0 ; type, length 9583 9036 9583 9036 ; internal test area: 9584 9036 f10: 0, r.12 ; start: 9585 9060 f11=k-f10 ; size of test area 9586 9060 9586 9060 9586 9060 ; check condition(type,on/off). 9587 9060 ; checks the type of the test point stored in link against the test mask. 9588 9060 ; if test is off then the procedure returns to link+4. test on implies 9589 9060 ; that the test record is initiated, the registers are saved and return is made to link+6. 9590 9060 ; call: return: 9591 9060 ; w0 unchanged 9592 9060 ; w1 unchanged 9593 9060 ; w2 unchanged 9594 9060 ; w3 link saved w3 (off), start(internal test area) (on) 9595 9060 b.i0,j1 w. 9596 9060 f4: ds. w1 f1. ; check condition: 9597 9062 rs. w2 f2. ; 9598 9064 rs. w3 i0. ; save link; 9599 9066 rl w0 x3+2 ; 9600 9068 rs. w0 f3. ; save saved w3; 9601 9070 gg w0 8.61<1 ; w0:=register select switches; 9602 9072 so w0 1<5<1 ; if left bit off then 9603 9074 jl. j0. ; goto exit2; 9604 9076 rl w1 b19 ; proc:=current proc; 9605 9078 rl w0 x1+a10 ; 9606 9080 se w0 p110 ; if kind(proc)<>mainprockind then 9607 9082 rl w1 x1+a50 ; proc:=mainproc(proc); 9608 9084 rl w0 x1+a10 ; 9609 9086 se w0 p110 ; if kind(proc)<>mainprockind then 9610 9088 jl. j0. ; goto exit2; 9611 9090 rs. w1 f7. ; save proc; 9612 9092 rl w3 x3 ; 9613 9094 sl w3 48 ; if type>=48 then 9614 9096 am s3-s2 ; mask:=mask1; 9615 9098 dl w1 x1+s2 ; shift:=type-48; 9616 9100 sl w3 48 ; else 9617 9102 am -48 ; mask:=mask0; 9618 9104 ld w1 x3 ; shift:=type; 9619 9106 sl w0 0 ; if mask shifted shift>=0 then 9620 9108 jl. j0. ; goto exit2; 9621 9110 hs. w3 f9. ; type:=type of test point; 9622 9112 dl. w1 f1. ; 9623 9114 rl. w2 f2. ; restore w0-w2; 9624 9116 al. w3 f10. ; w3:=start(test area); 9625 9118 am. (i0.) ; 9626 9120 jl +6 ; exit1: return to link+6; 9627 9122 9627 9122 j0: dl. w1 f1. ; exit2: 9628 9124 dl. w3 f3. ; restore w0-w3; 9629 9126 am. (i0.) ; 9630 9128 jl +4 ; return to link+4; 9631 9130 9631 9130 i0: 0 ; saved link; 9632 9132 e. 9633 9132 9633 9132 ; create test record. 9634 9132 ; creates a test record with the format shown above. 9635 9132 ; call: return: 9636 9132 ; w0 first saved w0 9637 9132 ; w1 last saved w1 9638 9132 ; w2 saved w2 9639 9132 ; w3 link saved w3 9640 9132 b.i6,j6 w. 9641 9132 f5: al w1 x1+2 ; create test record: 9642 9134 ds. w1 i1. ; top:=last+2; 9643 9136 ds. w3 i3. ; save w0-w3; 9644 9138 rl w1 b19 ; 9645 9140 rx. w1 f7. ; current proc:=mainproc; 9646 9142 rs w1 b19 ; save old buffer; 9647 9144 j0: rl. w2 i1. ; start: 9648 9146 ws. w2 i0. ; length(record):= 9649 9148 al w2 x2+6 ; top-first+6; 9650 9150 hs. w2 f9.+1 ; save length; 9651 9152 wa w2 x1+s0 ; start(next record):= 9652 9154 sh w2 (x1+s1) ; start(next record)+length; 9653 9156 jl. j2. ; if start(next record)>top(test buffer) then 9654 9158 ; goto insert; 9655 9158 j1: rl w2 x1+s1 ; insert dummy end record: 9656 9160 ws w2 x1+s0 ; length(dummy record):=top(test buffer)-start(next record); 9657 9162 sl w2 1 ; if length(dummy record)>0 then 9658 9164 rs w2 (x1+s0) ; dummy record:=0,length; 9659 9166 j5: al w0 0 ; send answer: 9660 9168 rs w0 x1+s0 ; start(next record):=0; 9661 9170 dl w0 x1+s5 ; 9662 9172 ds w0 x1+s1 ; 9663 9174 jl. j0. ; goto start; 9664 9176 ; insert: 9665 9176 j2: rx w2 x1+s0 ; 9666 9178 rl. w0 f9. ; insert 9667 9180 rs w0 x2 ; type, length; 9668 9182 jd 1<11+36 ; get clock; 9669 9184 ds w1 x2+4 ; insert time in testrecord; 9670 9186 al w2 x2+4+2 ; 9671 9188 rl. w3 i0. ; 9672 9190 j3: sl. w3 (i1.) ; transfer test information; 9673 9192 jl. j4. ; 9674 9194 rl w0 x3 ; 9675 9196 rs w0 x2 ; 9676 9198 al w2 x2+2 ; 9677 9200 al w3 x3+2 ; 9678 9202 jl. j3. ; 9679 9204 j4: rl. w1 f7. ; exit: 9680 9206 rx w1 b19 ; restore current proc 9681 9208 rl w2 x1+s6 ; if counter(main)<>0 then 9682 9210 sn w2 0 ; begin comment: generation stopping; 9683 9212 jl. j6. ; counter(main):= counter(main)-1 9684 9214 al w2 x2-1 ; 9685 9216 rs w2 x1+s6 ; if counter(main)=0 then 9686 9218 se w2 0 ; testmask(main):= 0 9687 9220 jl. j6. ; 9688 9222 ld w0 -100 ; 9689 9224 ds w0 x1+s2 ; 9690 9226 ds w0 x1+s3 ; 9691 9228 j6: dl. w1 f1. ; 9692 9230 dl. w3 f3. ; restore w0-w3; 9693 9232 jl. (i3.) ; return to calling program; 9694 9234 9694 9234 i0: 0 ; first 9695 9236 i1: 0 ; last 9696 9238 i2: 0 ; 9697 9240 i3: 0 ; link 9698 9242 9698 9242 e. 9699 9242 9699 9242 ; procedure stop testoutput 9700 9242 ; 9701 9242 ; this procedure will generate a testrecord. 9702 9242 ; 9703 9242 ; additionally it will stop testoutput after generation 9704 9242 ; of the number of records specified in w2 at call. 9705 9242 ; 9706 9242 ; function: a counter in mainproc is set to the value 9707 9242 ; specified in w2. when the counter is nonzero, it is decreased 9708 9242 ; by one after generation of each testrecord. if this makes 9709 9242 ; the counter zero, the testmask is set to zero. 9710 9242 ; 9711 9242 ; after one call of f6, further calls will only change 9712 9242 ; the counter, if the value specified in w2 is less than the 9713 9242 ; current value of the counter (provided, the counter is 9714 9242 ; nonzero). 9715 9242 ; 9716 9242 ; call return 9717 9242 ; w0 value before testpoint 9718 9242 ; w1 value before testpoint 9719 9242 ; w2 counter value before testpoint 9720 9242 ; w3 link value before testpoint 9721 9242 9721 9242 b. i0 w. ; 9722 9242 f6: ; 9723 9242 rs. w3 i0. ; save link 9724 9244 rl. w3 f7. ; 9725 9246 rx w2 x3+s6 ; if counter(main)=0 or 9726 9248 se w2 0 ; counter(main)>counter then 9727 9250 sl w2 (x3+s6) ; 9728 9252 jl. +4 ; 9729 9254 rx w2 x3+s6 ; counter(main):= counter 9730 9256 rl. w3 i0. ; link:= saved link 9731 9258 jl. f5. ; goto create testrecord 9732 9260 ; 9733 9260 i0: 0 ; saved link 9734 9262 e. ; 9735 9262 9735 9262 z. 9736 9262 \f 9736 9262 9736 9262 ; mainprocess. 9737 9262 ; 9738 9262 ; the mainprocess accepts messages of the following types: 9739 9262 ; start transmitter 0<12 9740 9262 ; start 2<12 9741 9262 ; reset 4<12 9742 9262 ; transfer block 5<12 9743 9262 ; autoload 6<12 9744 9262 ; master clear 8<12 9745 9262 ; set mask 12<12 9746 9262 ; 9747 9262 ; mode in start transmit mess: 9748 9262 ; 0 poll 9749 9262 ; 1 accept master clear 9750 9262 ; 2 reset, initiate, poll 9751 9262 ; 3 reset, initiate, accept master clear 9752 9262 ; 9753 9262 ; 9754 9262 9754 9262 ; mode in reset mess: 9755 9262 ; 0 remote subprocs are removed; local subprocs are cleaned i. e. 9756 9262 ; pending messages are returned with result 4 (malfunction). 9757 9262 ; 9758 9262 ; 2 all subprocs are removed. 9759 9262 9759 9262 ; to execute operations the sender must be 9760 9262 ; op: 0 .. 9761 9262 ; 3 reserver of main or receiver 9762 9262 ; 4 reserver of main 9763 9262 ; 5 reserver of main or transmitter 9764 9262 ; 6 reserver of main 9765 9262 ; 8 reserver of main 9766 9262 ; 12 neither reservation nor user inclusion is demanded 9767 9262 \f 9767 9262 9767 9262 b.i10,j10 w. 9768 9262 9768 9262 a0=1<23 ; 9769 9262 a0>0+a0>3+a0>4+a0>5+a0>6+a0>8+a0>12 9770 9264 i0: a0>0+a0>1+a0>2+a0>3 9771 9266 9771 9266 9771 9266 h80: bz w0 x2+8 ; start main: 9772 9268 sn w0 12 ; if op=12 then 9773 9270 jl. j10. ; goto setmask; 9774 9272 sz w0 2.1 ; if operation odd then 9775 9274 am g14-g15 ; check user; 9776 9276 jl w3 g15 ; else check reserver; 9777 9278 dl. w1 i0. ; 9778 9280 jl w3 g16 ; check operation(0.3.4.6.8.12,0); 9779 9282 rl w1 b19 ; 9780 9284 jl. m10. ; goto supervise; 9781 9286 9781 9286 j10: rl w1 b19 ; set mask: 9782 9288 dl w0 x2+12 ; 9783 9290 ds w0 x1+s2 ; mask0:=mask(0:47); 9784 9292 dl w0 x2+16 ; 9785 9294 ds w0 x1+s3 ; mask1:=mask(48:95); 9786 9296 al w0 0 ; 9787 9298 rs w0 g20 ; status:=0; 9788 9300 jl w3 g18 ; deliver result1; 9789 9302 jl (b20) ; exit: return to sender; 9790 9304 e. 9791 9304 \f 9791 9304 9791 9304 9791 9304 ; initiate part. 9792 9304 9792 9304 b.i10,j10 w. 9793 9304 i2: 0<12+2.00 ; message: start transmitter, poll 9794 9306 i6: 0<12+2.10 ; message: start transmitter, reset, initiate, poll 9795 9308 i7: 0<12+2.11 ; message: start transmitter, reset, initiate, accept master clear 9796 9310 i4: 0,r.7 ; answer: dummy 9797 9324 i5: 0 ; saved message buffer 9798 9326 9798 9326 9798 9326 ; entry from send message. 9799 9326 9799 9326 ; w1: main, w2: addr(message buffer). 9800 9326 9800 9326 m10: rl w3 x2+8 ; supervise: 9801 9328 rs. w2 i5. ; save mess buffer; 9802 9330 rs w3 x1+s16 ; operation:=operation(message); 9803 9332 c.p101 b.f1 w. ;*****test1***** 9804 9332 rs. w3 f0. ; 9805 9334 jl. w3 f4. ; 9806 9336 1 ; 9807 9338 f0: 0 ; 9808 9340 jl. f1. ; 9809 9342 al w0 x2+8 ; dump message(0:8); 9810 9344 al w1 x2+8+8 ; 9811 9346 jl. w3 f5. ; 9812 9348 f1: ; 9813 9348 e.z. ;*****test1***** 9814 9348 bz w3 6 ; 9815 9350 am x3 ; 9816 9352 jl. (x3+2) ; goto case operation of 9817 9354 m11 ; (0: start transmitter(mode), 9818 9356 -1 ; 1: not allowed, 9819 9358 -1 ; 2: not allowed, 9820 9360 m12 ; 3: receive block, 9821 9362 m13 ; 4: reset, 9822 9364 m14 ; 5: transmit block, 9823 9366 m14 ; 6: autoload, 9824 9368 -1 ; 7: not allowed, 9825 9370 m15 ; 8: master clear); 9826 9372 9826 9372 ; reset. 9827 9372 m13: bz w0 x1+s17 ; reset: function:= mode(mess); 9828 9374 jl. w3 n14. ; clear subprocesses(main,function); 9829 9376 rl. w2 i5. ; load mess buffer; 9830 9378 al w0 0 ; 9831 9380 rs w0 g20 ; status(mess):=0; 9832 9382 jl w3 g18 ; deliver result(status); 9833 9384 jl (b20) ; goto std waiting point; 9834 9386 9834 9386 ; start transmitter. 9835 9386 m11: jl w3 g18 ; start transmitter: deliver result1(dummy); 9836 9388 al. w1 i4. ; 9837 9390 rl. w2 i5. ; 9838 9392 jd 1<11+18 ; wait answer; 9839 9394 rl w1 b19 ; 9840 9396 jl. w3 n5. ; set host-id; 9841 9398 al w0 0 ; 9842 9400 hs w0 x1+p67 ; errorcount:=0; 9843 9402 j2: al w0 4 ; repeat: function:= clean; 9844 9404 jl. w3 n14. ; clear subprocesses(main,function); 9845 9406 bz w0 x1+p67 ; 9846 9408 ba. w0 1 ; errorcount:=errorcount + 1; 9847 9410 hs w0 x1+p67 ; 9848 9412 sl w0 p141 ; if errorcount>max errorcount then 9849 9414 am 4.00200 ; operation:=long delay; 9850 9416 al w3 4.00000 ; else operation:=no delay; 9851 9418 bz w0 x1+s17 ; 9852 9420 sz w0 2.01 ; if mode=accept master clear then 9853 9422 am 4.20000 ; operation:=operation and acc master clear,no test; 9854 9424 al w3 x3+4.00001; else operation:=operation and dummy,no test; 9855 9426 sz w0 2.10 ; if mode=initiate then 9856 9428 al w3 x3+4.03100; operation:=operation and reset,short delay, initiate; 9857 9430 hs w3 x1+p73 ; operation(trm):=operation; 9858 9432 jl. w3 e11. ; call transmitter(operation); 9859 9434 c.p101 b.f1 w. ;*****test4***** 9860 9434 rs. w3 f0. ; 9861 9436 jl. w3 f4. ; 9862 9438 4 ; 9863 9440 f0: 0 ; 9864 9442 jl. f1. ; 9865 9444 al w0 x1+p73 ; 9866 9446 al w1 x1+p77 ; 9867 9448 jl. w3 f5. ; 9868 9450 f1: ; 9869 9450 e.z. ;*****test4***** 9870 9450 bl w0 x1+p74 ; 9871 9452 se w0 0 ; if result<>0 then 9872 9454 jl. j2. ; goto repeat; 9873 9456 rs w0 x1+s16 ; ready flag:=running; 9874 9458 jl. m2. ; goto continue transmit; 9875 9460 9875 9460 ; receive block. 9876 9460 m12: al w1 x1+p200 ; receive block: 9877 9462 rs w1 b19 ; curr:=receiver; 9878 9464 jl. h86. ; goto receiver; 9879 9466 9879 9466 ; transmit block, autoload. 9880 9466 m14: al w1 x1+p201 ; transmit block, autoload: 9881 9468 rs w1 b19 ; curr:=transmitter; 9882 9470 jl. (h87.) ; goto transmitter; 9883 9472 9883 9472 ; transmit master clear. 9884 9472 m15: al w0 0 ; transmit master clear: 9885 9474 rs w0 g20 ; status(mess):=0; 9886 9476 jl w3 g18 ; deliver result1(status); 9887 9478 rl w1 b19 ; 9888 9480 m16: al w0 0 ; break-down: 9889 9482 hs w0 x1+p67 ; errorcount:=0; 9890 9484 c.p101 b.f1 w. ;*****test7***** 9891 9484 rs. w3 f0. ; 9892 9486 jl. w3 f4. ; 9893 9488 7 ; 9894 9490 f0: 0 ; 9895 9492 jl. f1. ; 9896 9494 al w0 x1+2 ; 9897 9496 jl. w3 f5. ; 9898 9498 f1: ; 9899 9498 e.z. ;*****test7***** 9900 9498 jl. w3 n5. ; set host-id; 9901 9500 j0: al w0 4 ; repeat: function:= clean; 9902 9502 jl. w3 n14. ; clear subprocesses(main,function); 9903 9504 bz w0 x1+p67 ; 9904 9506 ba. w0 1 ; errorcount:=errorcount + 1; 9905 9508 hs w0 x1+p67 ; 9906 9510 sl w0 p141 ; if errorcount>max errorcount then 9907 9512 am 4.00100 ; delay:=long delay; 9908 9514 al w0 4.13101 ; else delay:=short delay; 9909 9516 hs w0 x1+p73 ; operation(trm):=master clear,initiate,reset,delay,error action off; 9910 9518 jl. w3 e11. ; call transmitter(operation); 9911 9520 bl w0 x1+p74 ; 9912 9522 c.p101 b.f1 w. ;*****test5***** 9913 9522 rs. w3 f0. ; 9914 9524 jl. w3 f4. ; 9915 9526 5 ; 9916 9528 f0: 0 ; 9917 9530 jl. f1. ; 9918 9532 al w0 x1+2 ; 9919 9534 jl. w3 f5. ; 9920 9536 f1: ; 9921 9536 e.z. ;*****test5***** 9922 9536 se w0 0 ; if result<>ok then 9923 9538 jl. j0. ; goto repeat; 9924 9540 j1: al w0 4.03111 ; operation(rec):=initiate,reset,short delay, 9925 9542 hs w0 x1+p93 ; header,error actions off; 9926 9544 jl. w3 e10. ; call receiver(operation); 9927 9546 bl w0 x1+p94 ; 9928 9548 c.p101 b.f1 w. ;*****test6***** 9929 9548 rs. w3 f0. ; 9930 9550 jl. w3 f4. ; 9931 9552 6 ; 9932 9554 f0: 0 ; 9933 9556 jl. f1. ; 9934 9558 al w0 x1+2 ; 9935 9560 jl. w3 f5. ; 9936 9562 f1: ; 9937 9562 e.z. ;*****test6***** 9938 9562 sn w0 8 ; if result=abnormal termination(reset rec) then 9939 9564 jl. j1. ; goto restart rec; 9940 9566 se w0 10 ; if result<>accept master clear then 9941 9568 jl. j0. ; goto repeat; 9942 9570 al. w2 i2. ; message:=start trm, poll; 9943 9572 jl. w3 n4. ; send trm message(message); 9944 9574 al w0 4.01010 ; 9945 9576 hs w0 x1+p93 ; operation:=initiate,header; 9946 9578 jl. m0. ; goto start receiver; 9947 9580 9947 9580 9947 9580 ; master clear received from device controller. 9948 9580 m8: al w0 4 ; master clear received: function:= clean; 9949 9582 jl. w3 n14. ; clear subprocesses(main,function); 9950 9584 c.p101 b.f1 w. ;*****test2***** 9951 9584 rs. w3 f0. ; 9952 9586 jl. w3 f4. ; 9953 9588 2 ; 9954 9590 f0: 0 ; 9955 9592 jl. f1. ; 9956 9594 al w0 x1+2 ; 9957 9596 jl. w3 f5. ; 9958 9598 f1: ; 9959 9598 e.z. ;*****test2***** 9960 9598 al. w2 i7. ; message:=start trm, reset, initiate, acc master clear; 9961 9600 jl. w3 n4. ; send trm message(message); 9962 9602 al w0 4.01010 ; 9963 9604 hs w0 x1+p93 ; operation:=initiate,header; 9964 9606 jl. m0. ; goto start receiver; 9965 9608 9965 9608 e. 9966 9608 h87: h88 ; address of start transmit 9967 9610 \f 9967 9610 9967 9610 ; receive part. 9968 9610 9968 9610 b.j10,i10 w. 9969 9610 9969 9610 m0: jl. w3 e10. ; start receive: call receiver; 9970 9612 m3: bz w3 x1+p94 ; continue receive: 9971 9614 c.p101 b.f1 w. ;*****test8***** 9972 9614 rs. w3 f0. ; 9973 9616 jl. w3 f4. ; 9974 9618 8 ; 9975 9620 f0: 0 ; 9976 9622 jl. f1. ; 9977 9624 al w0 x1+p86 ; 9978 9626 al w1 x1+p95+14 ; 9979 9628 jl. w3 f5. ; 9980 9630 f1: ; 9981 9630 e.z. ;*****test8***** 9982 9630 se w3 0 ; if result<>ok then 9983 9632 jl. j8. ; goto check result; 9984 9634 bz w0 x1+p97 ; 9985 9636 so w0 4.00002 ; if no dataflag then 9986 9638 jl. j0. ; goto header; 9987 9640 hs w3 x1+p80 ; data: internal status:=result(:=0); 9988 9642 rl w2 x1+p90 ; sub:=sub(rec); 9989 9644 jl. w3 e4. ; call entry4(sub); 9990 9646 bz w0 x1+p97 ; 9991 9648 j0: so w0 4.00010 ; header: if no headerbit then 9992 9650 jl. j4. ; goto ok; 9993 9652 jl. w3 n0. ; packout(header); 9994 9654 bz w0 x1+p99 ; if local function= 9995 9656 sn w0 1 ; host disconnect then 9996 9658 jl. j9. ; goto clear up 9997 9660 sn w0 2 ; if local function = host connected 9998 9662 jl. j10. ; then remove all links 9999 9664 se w0 0 ; 10000 9666 sn w0 3 ; if local function<>0 and 10001 9668 jl. +4 ; local function<>3 then 10002 9670 jl. j2. ; goto reject 10003 9672 bl w0 x1+p81 ; 10004 9674 al w2 x1+p202 ; if func(header)>=min subproc func value then 10005 9676 sh w0 v40-1 ; sub:=subproc(rec); 10006 9678 rs w2 x1+p90 ; else 10007 9680 rl w2 x1+p90 ; sub:=hostproc(main); 10008 9682 se w1 (x2+a50) ; if main(sub)<>main then 10009 9684 jl. j2. ; goto reject; 10010 9686 bz w0 x1+p97 ; if no databit then 10011 9688 so w0 4.00020 ; goto out; 10012 9690 jl. j1. ; 10013 9692 jl. w3 e3. ; call entry3(sub); 10014 9694 bz w0 x1+p80 ; 10015 9696 al w3 4.00012 ; operation:= if internal status=ok then 10016 9698 se w0 p160 ; data else header 10017 9700 al w3 4.00010 ; 10018 9702 jl. j6. ; goto setup1; 10019 9704 j1: jl. w3 e4. ; out: 10020 9706 bz w0 x1+p80 ; call entry4(sub); 10021 9708 jl. j5. ; goto setup; 10022 9710 10022 9710 j2: am p163-p162 ; reject: blockcontrol:=reject; 10023 9712 j3: am p162-p160 ; skip: blockcontrol:=skip; 10024 9714 j4: al w0 p160 ; ok: blockcontrol:=ok; 10025 9716 j5: al w3 4.00010 ; setup: operation:=header; 10026 9718 j6: hs w0 x1+p96 ; setup1: blockcontrol(main):=blockcontrol; 10027 9720 hs w3 x1+p93 ; operation(main):=operation; 10028 9722 ld w0 -100 ; 10029 9724 ds w0 x1+p95+2 ; clear header rec area; 10030 9726 ds w0 x1+p95+6 ; 10031 9728 ds w0 x1+p95+10 ; 10032 9730 ds w0 x1+p95+14 ; 10033 9732 jl. m0. ; goto start receive; 10034 9734 10034 9734 j8: ; check result: 10035 9734 c.p101 b.f1 w. ;*****test9***** 10036 9734 rs. w3 f0. ; 10037 9736 jl. w3 f4. ; 10038 9738 9 ; 10039 9740 f0: 0 ; 10040 9742 jl. f1. ; 10041 9744 al. w0 f0. ; 10042 9746 al. w1 f1. ; 10043 9748 al w2 2 ; 10044 9750 jl. w3 f6. ; 10045 9752 f1: ; 10046 9752 e.z. ;*****test9***** 10047 9752 sn w3 9 ; if result=master clear then 10048 9754 jl. m8. ; goto master clear; 10049 9756 sl w3 4 ; i result>3 then 10050 9758 jl. m16. ; goto break-down; 10051 9760 al w3 x3+3 ; internal status:=result+3; 10052 9762 hs w3 x1+p80 ; 10053 9764 rl w2 x1+p90 ; sub:=sub(rec); 10054 9766 jl. w3 e4. ; call entry4(sub); 10055 9768 jl. j3. ; goto skip; 10056 9770 10056 9770 ; a host has been disconnected from the network. 10057 9770 ; w1= main 10058 9770 10058 9770 j9: rl w0 x1+p323 ; host:= sender host-id(rec) 10059 9772 bz w2 x1+p321 ; net:= sender net-id(rec) 10060 9774 jl. w3 n15. ; clear subprocces(host, net, main) 10061 9776 jl. j4. ; goto ok 10062 9778 ; 10063 9778 ; local host connected . 10064 9778 ; the fe has just been autoloaded. 10065 9778 ; all previous links via this fpa must be removed. 10066 9778 ; 10067 9778 10067 9778 j10: jl. w3 n14. ; clear all subproc.main 10068 9780 jl. j4. ; w0=function=2 10069 9782 e. 10070 9782 \f 10070 9782 10070 9782 ; transmit part. 10071 9782 10071 9782 b.j10, i10 w. 10072 9782 10072 9782 m1: jl. w3 e11. ; start transmit: call transmitter; 10073 9784 m2: bz w3 x1+p74 ; continue transmit: 10074 9786 c.p101 b.f1 w. ;*****test12***** 10075 9786 rs. w3 f0. ; 10076 9788 jl. w3 f4. ; 10077 9790 12 ; 10078 9792 f0: 0 ; 10079 9794 jl. f1. ; 10080 9796 al w0 x1+p66 ; 10081 9798 al w1 x1+p75+14 ; 10082 9800 jl. w3 f5. ; 10083 9802 f1: ; 10084 9802 e.z. ;*****test12***** 10085 9802 se w3 0 ; if result<>0 then 10086 9804 jl. j6. ; goto result-error; 10087 9806 bz w3 x1+p76 ; status:=blockcontrol; 10088 9808 j2: hs w3 x1+p60 ; insert: internal status:=status; 10089 9810 bz w0 x1+p77 ; 10090 9812 sn w0 2.0000 ; if contents=dummy then 10091 9814 jl. j1. ; goto get-next; 10092 9816 sz w0 2.1000 ; if databit 10093 9818 se w3 p160 ; or result<>ok then 10094 9820 jl. j0. ; goto aftertrm; 10095 9822 al w0 4.00002 ; 10096 9824 hs w0 x1+p73 ; operation:=data; 10097 9826 jl. m1. ; goto start transmit; 10098 9828 ; aftertrm: 10099 9828 10099 9828 j0: rl w2 x1+p70 ; sub:=subproc(trm); 10100 9830 jl. w3 n12. ; queue out(sub); 10101 9832 rl w0 x2+a50 ; if main(sub)<>main then 10102 9834 se w0 x1 ; 10103 9836 jl. j1. ; goto get next subprocess 10104 9838 jl. w3 e2. ; call entry2(sub); 10105 9840 ; goto get next subprocess; 10106 9840 e7: ; entry-get next: 10107 9840 j1: rl w2 x1+p14 ; get next: 10108 9842 sn w2 x1+p14 ; if queue is empty then 10109 9844 jl. j4. ; goto poll; 10110 9846 al w2 x2-p14 ; 10111 9848 bz w0 x1+p60 ; 10112 9850 sn w0 p161 ; if internal status=wait and 10113 9852 se w2 (x1+p70) ; and new sub=proc desc then 10114 9854 am -4.00100 ; operation:=short delay 10115 9856 al w0 4.00100 ; else operation:=no delay; 10116 9858 hs w0 x1+p73 ; 10117 9860 ld w0 -100 ; 10118 9862 ds w0 x1+p60 ; 10119 9864 ds w0 x1+p72 ; 10120 9866 ds w0 x1+p79 ; 10121 9868 ds w0 x1+p303 ; 10122 9870 ds w0 x1+p64 ; 10123 9872 ds w0 x1+p62 ; 10124 9874 rs w0 x1+p63 ; 10125 9876 rs w2 x1+p70 ; subproc(rec):=subproc(queue); 10126 9878 jl. w3 e1. ; call entry1(sub); 10127 9880 bz w0 x1+p60 ; 10128 9882 se w0 p160 ; if internal status<>ok then 10129 9884 jl. j3. ; goto regretted; 10130 9886 jl. w3 n1. ; packin(header); 10131 9888 rl w0 x1+p66 ; 10132 9890 bz w3 x1+p73 ; 10133 9892 se w0 0 ; if lineparam.size<>0 then 10134 9894 am 4.00020 ; operation:=header, data; 10135 9896 al w3 x3+4.00010; else 10136 9898 hs w3 x1+p73 ; operation:=transmit header; 10137 9900 jl. m1. ; goto start transmit; 10138 9902 10138 9902 j3: jl. w3 n12. ; regretted: queue out(sub); 10139 9904 jl. j1. ; goto get next; 10140 9906 10140 9906 j4: al w0 4.00200 ; poll: 10141 9908 hs w0 x1+p73 ; operation:=long delay; 10142 9910 jl. m1. ; goto start transmit; 10143 9912 10143 9912 j5: ; special actions: 10144 9912 10144 9912 j6: ; result-error: 10145 9912 c.p101 b.f1 w. ;*****test13***** 10146 9912 rs. w3 f0. ; 10147 9914 jl. w3 f4. ; 10148 9916 13 ; 10149 9918 f0: 0 ; 10150 9920 jl. f1. ; 10151 9922 al. w0 f0. ; 10152 9924 al. w1 f0. ; 10153 9926 al w2 4 ; 10154 9928 sh. w2 (f0.) ; 10155 9930 am f6-f5 ; 10156 9932 jl. w3 f5. ; 10157 9934 f1: ; 10158 9934 e.z. ;*****test13***** 10159 9934 sl w3 4 ; if max errors exceeded then 10160 9936 jl. m16. ; goto break-down; 10161 9938 al w3 x3+3 ; status:=result+3; 10162 9940 jl. j2. ; goto insert; 10163 9942 10163 9942 e. 10164 9942 10164 9942 \f 10164 9942 10164 9942 ; main help procedures. 10165 9942 ; packout. 10166 9942 ; call: return: 10167 9942 ; w0 destroyed 10168 9942 ; w1 main unchanged 10169 9942 ; w2 unchanged 10170 9942 ; w3 link destroyed 10171 9942 10171 9942 10171 9942 b. i10 w. 10172 9942 n0: ; packout: 10173 9942 ds. w3 i1. ; save link and w2 10174 9944 dl w0 x1+p95+2 ; unpack 10175 9946 al w2 0 ; 10176 9948 ld w3 16 ; 10177 9950 rs w2 x1+p86 ; line.size 10178 9952 al w2 0 ; 10179 9954 ld w3 8 ; 10180 9956 hs w2 x1+p99 ; local function 10181 9958 ; 10182 9958 ld w0 16 ; 10183 9960 la. w3 i2. ; 10184 9962 hs w3 x1+p321 ; sender net-id 10185 9964 ld w0 8 ; 10186 9966 la. w3 i2. ; sender home-reg 10187 9968 hs w3 x1+p322 ; 10188 9970 ; 10189 9970 rl w0 x1+p95+4 ; 10190 9972 ls w0 -8 ; 10191 9974 rs w0 x1+p323 ; sender host-id 10192 9976 ; 10193 9976 dl w3 x1+p95+10 ; 10194 9978 ld w3 8 ; 10195 9980 la. w2 i3. ; 10196 9982 hs w2 x1+p98 ; sender linkno 10197 9984 al w2 0 ; 10198 9986 ld w3 6 ; 10199 9988 hs w2 x1+p328 ; data quality 10200 9990 ls w3 -14 ; 10201 9992 bz w0 x1+p99 ; 10202 9994 se w0 3 ; if local function=3 (regretted) then 10203 9996 jl. i10. ; exchange sender linkno, receiver linkno; 10204 9998 bz w0 x1+p98 ; 10205 10000 hs w3 x1+p98 ; 10206 10002 rl w3 0 ; 10207 10004 i10: hs w3 x1+p89 ; 10208 10006 ls w3 1 ; index:=rec linkno*2 + name table start; 10209 10008 wa w3 b4 ; 10210 10010 rl w3 x3 ; current proc(main):= proc(index) 10211 10012 rs w3 x1+p90 ; 10212 10014 ; 10213 10014 dl w0 x1+p95+14 ; 10214 10016 al w2 0 ; 10215 10018 ld w3 16 ; 10216 10020 rs w2 x1+p84 ; header.size 10217 10022 al w2 0 ; 10218 10024 ld w3 8 ; 10219 10026 hs w2 x1+p88 ; bufno 10220 10028 ; 10221 10028 rl w2 0 ; 10222 10030 la. w2 i4. ; 10223 10032 rs w2 x1+p83 ; status 10224 10034 al w3 0 ; 10225 10036 ld w0 8 ; 10226 10038 hs w3 x1+p81 ; function 10227 10040 al w3 0 ; 10228 10042 ld w0 3 ; 10229 10044 hs w3 x1+p82 ; result 10230 10046 ; 10231 10046 dl. w3 i1. ; restore w2 10232 10048 jl x3 ; goto link 10233 10050 10233 10050 i0: 0 ; saved w2 10234 10052 i1: 0 ; saved w3 10235 10054 i2: 8.377 ; last 8 bits 10236 10056 i3: 8.1777 ; last 10 bits 10237 10058 i4: 8.177777 ; last 16 bits 10238 10060 10238 10060 e. ; end of packout 10239 10060 10239 10060 ; packin. 10240 10060 ; call: return: 10241 10060 ; w0 destroyed 10242 10060 ; w1 main unchanged 10243 10060 ; w2 unchanged 10244 10060 ; w3 link unchanged 10245 10060 b. i10 w. 10246 10060 n1: ; packin: 10247 10060 rs. w3 i0. ; save link 10248 10062 rl w2 x1+p66 ; packin 10249 10064 ls w2 8 ; size 10250 10066 ba w2 x1+p79 ; 10251 10068 rs w2 x1+p75+0 ; local function 10252 10070 ; 10253 10070 bz w3 x1+p301 ; format(packet):= 0 10254 10072 ls w3 8 ; rec net-id 10255 10074 ba w3 x1+p302 ; 10256 10076 ds w3 x1+p75+2 ; rec home-reg 10257 10078 ; 10258 10078 rl w2 x1+p303 ; rec host-d 10259 10080 rl w3 x1+p304 ; packet-id 10260 10082 rl w0 x1+p305 ; facility mask 10261 10084 ; 10262 10084 ls w2 8 ; 10263 10086 ls w0 8 ; 10264 10088 ld w0 -8 ; 10265 10090 wa w2 6 ; 10266 10092 rs w2 x1+p75+4 ; 10267 10094 rs w0 x1+p75+6 ; 10268 10096 ; 10269 10096 bz w2 x1+p78 ; format(mes):= 0, sender linkno 10270 10098 al w3 0 ; 10271 10100 ld w3 -8 ; 10272 10102 rs w2 x1+p75+8 ; data quality 10273 10104 bz w2 x1+p308 ; 10274 10106 ls w2 10 ; 10275 10108 wa w2 6 ; 10276 10110 ba w2 x1+p69 ; receiver linkno 10277 10112 rs w2 x1+p75+10 ; 10278 10114 ; 10279 10114 rl w2 x1+p64 ; size 10280 10116 ls w2 8 ; 10281 10118 ba w2 x1+p68 ; bufferno 10282 10120 rs w2 x1+p75+12 ; 10283 10122 ; 10284 10122 bz w3 x1+p61 ; 10285 10124 ls w3 3 ; function 10286 10126 ba w3 x1+p62 ; 10287 10128 ls w3 13 ; 10288 10130 lo w3 x1+p63 ; mode 10289 10132 rs w3 x1+p75+14 ; 10290 10134 ; 10291 10134 jl. (i0.) ; goto return 10292 10136 10292 10136 i0: 0 ; saved link 10293 10138 10293 10138 e. ; end of packin 10294 10138 10294 10138 10294 10138 ; send trm message. 10295 10138 ; call: return: 10296 10138 ; w0 destroyed 10297 10138 ; w1 main unchanged 10298 10138 ; w2 addr(mess) destroyed 10299 10138 ; w3 link destroyed 10300 10138 b.i4 w. 10301 10138 n4: rs. w3 i0. ; send trm message: save link; 10302 10140 dl w0 x1+a11+2 ; 10303 10142 ds. w0 i2. ; 10304 10144 dl w0 x1+a11+6 ; transfer name of main proc; 10305 10146 ds. w0 i3. ; 10306 10148 al w1 x2 ; message:=message; 10307 10150 al. w3 i1. ; receiver:=main; 10308 10152 jd 1<11+16 ; send message; 10309 10154 rl w1 b19 ; 10310 10156 jl. (i0.) ; exit: return to link; 10311 10158 i0: 0 ; saved link 10312 10160 i1: 0 ; name of mainproc 10313 10162 i2: 0 ; 10314 10164 0 ; 10315 10166 i3: 0 ; 10316 10168 0 ; name table entry 10317 10170 e. 10318 10170 10318 10170 10318 10170 ; set host-id. 10319 10170 ; call: return: 10320 10170 ; w0 10321 10170 ; w1 main unchanged 10322 10170 ; w2 10323 10170 ; w3 link destroyed 10324 10170 b.i1 w. 10325 10170 n5: rs. w3 i0. ; set host-id: save link; 10326 10172 rl w0 x1+s7 ; 10327 10174 la. w0 i1. ; host-id(main):= 10328 10176 rs w0 x1+p303 ; host-id(main); 10329 10178 rl w0 x1+s7 ; 10330 10180 ls w0 -16 ; home-reg(trm):= home-reg(main); 10331 10182 hs w0 x1+p302 ; 10332 10184 al w0 2 ; local function(trm):= host-up; 10333 10186 hs w0 x1+p79 ; 10334 10188 jl. w3 n1. ; packin; 10335 10190 jl. (i0.) ; exit: return to link; 10336 10192 i0: 0 ; saved link 10337 10194 i1: 8.17 7777 ; last 16 bits 10338 10196 e. 10339 10196 10339 10196 10339 10196 ; queue out(sub). 10340 10196 ; removes a subprocess from the process queue of the mainprocess. 10341 10196 ; call: return: 10342 10196 ; w0 unchanged 10343 10196 ; w1 unchanged 10344 10196 ; w2 subproc unchanged 10345 10196 ; w3 link destroyed 10346 10196 b.i6 w. 10347 10196 v103: ; 10348 10196 n12: ds. w3 i1. ; queue out: 10349 10198 al w2 x2+p14 ; 10350 10200 jl w3 d5 ; remove element; 10351 10202 rl. w2 i0. ; 10352 10204 jl. (i1.) ; exit: return; 10353 10206 i0: 0 ; saved w2 10354 10208 i1: 0 ; saved link 10355 10210 e. 10356 10210 ; clear all subprocesses(main,function). 10357 10210 ; call: return: 10358 10210 ; w0 function destr. 10359 10210 ; w1 main unchanged 10360 10210 ; w2 destr. 10361 10210 ; w3 link destr. 10362 10210 ; 10363 10210 ; function = 0: remote subprocs are removed ; local subprocs are cleaned 10364 10210 ; i. e. pending messages are returned with result 4. 10365 10210 ; 10366 10210 ; 2: all subprocs are removed. 10367 10210 ; 10368 10210 ; 4: all subprocs are cleaned. 10369 10210 10369 10210 b.i10,j10 w. 10370 10210 n14: ds. w0 i8. ; clear subprocesses: 10371 10212 al w2 x1+p202 ; proc:=host; 10372 10214 jl. w3 n16. ; clean subprocess(proc); 10373 10216 al w2 x2+p19 ; 10374 10218 al w0 0 ; 10375 10220 j4: rs w0 x2 ; for bufno:=0,1,..,v3-1 do 10376 10222 al w2 x2+2 ; message(bufno):=0; 10377 10224 sh w2 x1+p100-a48+p19+v3<1-2 ; 10378 10226 jl. j4. ; 10379 10228 al w0 0 ; host-id:=undefined; 10380 10230 jl. w3 n15. ; clear subprocesses(host-id,main,net-id); 10381 10232 al w0 2 ; 10382 10234 rs. w0 i8. ; function:= 2(remove); 10383 10236 jl. (i7.) ; exit: return 10384 10238 i7: 0 ; saved link 10385 10240 i8: 2 ; function 10386 10242 10386 10242 10386 10242 ; clear subprocesses(host-id,main,net-id). 10387 10242 ; the procedure clears all subprocesses that are connected to the device 10388 10242 ; host in question. if the host-id has dummy value (=0) then all 10389 10242 ; subprocesses connected to the main process are cleared. 10390 10242 ; call return 10391 10242 ; w0 host-id destroyed 10392 10242 ; w1 main unchanged 10393 10242 ; w2 net-id destroyed 10394 10242 ; w3 link destroyed 10395 10242 n15: ds. w1 i1. ; clear subprocesses: 10396 10244 ds. w3 i3. ; save w0-w3; 10397 10246 rl w3 b4 ; entry:=first entry in name table ; 10398 10248 al w3 x3-2 ; 10399 10250 j0: al w3 x3+2 ; next: entry:=next entry in name table; 10400 10252 sl w3 (b5) ; if entry>last dev entry then 10401 10254 jl. (i3.) ; exit: return; 10402 10256 rl w2 x3 ; proc:=proc(entry); 10403 10258 se w1 (x2+a50) ; if mainproc(proc)<>mainproc then 10404 10260 jl. j0. ; goto next; 10405 10262 rl w0 x2+a10 ; kind:= kind(proc); 10406 10264 se w0 p112 ; if kind <> remote subkind and 10407 10266 sn w0 p113 ; kind <> local subkind 10408 10268 jl. j7. ; then goto next; 10409 10270 jl. j0. ; 10410 10272 j7: 10411 10272 rl. w0 i0. ; 10412 10274 sn w0 0 ; if host-id<>dummy then 10413 10276 jl. j1. ; if host-id<>host-id(sub) 10414 10278 se w0 (x2+p5) ; or net-id<>net-id(sub) then 10415 10280 jl. j0. ; goto next; 10416 10282 ; bz w0 x2+p7 ; 10417 10282 ; se. w0 (i2.) ;***fjernet indtil net-id er defineret 10418 10282 ; jl. j0. ; 10419 10282 j1: rs. w3 i4. ; 10420 10284 rl. w3 i8. ; 10421 10286 jl. (x3+2) ; goto case function of 10422 10288 j5 ; (0: remove temp, 10423 10290 j6 ; 2: remove subproc, 10424 10292 j2 ; 4: clean subproc) 10425 10294 j5: rl w0 x2+a10 ; remove temp: 10426 10296 sn w0 p112 ; if proc = local subproc 10427 10298 jl. j2. ; then goto clean subproc; 10428 10300 se w0 p113 ; if proc = remote subproc 10429 10302 jl. j3. ; then goto remove subproc; 10430 10304 j6: am +2 ; remove subproc: remove subproc(proc); 10431 10306 j2: jl. w3 (i5.) ; clean subproc: clean subproc(proc); 10432 10308 j3: rl. w3 i4. ; 10433 10310 jl. j0. ; 10434 10312 i0: 0 ; saved host-id 10435 10314 i1: 0 ; saved main 10436 10316 i2: 0 ; saved net-id 10437 10318 i3: 0 ; saved link 10438 10320 i4: 0 ; name table address 10439 10322 i5: v101 ; address of clean subproc 10440 10324 i6: v102 ; address of remove remote subprocess 10441 10326 e. 10442 10326 10442 10326 ; clean subproc(proc). 10443 10326 ; cleans the sub process by returning all messages in the mess buffer queue with dummy answer. 10444 10326 ; call: return: 10445 10326 ; w0 destroyed 10446 10326 ; w1 unchanged 10447 10326 ; w2 sub unchanged 10448 10326 ; w3 link destroyed 10449 10326 b.i3 w. 10450 10326 v101: ; 10451 10326 n16: rs. w3 i0. ; clean subproc: 10452 10328 rs. w1 i1. ; save w1; 10453 10330 al w1 x2 ; 10454 10332 rx w2 b19 ; cur proc:=sub; 10455 10334 rs. w2 i2. ; save old curr proc; 10456 10336 jl. w3 (i3.) ; clear subproc message queue; 10457 10338 dl. w2 i2. ; 10458 10340 rx w2 b19 ; curr proc:=old curr proc; 10459 10342 jl. w3 n12. ; queue out; 10460 10344 jl. (i0.) ; exit: return; 10461 10346 i0: 0 ; saved link 10462 10348 i1: 0 ; saved w1 10463 10350 i2: 0 ; saved old curr proc 10464 10352 i3: v100 ; address of clear subproc mess queue; 10465 10354 e. 10466 10354 \f 10466 10354 10466 10354 ; each subdriver has six entry points with the functions: 10467 10354 ; 10468 10354 ; entry0 (deliver message): 10469 10354 ; used when send message delivers a message to the subexternal process. 10470 10354 ; 10471 10354 ; entry1 (set up operation): 10472 10354 ; used when the mainproc wants the subdriver to start an operation. 10473 10354 ; 10474 10354 ; entry2 (end transfer): 10475 10354 ; used when the operation - and the datablock - has been sent, and 10476 10354 ; the receipt received. 10477 10354 ; 10478 10354 ; entry3 (receive operation): 10479 10354 ; used when a header that includes a following datablock is received. 10480 10354 ; 10481 10354 ; entry4 (end receive): 10482 10354 ; used when the receive operations are finished. 10483 10354 ; 10484 10354 ; entry5 (initiate process): 10485 10354 ; used after creation of the subprocess. 10486 10354 ; 10487 10354 ; contents of registers entering the subprocess: 10488 10354 ; w0: , w1: subproc , w2: , w3: . 10489 10354 ; current process (b19) : subprocess. 10490 10354 ; 10491 10354 ; standard return from the subprocess is: 10492 10354 ; jl (b101) 10493 10354 ; w0-w3 undefined. 10494 10354 ; return with initiation is: 10495 10354 ; am (b101) 10496 10354 ; jl -2 10497 10354 ; with w2: process description addr of the subprocess which shall be initiated. 10498 10354 ; 10499 10354 ; the adresses of the different entry points are defined in a table at 10500 10354 ; top of the subprocess drivers: 10501 10354 ; h-name(driver start addr): addr(entry0) 10502 10354 ; addr(entry1) 10503 10354 ; .... 10504 10354 ; 10505 10354 ; call: return: 10506 10354 ; w0 destroyed 10507 10354 ; w1 mainproc 10508 10354 ; w2 subproc destroyed 10509 10354 ; w3 link destroyed 10510 10354 10510 10354 b.i10,j10 w. 10511 10354 e0: am 0-2 ; call(entry0): 10512 10356 e1: am 2-4 ; call(entry1): 10513 10358 e2: am 4-6 ; call(entry2): 10514 10360 e3: am 6-8 ; call(entry3): 10515 10362 e4: am 8-10 ; call(entry4): 10516 10364 e5: al w0 10 ; call(entry5): 10517 10366 se w0 10 ; if entry<>entry 5 then 10518 10368 rs. w3 i0. ; return addr:=link; 10519 10370 rs w2 b19 ; current proc:=subproc; 10520 10372 bl w3 x2+p10 ; 10521 10374 c.p101 b.f1 w. ;*****test16***** 10522 10374 rs. w0 i10. ; 10523 10376 rs. w3 f0. ; 10524 10378 jl. w3 f4. ; 10525 10380 16 ; 10526 10382 f0: 0 ; 10527 10384 jl. f1. ; 10528 10386 rs w0 x3 ; 10529 10388 rs w1 x3+2 ; 10530 10390 rs w2 x3+4 ; 10531 10392 rl. w0 f0. ; 10532 10394 rs w0 x3+6 ; 10533 10396 al w0 x3 ; 10534 10398 al w1 x3+6 ; 10535 10400 jl. w3 f5. ; 10536 10402 f1: ; 10537 10402 e.z. ;*****test16***** 10538 10402 al w1 x2 ; 10539 10404 rl w2 0 ; 10540 10406 am. (x3+j0.) ; 10541 10408 jl (x2) ; 10542 10410 10542 10410 h99 ; -2: hostprocess 10543 10412 j0: h100 ; 0: general sequential device 10544 10414 h102 ; 2: clock 10545 10416 h104 ; 4: bs-area 10546 10418 h106 ; 6: disc 10547 10420 h108 ; 8: terminal 10548 10422 h110 ; 10: reader 10549 10424 h112 ; 12: punch 10550 10426 h114 ; 14: printer 10551 10428 h116 ; 16: cardreader 10552 10430 h118 ; 18: magtape 10553 10432 h120 ; 20: plotter 10554 10434 h122 ; 22: discette 10555 10436 h124 ; 24: character i-o 10556 10438 10556 10438 10556 10438 ; return points from the subprocesses. 10557 10438 10557 10438 jl. e5. ; return(init): (w2: subproc(init)) goto entry 5; 10558 10440 b89: rl w2 b19 ; return(std): 10559 10442 rl w1 x2+a50 ; 10560 10444 rs w1 b19 ; cur proc:=mainproc; 10561 10446 c.p101 b.f1,j6 w. ;*****test17***** 10562 10446 rs. w3 f0. ; 10563 10448 jl. w3 f4. ; 10564 10450 17 ; 10565 10452 f0: 0 ; 10566 10454 jl. f1. ; 10567 10456 rl. w2 i10. ; 10568 10458 jl. (x2+2) ; 10569 10460 j0 ; 0 10570 10462 j1 ; 1 10571 10464 j2 ; 2 10572 10466 j3 ; 3 10573 10468 j3 ; 4 10574 10470 j3 ; 5 10575 10472 j0: al w0 x1+2 ; 10576 10474 jl. j6. ; 10577 10476 j1: al w0 x1+p66 ; 10578 10478 al w1 x1+p63 ; 10579 10480 jl. j6. ; 10580 10482 j2: al w0 x1+p60 ; 10581 10484 al w1 x1+p60 ; 10582 10486 jl. j6. ; 10583 10488 j3: al w0 x1+p86 ; 10584 10490 al w1 x1+p83 ; 10585 10492 j6: jl. w3 f5. ; 10586 10494 f1: ; 10587 10494 e.z. ;*****test17***** 10588 10494 jl. (i0.) ; exit: return to link; 10589 10496 10589 10496 i0: 0 ; return addr(subproc) 10590 10498 i10: 0 ; saved entry no 10591 10500 10591 10500 a66=j0 10592 10500 10592 10500 e. 10593 10500 \f 10593 10500 10593 10500 ; call of the receiver and the transmitter is carried out by use of 10594 10500 ; these procedures. 10595 10500 10595 10500 ; by entry in the trm/rec: 10596 10500 ; w1: rec/trm , w2: main 10597 10500 10597 10500 ; call: return: 10598 10500 ; w0 destroyed 10599 10500 ; w1 main 10600 10500 ; w2 receiver/transmitter 10601 10500 ; w3 link destroyed 10602 10500 10602 10500 e10: rl w2 b19 ; call receiver: 10603 10502 al w1 x2+p200 ; proc:=receiver; 10604 10504 rs w1 b19 ; 10605 10506 rs w3 x1+p3 ; link(rec):=link; 10606 10508 jl. e8. ; goto start-receiver; 10607 10510 10607 10510 10607 10510 e11: rl w2 b19 ; call transmitter: 10608 10512 al w1 x2+p201 ; proc:=transmitter; 10609 10514 rs w1 b19 ; 10610 10516 rs w3 x1+p3 ; link(trm):=link; 10611 10518 jl. e9. ; goto start-transmitter; 10612 10520 10612 10520 e12: rl w2 b19 ; return to main: 10613 10522 rl w1 x2+a50 ; main:=main(proc); 10614 10524 rs w1 b19 ; cur proc:=main; 10615 10526 jl (x2+p3) ; return to main; 10616 10528 10616 10528 \f 10616 10528 10616 10528 ; dummy subprocess. 10617 10528 10617 10528 b.q5, i0 w. 10618 10528 h96: q0 ; addr(entry0) 10619 10530 q1 ; addr(entry1) 10620 10532 q2 ; addr(entry2) 10621 10534 q3 ; addr(entry3) 10622 10536 q4 ; addr(entry4) 10623 10538 q5 ; addr(entry5) 10624 10540 10624 10540 q0: jl g3 ; entry 0: goto result 5; 10625 10542 10625 10542 q1: al w0 p163 ; entry 1: 10626 10544 am (x1+a50) ; 10627 10546 hs w0 +p60 ; internal status:=reject; 10628 10548 q2: jl (b101) ; entry 2: return(std); 10629 10550 10629 10550 q3: al w0 p163 ; entry 3: 10630 10552 am (x1+a50) ; 10631 10554 hs w0 +p80 ; internal status:=reject; 10632 10556 q4: ; entry 4: 10633 10556 q5: jl (b101) ; entry 5: return(std); 10634 10558 10634 10558 h102=h96 , h104=h96 10635 10558 e. 10636 10558 \f 10636 10558 10636 10558 ; subkind driver. 10637 10558 ; all messages to subproces passes through this block. 10638 10558 ; w3: subproc 10639 10558 h82: ; hostprocess: 10640 10558 h84: al w2 x3 ; subprocess: 10641 10560 rl w1 x2+a50 ; main:=mainproc(sub); 10642 10562 sn w1 0 ; if main=0 then 10643 10564 jl g6 ; goto result 2 (rejected) 10644 10566 rl w0 x1+s16 ; 10645 10568 se w0 0 ; if ready flag(main)=running then 10646 10570 jl g4 ; goto result4; 10647 10572 jl. w3 e0. ; call entry0(sub); 10648 10574 ; goto main-exit; 10649 10574 10649 10574 e6: ; main-exit: 10650 10574 rl w2 x1+p14 ; 10651 10576 am x1+p201 ; 10652 10578 rl w0 +p2 ; 10653 10580 se w2 x1+p14 ; if proc queue(main) is empty 10654 10582 se w0 1 ; or state(trm)<>waiting before poll then 10655 10584 jl (b20) ; return to program; 10656 10586 jl. e7. ; goto get-next; 10657 10588 10657 10588 e. ; end of mainproc 10658 10588 10658 10588 ; stepping stones: 10659 10588 10659 10588 jl. f4. ; 10660 10590 f4=k-2 ; 10661 10590 10661 10590 jl. f5. ; 10662 10592 f5=k-2 ; ; end of mainprocess driver (m,n and s-names). 10663 10592 10663 10592 jl. f6. ; 10664 10594 f6=k-2 ; 10665 10594 10665 10594 \f 10665 10594 10665 10594 10665 10594 ; block including the receiver process. 10666 10594 10666 10594 b.c6,n5,s16 w. 10667 10594 10667 10594 ; receiver. 10668 10594 10668 10594 m. 10668 10594 fpa receiver 10669 10594 10669 10594 ; process description: 10670 10594 10670 10594 ; a48: ; interval 10671 10594 ; a49: ; interval 10672 10594 ; a10: ; kind 10673 10594 ; a11: ; name 10674 10594 ; a50: ; mainproc 10675 10594 ; a52: ; reserver 10676 10594 ; a53: ; users 10677 10594 ; a54: ; next message 10678 10594 ; a55: ; last message 10679 10594 ; a56: ; interrupt address 10680 10594 10680 10594 p2=p0 ; state(rec) 10681 10594 p3=p2+2 ; link 10682 10594 s0=p3+2 ; transmit status, cur. ch. command 10683 10594 ; , rem. char count 10684 10594 ; , cur. status 10685 10594 ; , event status 10686 10594 s1=s0+8 ; receive status , cur. ch. command 10687 10594 ; , rem. char count 10688 10594 ; , cur. status 10689 10594 ; , event status 10690 10594 s2=s1+8 ; startbyte<16 10691 10594 s3=s2+2 ; statusbyte<16 10692 10594 s4=s3+2 ; expected blocknumber 10693 10594 s5=s4+2 ; message buffer 10694 10594 s6=s5+2 , ; errorbits , 10695 10594 s7=s6+2 ; delay 10696 10594 10696 10594 ; error parameters: 10697 10594 s10=s7+2 , ; errorcount , blocklength error 10698 10594 , ; parity error , timeout(write) 10699 10594 , ; timeout(mon) , abnormal termination 10700 10594 , ; master clear , accept master clear 10701 10594 , ; blockno error , 10702 10594 s12=s10+10 ; top of privat part proc desc 10703 10594 s13=s12 ; start of channel program area 10704 10594 ; s14 ; top of channel program area 10705 10594 10705 10594 \f 10705 10594 10705 10594 10705 10594 ; receiver channel program: 10706 10594 ; start1: 10707 10594 ; transmit statusbyte. 10708 10594 c0: 4<12+3<8 ; addr code:=devi desc , op:=write 10709 10596 +s3 ; first addr:=addr(statusbyte) 10710 10598 1 ; char count:=1 10711 10600 ; sense status(trm). 10712 10600 c1: 4<12+0<8 ; addr code:=devi desc , op:=sense 10713 10602 +s0 ; first addr:=addr trm status 10714 10604 12 ; char count:=12 10715 10606 10715 10606 ; start2: 10716 10606 ; receive startbyte. 10717 10606 c2: 4<12+1<8+1<7 ; addr code:=devi desc , op:=read, continue 10718 10608 +s2 ; first addr:=addr(startbyte) 10719 10610 1 ; char count:=1 10720 10612 ; receive header. 10721 10612 c3: 4<12+1<8+1<7 ; addr code:=devi desc , op:=read, continue 10722 10614 +p95-p200 ; first addr:=addr(header area in main) 10723 10616 2+1+11+10 ; char count 10724 10618 ; receive data. 10725 10618 c4: 1<8 ; addr code , op:=read 10726 10620 0 ; first addr 10727 10622 0 ; char count 10728 10624 ; sense status(rec). 10729 10624 c5: 4<12+0<8 ; addr code:=devi desc , op:=sense 10730 10626 +s1 ; first addr:=addr rec status 10731 10628 12 ; char count:=12 10732 10630 ; stop. 10733 10630 c6: 15<8 ; dummy , op:=stop 10734 10632 0 ; dummy 10735 10634 600 000 ; timeout (in 0.1 msec) 10736 10636 10736 10636 s14=s13+c6+6-c0 10737 10636 10737 10636 c.(:(:p210-s14:)a.8.37777777:)-1, m.***name error p210 10738 10636 z. 10739 10636 10739 10636 ; channelprogram used when operating direct on the receiver. 10740 10636 ; transmit statusbyte. 10741 10636 c10: 4<12+3<8 ; addr code:=devi desc , op:=write 10742 10638 +s3 ; first addr:=addr(statusbyte) 10743 10640 1 ; char count:=1 10744 10642 ; sense status. 10745 10642 4<12+0<8 ; addr code:=devi desc , op:=sense 10746 10644 +s0 ; first addr:=sense area 10747 10646 12 ; char count:=12 10748 10648 ; receive startbyte. 10749 10648 c11: 4<12+0 ; addr code:=devi desc , op:=command1 10750 10650 +s2 ; first addr:=addr(startbyte) 10751 10652 1 ; char count:=1 10752 10654 ; receive data. 10753 10654 c12: 0<12+0 ; addr code:=sender(mess) , op:=command2 10754 10656 0 ; first addr 10755 10658 0 ; char count 10756 10660 ; stop. 10757 10660 c13: 15<8 ; addr code:=dummy , op:=stop 10758 10662 0 ; dummy 10759 10664 600 000 ; timeout:=60 sec (in units of 0.1 msec) 10760 10666 \f 10760 10666 10760 10666 b.i10,m20 w. 10761 10666 10761 10666 b.j10 w. 10762 10666 h86: am (x1+a50) ; receiver: 10763 10668 rl w0 +a52 ; 10764 10670 rl w2 b18 ; 10765 10672 sn w0 0 ; if reserver(main)=0 then 10766 10674 jl w3 g15 ; check reserver; 10767 10676 jl w3 g17 ; link operation; 10768 10678 10768 10678 j0: bz w0 x2+9 ; execute: 10769 10680 c.p101 b.f1 w. ;*****test40***** 10770 10680 rs. w3 f0. ; 10771 10682 jl. w3 f4. ; 10772 10684 40 ; 10773 10686 f0: 0 ; 10774 10688 jl. f1. ; 10775 10690 rl w0 x2+8 ; param0:=operation, mode; 10776 10692 rs w0 x3 ; 10777 10694 al w0 x3 ; 10778 10696 al w1 x3 ; 10779 10698 jl. w3 f5. ; 10780 10700 f1: ; 10781 10700 e.z. ;*****test40***** 10782 10700 so w0 2.10 ; if not mode.reset then 10783 10702 jl. j1. ; goto cont; 10784 10704 al w0 -2 ; reset: 10785 10706 rs w0 x1+p2 ; state:=direct reset; 10786 10708 rl w3 x1+a235 ; device:=device code(proc); 10787 10710 rl w1 x1+s7 ; timeout:=short delay; 10788 10712 ; al w0 2<2+1<1+1 ; function:=reset, wait, exit; 10789 10712 ; al w2 0 ; mess buff:=dummy; 10790 10712 al w0 1<2+1<1+1 ; function:=reset,start chpg, exit; 10791 10714 al. w1 c13. ; start(chpg):=stop; 10792 10716 jd 1<11+p109 ; start io; 10793 10718 10793 10718 m18: rl w0 x1+a56 ; after wait: 10794 10720 se w0 0 ; if regret flag then 10795 10722 jl. j7. ; goto result1; 10796 10724 rl w2 b18 ; 10797 10726 j1: rl w0 x2+14 ; 10798 10728 sh w0 0 ; 10799 10730 am 5<8-1<8 ; if size=<0 then 10800 10732 al w3 1<8 ; command1:=dummy; 10801 10734 hs. w3 c12.+1 ; command2:=dummy; 10802 10736 al w3 x3+1<7 ; else 10803 10738 hs. w3 c11.+1 ; command1:=read, continue; 10804 10740 ld w0 -100 ; command2:=read; 10805 10742 ds w0 x1+s0+2 ; 10806 10744 ds w0 x1+s0+6 ; clear status area; 10807 10746 al w0 -1 ; 10808 10748 rs w0 x1+s2 ; startchar:=-1; 10809 10750 rs w0 x1+p2 ; state:=operate direct; 10810 10752 10810 10752 10810 10752 rl w0 x2+12 ; receive: 10811 10754 ws w0 x2+10 ; 10812 10756 ls w0 -1 ; maxcharcount:= 10813 10758 ba. w0 1 ; ((last-first)//1-1)*3; 10814 10760 wm w0 g48 ; 10815 10762 sl w0 (x2+14) ; if charcount.mess>maxchar count then 10816 10764 se w3 0 ; goto deliver result3; 10817 10766 jl. j6. ; 10818 10768 rl w0 x2+16 ; 10819 10770 ls w0 4 ; 10820 10772 hs w0 x1+s3 ; statuschar:=statuschar(mess); 10821 10774 rl w3 x2+10 ; first addr:=mess.first; 10822 10776 rl w0 x2+14 ; charcount:=mess.charcount; 10823 10778 ds. w0 c12.+4 ; 10824 10780 bz w0 x2+9 ; if mode=trm statusbyte then 10825 10782 so w0 2.1 ; startchpg:=rec startbyte; 10826 10784 am c11-c10 ; else 10827 10786 al. w1 c10. ; startchpg:=trm statusbyte; 10828 10788 al w0 1<2+1 ; io-function:=start chpg, exit; 10829 10790 am (b19) ; 10830 10792 rl w3 +a235 ; devno:=devno(proc); 10831 10794 c.p101 b.f1 w. ;*****test25***** 10832 10794 rs. w3 f0. ; 10833 10796 jl. w3 f4. ; 10834 10798 25 ; 10835 10800 f0: 0 ; 10836 10802 jl. f1. ; 10837 10804 al w0 x1 ; dump channelpg; 10838 10806 al. w1 c12.+6 ; 10839 10808 jl. w3 f5. ; 10840 10810 f1: ; 10841 10810 e.z. ;*****test25***** 10842 10810 jd 1<11+p109 ; start io; 10843 10812 al w2 1<8 ; error: 10844 10814 rs w2 g20 ; if io-result=2 (2: sender stopped) then 10845 10816 ld w3 -100 ; status:=1<8 (stopped); 10846 10818 ds w3 g22 ; bytes,chars trf:=0,0; 10847 10820 al w2 -1 ; startchar rec:=-1; 10848 10822 rs w2 g23 ; goto result1; 10849 10824 sn w0 2 ; else (1: buf regretted, 3: unintelligible) 10850 10826 jl. j7. ; goto result3; 10851 10828 jl. j6. ; 10852 10830 10852 10830 m19: rl w2 b18 ; after operation: 10853 10832 rl w3 x2+14 ; chars:=mess.char count; 10854 10834 ws w3 x1+a231 ; chars:=chars-remaining char count(std status); 10855 10836 sl w3 (x2+14) ; if chars>=mess.char count then 10856 10838 rl w3 x2+14 ; chars:=mess.char count; 10857 10840 se w0 0 ; if io-result<>0 then 10858 10842 al w3 0 ; chars:=0; 10859 10844 rs w3 g22 ; chars trf(answer):=chars; 10860 10846 al w2 0 ; 10861 10848 al w3 x3+2 ; 10862 10850 wd w3 g48 ; 10863 10852 ls w3 1 ; 10864 10854 rs w3 g21 ; bytes trf(answer):=(chars+2)//3*2; 10865 10856 rl w3 x1+s2 ; if no startchar received then 10866 10858 se w3 -1 ; startchar(answer):=-1; 10867 10860 ls w3 -16 ; else startchar(answer):=startchar received; 10868 10862 rs w3 g23 ; 10869 10864 rl w3 x1+a233 ; status:=event status(std) or event status(proc); 10870 10866 lo w3 x1+s0+6 ; if io-result=3 then (monitor timeout) 10871 10868 sn w0 3 ; status:=execution timeout; 10872 10870 al w3 1<9 ; 10873 10872 rs w3 g20 ; status(answer):=status; 10874 10874 se w0 3 ; if io-result=3 (monitor timeout) 10875 10876 sh w3 -1 ; or bit0(status)=1 then 10876 10878 al w0 0 ; io-result:=0; 10877 10880 sn w0 0 ; if io-result=0 then 10878 10882 jl. j7. ; goto result1; 10879 10884 j5: am 4-3 ; result4: result:=4; 10880 10886 j6: am 3-1 ; result3: result:=3; 10881 10888 j7: al w0 1 ; result1: or :=1; 10882 10890 c.p101 b.f1 w. ;*****test41***** 10883 10890 rs. w3 f0. ; 10884 10892 jl. w3 f4. ; 10885 10894 41 ; 10886 10896 f0: 0 ; 10887 10898 jl. f1. ; 10888 10900 rs w0 g24 ; 10889 10902 al w0 g20 ; 10890 10904 al w1 g24 ; dump answer (g20,21,22,23) and result (g24); 10891 10906 jl. w3 f5. ; 10892 10908 f1: ; 10893 10908 e.z. ;*****test41***** 10894 10908 jl w3 g19 ; deliver: deliver result(result); 10895 10910 al w0 0 ; 10896 10912 rs w0 x1+p2 ; state:=idle; 10897 10914 jl w3 g25 ; next operation; 10898 10916 jl. j0. ; goto execute; 10899 10918 e. 10900 10918 \f 10900 10918 10900 10918 ; start receive. 10901 10918 ; w1: receiver 10902 10918 e8: rl w2 x1+a50 ; entry1: main:=main(rec); 10903 10920 bz w0 x2+p93 ; 10904 10922 al w3 2.0010 ; 10905 10924 la w3 0 ; contents:=operation(6:6); 10906 10926 hs w3 x2+p97 ; 10907 10928 sz w0 4.01000 ; if initiate then 10908 10930 jl. w3 n3. ; initiate proc desc; 10909 10932 sz w0 4.00300 ; if delay then 10910 10934 jl. m3. ; goto start wait; 10911 10936 10911 10936 m0: jl. w3 n1. ; start trm-rec: setup statusbyte; 10912 10938 al w3 1<2 ; io-function:=start ch pg; 10913 10940 al. w0 c0. ; start:=start1; 10914 10942 jl. m2. ; goto start operation; 10915 10944 10915 10944 m3: al w3 2 ; start wait: 10916 10946 rs w3 x1+p2 ; state:=waiting; 10917 10948 rl w3 x1+a235 ; dev desc:=dev desc(rec); 10918 10950 sz w0 4.00200 ; if long delay then 10919 10952 am s7-s7 ; delay:=long delay; 10920 10954 rl w1 x1+s7 ; else delay:=short delay; 10921 10956 sz w0 4.02000 ; if reset then 10922 10958 am 1<1 ; function:=reset and start waitpg; 10923 10960 al w0 2<2 ; else function:=start wait pg; 10924 10962 al w2 0 ; mess buffer:=0; 10925 10964 c.p101 b.f1 w. ;*****test25***** 10926 10964 rs. w3 f0. ; 10927 10966 jl. w3 f4. ; 10928 10968 25 ; 10929 10970 f0: 0 ; 10930 10972 jl. f1. ; 10931 10974 al w0 x1+2 ; 10932 10976 jl. w3 f5. ; 10933 10978 f1: ; 10934 10978 e.z. ;*****test25***** 10935 10978 jl. m5. ; goto start io; 10936 10980 10936 10980 m6: jl. w3 n1. ; after waiting: setup startbyte; 10937 10982 jl. m1. ; goto rec; 10938 10984 10938 10984 m1: al w3 1<2 ; rec: io-function:=start ch pg; 10939 10986 al. w0 c2. ; start:=start2; 10940 10988 ; goto start operation; 10941 10988 10941 10988 m2: ds. w0 i2. ; start operation: 10942 10990 jl. w3 n2. ; setup channel program; 10943 10992 rl w2 x1+s5 ; mess buff:=mess buff(op); 10944 10994 al w3 3 ; 10945 10996 rs w3 x1+p2 ; state(rec):=receiving; 10946 10998 rl w3 x1+a235 ; dev desc:=dev desc(rec); 10947 11000 dl. w1 i2. ; load io-function, start of ch pg; 10948 11002 c.p101 b.f1 w. ;*****test24***** 10949 11002 rs. w3 f0. ; 10950 11004 jl. w3 f4. ; 10951 11006 24 ; 10952 11008 f0: 0 ; 10953 11010 jl. f1. ; 10954 11012 al. w0 i1. ; 10955 11014 al. w1 i2. ; 10956 11016 jl. w3 f5. ; 10957 11018 f1: ; 10958 11018 e.z. ;*****test24***** 10959 11018 c. p101 b. f1 w. ; ***test 26*** 10960 11018 rs. w3 f0. ;* 10961 11020 jl. w3 f4. ;* 10962 11022 26 ;* 10963 11024 f0: 0 ;* 10964 11026 jl. f1. ;* 10965 11028 al. w0 c0. ;* 10966 11030 al. w1 c6.+4 ;* 10967 11032 jl. w3 f5. ;* 10968 11034 f1: ;* 10969 11034 e.z. ;* test 26*** 10970 11034 m5: jd 1<11+p109 ; start io; 10971 11036 rl w1 b19 ; 10972 11038 sn w0 0 ; if io-result=0 then 10973 11040 jl. m9. ; wait; 10974 11042 rl w2 x1+a50 ; 10975 11044 hs w0 x2+p94 ; result:=io-result; 10976 11046 jl. m17. ; goto return; 10977 11048 10977 11048 m8: jl (b20) ; return: wait; 10978 11050 10978 11050 m9: rl w1 x1+a50 ; wait: 10979 11052 rs w1 b19 ; curr proc:=main(rec); 10980 11054 jl. e6. ; main-return; 10981 11056 10981 11056 \f 10981 11056 10981 11056 10981 11056 ; after interrupt. 10982 11056 c43: rl w2 x1+a50 ; interrupt entry: 10983 11058 c.p101 b.f1 w. ;*****test42***** 10984 11058 rs. w0 f0. ; 10985 11060 jl. w3 f4. ; 10986 11062 42 ; 10987 11064 f0: 0 ; 10988 11066 jl. f1. ; 10989 11068 al w2 x3 ; 10990 11070 dl w0 x1+a231 ; 10991 11072 ds w0 x2+2 ; 10992 11074 dl w0 x1+a233 ; 10993 11076 ds w0 x2+6 ; dump std status area 10994 11078 rl w0 x1+a244 ; io-result; 10995 11080 rs w0 x2+8 ; 10996 11082 al w0 x2 ; 10997 11084 al w1 x2+8 ; 10998 11086 jl. w3 f5. ; 10999 11088 f1: ; 11000 11088 e.z. ;*****test42***** 11001 11088 c.p101 b.f1 w. ;*****test28***** 11002 11088 rs. w3 f0. ; 11003 11090 jl. w3 f4. ; 11004 11092 28 ; 11005 11094 f0: 0 ; 11006 11096 jl. f1. ; 11007 11098 al w0 x1+p2 ; 11008 11100 al w1 x1+s3 ; 11009 11102 jl. w3 f5. ; 11010 11104 f1: ; 11011 11104 e.z. ;*****test28***** 11012 11104 rl w3 x1+p2 ; 11013 11106 am x3 ; 11014 11108 jl. (x3+6) ; goto case state of 11015 11110 m18 ; ( -2: wait direct, 11016 11112 m19 ; -1: operate direct, 11017 11114 m8 ; 0: idle, 11018 11116 m9 ; 1: wating before poll(not possible), 11019 11118 m6 ; 2: waiting, 11020 11120 m10 ; 3: receiving); 11021 11122 11021 11122 m10: jl. w3 n0. ; after receive: check state(rec,result); 11022 11124 hs w3 x2+p94 ; result(main):=result; 11023 11126 c.p101 b.f2 w. ;*****test30***** 11024 11126 rs. w3 f0. ; 11025 11128 jl. w3 f4. ; 11026 11130 30 ; 11027 11132 f0: 0 ; 11028 11134 jl. f1. ; 11029 11136 al w0 x2+p95 ; 11030 11138 al w1 x2+p95+14 ; 11031 11140 jl. w3 f5. ; 11032 11142 f1: ; 11033 11142 e.z. ;*****test30***** 11034 11142 c.p101 b.f1 w. ;*****test27***** 11035 11142 rs. w3 f0. ; 11036 11144 jl. w3 f4. ; 11037 11146 27 ; 11038 11148 f0: 0 ; 11039 11150 jl. f1. ; 11040 11152 al w0 x1+s13 ; 11041 11154 al w1 x1+s14-2 ; 11042 11156 jl. w3 f5. ; 11043 11158 f1: ; 11044 11158 e.z. ;*****test27***** 11045 11158 sn w3 0 ; if result=0 then 11046 11160 jl. m15. ; goto ok; 11047 11162 c.p101 b.f1 w. ;*****test29***** 11048 11162 rs. w3 f0. ; 11049 11164 jl. w3 f4. ; 11050 11166 29 ; 11051 11168 f0: 0 ; 11052 11170 jl. f1. ; 11053 11172 al w2 x3 ; 11054 11174 dl w0 x1+a231 ; 11055 11176 ds w0 x2+2 ; 11056 11178 dl w0 x1+a233 ; 11057 11180 ds w0 x2+6 ; 11058 11182 rl w3 x1+a244 ; 11059 11184 rl. w0 f0. ; 11060 11186 ds w0 x2+10 ; 11061 11188 al w0 x2 ; 11062 11190 al w1 x2+10 ; 11063 11192 jl. w3 f5. ; 11064 11194 f1: ; 11065 11194 e.z. ;*****test29***** 11066 11194 al w0 x2 ; save w3 11067 11196 jl w2 (b31) ; call errorlog 11068 11198 rl w2 0 ; restore w3 11069 11200 bz w0 x2+p93 ; 11070 11202 sz w0 2.00000001; if no error recovery then 11071 11204 jl. m13. ; goto check; 11072 11206 ; errors: 11073 11206 c.p102 ;*****statistics begin***** 11074 11206 al w0 1 ; 11075 11208 ba w0 x1+s10 ; errorcount:=errorcount+1; 11076 11210 hs w0 x1+s10 ; 11077 11212 al w0 1 ; 11078 11214 am x3-3 ; 11079 11216 ba w0 x1+s10 ; errorcount(result):=errorcount(result)+1; 11080 11218 am x3-3 ; 11081 11220 hs w0 x1+s10 ; 11082 11222 z. ;*****statistics end***** 11083 11222 am x3-3 ; 11084 11224 jl. (x3-3) ; goto case result of 11085 11226 m11 ; ( 4: blocklength error, 11086 11228 m12 ; 5: parity error, 11087 11230 -1 ; 6: impossible, 11088 11232 m1 ; 7: timeout(mon), 11089 11234 m1 ; 8: abnormal termination, 11090 11236 m16 ; 9: master clear, 11091 11238 m16 ; 10: accept master clear, 11092 11240 m0 ; 11: blocknumber error); 11093 11242 11093 11242 m11: am 2.10-2.01 ; blocklength error: 11094 11244 m12: al w0 2.01 ; parity error: 11095 11246 hs w0 x1+s6 ; errorbits:=error cause; 11096 11248 jl. m0. ; goto start rec-trm; 11097 11250 11097 11250 m13: se w3 9 ; check: if result<>master clear 11098 11252 sn w3 10 ; or accept master clear then 11099 11254 jl. m16. ; goto return 11100 11256 jl. m17. ; goto countup; 11101 11258 11101 11258 m15: bz w0 x1+s2 ; ok: 11102 11260 ls w0 -4 ; contents:=startbyte(4:6); 11103 11262 la. w0 i0. ; 11104 11264 hs w0 x2+p97 ; contents(main):=contents; 11105 11266 m16: al w0 1 ; countup: 11106 11268 wa w0 x1+s4 ; blockcount:=blockcount+1; 11107 11270 rs w0 x1+s4 ; 11108 11272 m17: al w0 0 ; return: 11109 11274 rs w0 x1+p2 ; state(rec):=ready; 11110 11276 hs w0 x1+s6 ; 11111 11278 c.p101 b.f1 w. ;*****test31***** 11112 11278 rs. w3 f0. ; 11113 11280 jl. w3 f4. ; 11114 11282 31 ; 11115 11284 f0: 0 ; 11116 11286 jl. f1. ; 11117 11288 al w0 x1+2 ; 11118 11290 jl. w3 f5. ; 11119 11292 f1: ; 11120 11292 e.z. ;*****test31***** 11121 11292 jl. e12. ; return to main; 11122 11294 11122 11294 i0: 2.00001110 ; mask 11123 11296 i1: 0 ; io-function 11124 11298 i2: 0 ; start of ch pg 11125 11300 11125 11300 e. 11126 11300 11126 11300 \f 11126 11300 11126 11300 ; check state(proc,result). 11127 11300 ; the procedure checks the result of the i/o operation by inspecting the timeout, 11128 11300 ; the receive status area and the startbyte received. 11129 11300 ; result: 0 ok 11130 11300 ; 4 blocklength error 11131 11300 ; 5 parity error(write) 11132 11300 ; 7 time-out(monitor) 11133 11300 ; 8 abnormal termination, that is buserror, disconnected line, 11134 11300 ; reset received, disconnected controller, power up, etc. 11135 11300 ; 9 master clear 11136 11300 ; 10 accept master clear 11137 11300 ; 11 blocknumber error 11138 11300 ; call: return: 11139 11300 ; w0 destroyed 11140 11300 ; w1 proc unchanged 11141 11300 ; w2 unchanged 11142 11300 ; w3 link result 11143 11300 b.i1,j20 w. 11144 11300 n0: rs. w3 i0. ; check state: 11145 11302 rl w0 x1+a244 ; 11146 11304 se w0 0 ; if timeout<>0 then 11147 11306 jl. j1. ; goto timeout-error; 11148 11308 rl w0 x1+s1+6 ; event status:=event status(rec) or event status(std); 11149 11310 lo w0 x1+a233 ; if event status<>(0 or blocklength error) then 11150 11312 sz. w0 (i1.) ; goto event-error; 11151 11314 jl. j0. ; 11152 11316 bl w0 x1+s2 ; ok or blocklength: 11153 11318 so w0 2.1<4 ; if special bit then 11154 11320 jl. j3. ; begin 11155 11322 sn w0 -1<4 ; if startbyte=master clear then 11156 11324 jl. j16. ; goto master clear; 11157 11326 sn w0 -1<4-1<9 ; if startbyte=accept master clear then 11158 11328 jl. j17. ; goto accept master clear; 11159 11330 jl. j12. ; goto parity error; 11160 11332 j3: ld w0 1 ; if blockno expected mod 2 <> 11161 11334 lx w3 x1+s4 ; blockno rec then 11162 11336 sz w3 2.1 ; goto blocknumber error; 11163 11338 jl. j18. ; 11164 11340 rl w3 x1+s1+2 ; if rem char count<>0 then 11165 11342 se w3 0 ; goto blocklenght error; 11166 11344 jl. j11. ; else 11167 11346 jl. j10. ; goto ok; 11168 11348 j0: bz w3 0 ; event-error: 11169 11350 sz w3 1<10 ; if bit1 then 11170 11352 jl. j12. ; goto parity error; 11171 11354 jl. j15. ; goto abnormal termination; 11172 11356 j1: sn w0 3 ; timeout-error: 11173 11358 jl. j14. ; if timeout=3 then goto timeout(mon); 11174 11360 jl. j15. ; goto abnormal termination; 11175 11362 11175 11362 j18: am 11-10 ; blocknumber error: result:=11; 11176 11364 j17: am 10-9 ; accept master clear: result:=10; 11177 11366 j16: am 9-8 ; master clear: result:=9; 11178 11368 j15: am 8-7 ; abnormal termination: result:=8; 11179 11370 j14: am 7-5 ; timeout(mon): result:=7; 11180 11372 j12: am 5-4 ; parity error: result:=5; 11181 11374 j11: am 4-0 ; blocklength error: result:=4; 11182 11376 j10: al w3 0 ; ok: result:=0; 11183 11378 jl. (i0.) ; return; 11184 11380 i0: 0 ; saved link; 11185 11382 i1: 8.7577 7777 ; event status mask not including blocklenght error 11186 11384 e. 11187 11384 11187 11384 ; setup statusbyte. 11188 11384 ; call: return: 11189 11384 ; w0 destroyed 11190 11384 ; w1 rec unchanged 11191 11384 ; w2 main unchanged 11192 11384 ; w3 link destroyed 11193 11384 b.i0 w. 11194 11384 n1: rs. w3 i0. ; setup statusbyte: 11195 11386 bz w3 x2+p96 ; statusbyte:= 11196 11388 ls w3 2 ; blockcontrol<2 11197 11390 bl w0 x1+s2 ; +(received blockno mod 2)<7 11198 11392 sz w0 -1<11 ; 11199 11394 al w3 x3+1<7 ; 11200 11396 ba w3 x1+s6 ; +errorbits; 11201 11398 ls w3 4 ; 11202 11400 hs w3 x1+s3 ; insert statusbyte; 11203 11402 jl. (i0.) ; return; 11204 11404 i0: 0 ; saved link 11205 11406 e. 11206 11406 11206 11406 11206 11406 ; setup channelprogram. 11207 11406 ; call: return: 11208 11406 ; w0 destroyed 11209 11406 ; w1 rec unchanged 11210 11406 ; w2 main unchanged 11211 11406 ; w3 link destroyed 11212 11406 b.i0,j1 w. 11213 11406 n2: rs. w3 i0. ; setup ch pg: 11214 11408 al w0 -1 ; startbyte(rec):= dummy 11215 11410 rs w0 x1+s2 ; 11216 11412 bz w0 x2+p93 ; 11217 11414 so w0 4.00002 ; if dataflag(operation)=off then 11218 11416 jl. j0. ; goto receive header; 11219 11418 rl w0 x2+p91 ; receive header-data: 11220 11420 rs w0 x1+s5 ; 11221 11422 al w0 -1 ; op(header):= dummy in cnain 11222 11424 hs. w0 c3.+1 ; 11223 11426 bz w0 x2+p92 ; 11224 11428 hs. w0 c4. ; addr code:=addr code(main); 11225 11430 al w0 1<8 ; op(data):=read; 11226 11432 hs. w0 c4.+1 ; 11227 11434 rl w0 x2+p85 ; 11228 11436 rs. w0 c4.+2 ; first addr:=first data rec; 11229 11438 rl w0 x2+p86 ; 11230 11440 rs. w0 c4.+4 ; size:=size data rec; 11231 11442 jl. (i0.) ; exit: return; 11232 11444 j0: al w0 0 ; receive-header: 11233 11446 rs w0 x1+s5 ; mess buff:=0; 11234 11448 al w0 1<8 ; 11235 11450 hs. w0 c3.+1 ; op(header):=read; 11236 11452 al w0 5<8 ; 11237 11454 hs. w0 c4.+1 ; op(data):=dummy; 11238 11456 j1: jl. (i0.) ; exit: return; 11239 11458 i0: 0 ; saved link 11240 11460 e. 11241 11460 11241 11460 ; initiate proc desc(rec). 11242 11460 ; clear the tail of the proc desc except the reset delay and 11243 11460 ; the testinformation. 11244 11460 ; call: return: 11245 11460 ; w0 unchanged 11246 11460 ; w1 rec unchanged 11247 11460 ; w2 unchanged 11248 11460 ; w3 link destroyed 11249 11460 b.i1,j0 w. 11250 11460 n3: ds. w0 i1. ; initiate proc desc: 11251 11462 al w3 x1+s4 ; clear proc desc from 11252 11464 al w0 0 ; start of status area 11253 11466 j0: rs w0 x3 ; to start of test information area; 11254 11468 al w3 x3+2 ; 11255 11470 se w3 x1+s7 ; 11256 11472 jl. j0. ; 11257 11474 rl. w0 i1. ; 11258 11476 jl. (i0.) ; 11259 11478 i0: 0 ; 11260 11480 i1: 0 ; 11261 11482 e. 11262 11482 11262 11482 e. ; end of receiver 11263 11482 \f 11263 11482 11263 11482 ; block including transmitter. 11264 11482 11264 11482 b.c16,n5,s16 w. 11265 11482 11265 11482 ; transmitter. 11266 11482 11266 11482 m. 11266 11482 fpa transmitter 11267 11482 11267 11482 ; process description: 11268 11482 11268 11482 ; a48: ; interval 11269 11482 ; a49: ; interval 11270 11482 ; a10: ; kind 11271 11482 ; a11: ; name 11272 11482 ; a50: ; mainproc 11273 11482 ; a52: ; reserver 11274 11482 ; a53: ; users 11275 11482 ; a54: ; next message 11276 11482 ; a55: ; last message 11277 11482 ; a56: ; interrupt address 11278 11482 11278 11482 p2=p0 ; state(trm) 11279 11482 p3=p2+2 ; link 11280 11482 s0=p3+2 ; transmit status, cur. ch. command 11281 11482 ; , rem. char count 11282 11482 ; , cur. status 11283 11482 ; , event status 11284 11482 s1=s0+8 ; receive status , cur. ch. command 11285 11482 ; , rem. char count 11286 11482 ; , cur. status 11287 11482 ; , event status 11288 11482 s2=s1+8 ; startbyte<16 11289 11482 s3=s2+2 ; statusbyte<16 11290 11482 s4=s3+2 ; current blocknumber 11291 11482 s5=s4+2 ; message buffer 11292 11482 s6=s5+2 ; long delay(in 0.1 msec) 11293 11482 s7=s6+2 ; short delay(in 0.1 msec) 11294 11482 11294 11482 ; error parameters: 11295 11482 s10=s7+2 , ; errorcount , blocklength error 11296 11482 , ; parity error , timeout(write) 11297 11482 , ; timeout(mon) , abnormal termination 11298 11482 , ; blocklength - , parity error(statusbyte) 11299 11482 , ; waitpg term , 11300 11482 s11=s10+10 ; start time(io op) 11301 11482 ; - 11302 11482 s12=s11+4 ; 0 < execution time(io-op) =< 5 11303 11482 ; 5 < - =< 10 11304 11482 ; 10 < - =< 20 11305 11482 ; 20 < - =< 40 11306 11482 ; 40 < - =< 80 11307 11482 ; 80 < - 11308 11482 s13=s12+12 ; start of channel program area 11309 11482 ; s14 ; top of channel program area 11310 11482 11310 11482 11310 11482 11310 11482 \f 11310 11482 11310 11482 11310 11482 ; transmitter channel program: 11311 11482 11311 11482 ; start1: 11312 11482 ; transmit startbyte. 11313 11482 c0: 4<12+3<8+1<7 ; addr code:=devi desc , op:=write, continue 11314 11484 +s2 ; first addr:=addr(startbyte) 11315 11486 1 ; char count:=1 11316 11488 ; transmit header. 11317 11488 c1: 4<12+3<8+1<7 ; addr code:=devi desc , op:=write, continue 11318 11490 +p75-p201 ; first addr:=start header (in mainproc) 11319 11492 2+1+11+10 ; char count 11320 11494 ; transmit data. 11321 11494 c2: 3<8 ; addr code , op:=write 11322 11496 0 ; first addr 11323 11498 0 ; char count 11324 11500 ; sense status(trm). 11325 11500 c3: 4<12+0<8 ; addr code:=devi desc , op:=sense 11326 11502 +s0 ; first addr:=addr(trm status) 11327 11504 12 ; char count:=12 11328 11506 ; receive statusbyte. 11329 11506 c4: 4<12+1<8 ; addr code:=devi desc , op:=read 11330 11508 +s3 ; first addr:=addr(statusbyte) 11331 11510 1 ; char count:=1 11332 11512 ; sense status(rec) 11333 11512 c5: 4<12+0<8 ; addr code:=devi desc , op:=sense 11334 11514 +s1 ; first addr:=addr(rec status) 11335 11516 12 ; char count:=12 11336 11518 ; stop. 11337 11518 c6: 15<8 ; dummy , op:=stop 11338 11520 0 ; dummy 11339 11522 10 000 ; timeout:=1 sec(in units of 0.1 msec) 11340 11524 11340 11524 s14=s13+c6+6-c0 11341 11524 11341 11524 c.(:(:p211-s14:)a.8.37777777:)-1, m.***name error p211 11342 11524 z. 11343 11524 11343 11524 11343 11524 ; channel program used of operations send directly 11344 11524 ; to the transmitter. 11345 11524 ; transmit startbyte. 11346 11524 c10: 4<12+3<8+1<7 ; addr code:=devi desc , op:=write, continue 11347 11526 +s2 ; first addr:=addr(startbyte) 11348 11528 1 ; char count:=1 11349 11530 ; command1 (transmit data block, autoload or dummy). 11350 11530 c11: 0<12+0 ; addr code:=sender(mess) , op:=command1 11351 11532 0 ; first addr 11352 11534 0 ; char count 11353 11536 ; sense status. 11354 11536 4<12+0<8 ; addr code:=devi desc , op:=sense 11355 11538 +s0 ; first addr:=sense area 11356 11540 12 ; char count:=12 11357 11542 ; command2 (receive statusbyte or dummy). 11358 11542 c12: 4<12+0 ; addr code:=devi desc , op:=command2 11359 11544 +s3 ; first addr:=addr(startbyte) 11360 11546 1 ; char count:=1 11361 11548 ; stop. 11362 11548 15<8 ; addr code:=dummy , op:=stop 11363 11550 0 ; dummy 11364 11552 50 000 ; timeout:=5 sec (in units of 0.1 msec) 11365 11554 \f 11365 11554 11365 11554 b.i10,m20 w. 11366 11554 11366 11554 b.j10 w. 11367 11554 h88: am (x1+a50) ; reveiver 11368 11556 rl w0 +a52 ; 11369 11558 rl w2 b18 ; 11370 11560 sn w0 0 ; if reserver(main)=0 then 11371 11562 jl w3 g15 ; check reserver; 11372 11564 jl w3 g17 ; link operation; 11373 11566 11373 11566 j0: bz w0 x2+9 ; execute: 11374 11568 c.p101 b.f1 w. ;*****test 32***** 11375 11568 rs. w3 f0. ; 11376 11570 jl. w3 f4. ; 11377 11572 32 ; 11378 11574 f0: 0 ; 11379 11576 jl. f1. ; 11380 11578 rl w0 x2+8 ; param0:=operation, mode; 11381 11580 rs w0 x3 ; 11382 11582 al w0 x3 ; 11383 11584 al w1 x3 ; 11384 11586 jl. w3 f5. ; 11385 11588 f1: ; 11386 11588 e.z. ;*****test 32***** 11387 11588 so w0 2.10 ; if not mode.reset then 11388 11590 jl. j1. ; goto cont; 11389 11592 al w0 -2 ; reset: 11390 11594 rs w0 x1+p2 ; state:=direct reset; 11391 11596 rl w3 x1+a235 ; device:=device code(proc); 11392 11598 rl w1 x1+s7 ; timeout:=short delay; 11393 11600 al w0 2<2+1<1+1 ; function:=reset, wait, exit; 11394 11602 al w2 0 ; mess buff:=dummy; 11395 11604 jd 1<11+p109 ; start io; 11396 11606 11396 11606 m15: rl w0 x1+a56 ; after wait: 11397 11608 se w0 0 ; if regret flag then 11398 11610 jl. j7. ; goto result1; 11399 11612 rl w2 b18 ; 11400 11614 bz w0 x2+9 ; 11401 11616 11401 11616 j1: so w0 2.01 ; cont: if mode.rec then 11402 11618 am 5<8-1<8 ; command2:=read 11403 11620 al w0 1<8 ; else 11404 11622 hs. w0 c12.+1 ; command2:=dummy; 11405 11624 ld w0 -100 ; 11406 11626 ds w0 x1+s0+2 ; 11407 11628 ds w0 x1+s0+6 ; clear status area; 11408 11630 al w0 -1 ; 11409 11632 rs w0 x1+s3 ; statuschar:=-1; 11410 11634 rs w0 x1+p2 ; state:=operate direct; 11411 11636 bz w0 x2+8 ; if operation(buf)<>transmit then 11412 11638 se w0 5 ; goto autoload; 11413 11640 jl. j3. ; 11414 11642 11414 11642 11414 11642 j2: rl w0 x2+12 ; transmit: 11415 11644 ws w0 x2+10 ; 11416 11646 ls w0 -1 ; maxcharcount:= 11417 11648 ba. w0 1 ; ((last-first)//1-1)*3; 11418 11650 wm w0 g48 ; 11419 11652 sl w0 (x2+14) ; if charcount.mess>maxchar count then 11420 11654 se w3 0 ; goto deliver result3; 11421 11656 jl. j6. ; 11422 11658 al w0 3<8 ; 11423 11660 hs. w0 c11.+1 ; command1:=write; 11424 11662 rl w3 x2+10 ; first addr:=mess.first; 11425 11664 rl w0 x2+14 ; charcount:=mess.charcount; 11426 11666 sh w0 0 ; if charcount=<0 then 11427 11668 jl. j4. ; goto receive; 11428 11670 ds. w0 c11.+4 ; 11429 11672 rl w0 x2+16 ; 11430 11674 ls w0 4 ; 11431 11676 hs w0 x1+s2 ; startchar:=startchar(mess); 11432 11678 al. w1 c10. ; startchpg:=trm startbyte; 11433 11680 jl. j5. ; goto startop; 11434 11682 11434 11682 j3: al w0 6<8 ; autoload: 11435 11684 hs. w0 c11.+1 ; command2:=autoload; 11436 11686 am c11-c12 ; start(chpg):=start1; 11437 11688 11437 11688 j4: al. w1 c12. ; receive: start(chpg):=start2; 11438 11690 al w2 0 ; start-op: 11439 11692 j5: al w0 1<2+1 ; io-function:=start chpg, exit; 11440 11694 am (b19) ; 11441 11696 rl w3 +a235 ; devno:=devno(proc); 11442 11698 c.p101 b.f1 w. ;*****test47***** 11443 11698 rs. w3 f0. ; 11444 11700 jl. w3 f4. ; 11445 11702 47 ; 11446 11704 f0: 0 ; 11447 11706 jl. f1. ; 11448 11708 al w0 x1 ; dump channelpg; 11449 11710 al. w1 c12.+6 ; 11450 11712 jl. w3 f5. ; 11451 11714 f1: ; 11452 11714 e.z. ;*****test47***** 11453 11714 jd 1<11+p109 ; start io; 11454 11716 ld w3 -100 ; error: 11455 11718 ds w3 g21 ; mess.status, mess.bytes trf:=0,0; 11456 11720 al w3 -1 ; 11457 11722 ds w3 g23 ; mess.chars trf, statuschar:=0,-1; 11458 11724 sn w0 3 ; if io-result=3 then 11459 11726 jl. j6. ; goto result3 11460 11728 jl. j7. ; else goto result1; 11461 11730 11461 11730 m16: rl w2 b18 ; after operation: 11462 11732 rl w3 x1+a233 ; status:=event status(std) or event status(proc); 11463 11734 lo w3 x1+s0+6 ; if io-result=3 then (monitor timeout) 11464 11736 sn w0 3 ; status:=execution timeout; 11465 11738 al w3 1<9 ; 11466 11740 rs w3 g20 ; status(answer):=status; 11467 11742 se w0 3 ; if io-result=3 (monitor timeout) 11468 11744 sh w3 -1 ; or bit0(status)=1 then 11469 11746 al w0 0 ; io-result:=0; 11470 11748 rl w3 x2+14 ; chars:=mess.char count; 11471 11750 se w0 0 ; if io-result<>0 then 11472 11752 al w3 0 ; chars:=0; 11473 11754 rs w3 g22 ; chars trf(answer):=chars; 11474 11756 al w2 0 ; 11475 11758 al w3 x3+2 ; 11476 11760 wd w3 g48 ; 11477 11762 ls w3 1 ; 11478 11764 rs w3 g21 ; bytes trf(answer):=(chars+2)//3*2; 11479 11766 rl w3 x1+s3 ; if no statuschar received then 11480 11768 se w3 -1 ; statuschar(answer):=-1; 11481 11770 ls w3 -16 ; else statuschar(answer):=statuschar received; 11482 11772 rs w3 g23 ; 11483 11774 sn w0 0 ; if io-result=0 then 11484 11776 jl. j7. ; goto result1; 11485 11778 am 4-3 ; result4: result:=4; 11486 11780 j6: am 3-1 ; result3: result:=3; 11487 11782 j7: al w0 1 ; result1: or :=1; 11488 11784 c.p101 b.f1 w. ;*****test46***** 11489 11784 rs. w3 f0. ; 11490 11786 jl. w3 f4. ; 11491 11788 46 ; 11492 11790 f0: 0 ; 11493 11792 jl. f1. ; 11494 11794 rs w0 g24 ; 11495 11796 al w0 g20 ; 11496 11798 al w1 g24 ; dump answer (g20,21,22,23) and result (g24); 11497 11800 jl. w3 f5. ; 11498 11802 f1: ; 11499 11802 e.z. ;*****test46***** 11500 11802 jl w3 g19 ; deliver: deliver result(result); 11501 11804 al w0 0 ; 11502 11806 rs w0 x1+p2 ; state:=idle; 11503 11808 jl w3 g25 ; next operation; 11504 11810 jl. j0. ; goto execute; 11505 11812 e. 11506 11812 \f 11506 11812 11506 11812 ; start operation. 11507 11812 11507 11812 ; w1: transmitter. 11508 11812 e9: rl w2 x1+a50 ; entry1: main:=main(trm); 11509 11814 al w0 0 ; 11510 11816 hs w0 x1+s10 ; errorcount:=0; 11511 11818 bz w0 x2+p73 ; 11512 11820 al w3 2.1110 ; 11513 11822 la w3 0 ; contents:=operation(4:6); 11514 11824 hs w3 x2+p77 ; 11515 11826 sz w0 4.01000 ; if initiate then 11516 11828 jl. w3 n3. ; initiate proc desc; 11517 11830 sz w0 4.00300 ; if delay then 11518 11832 jl. m1. ; goto start wait; 11519 11834 11519 11834 m0: al w0 3 ; start trm-rec: 11520 11836 rs w0 x1+p2 ; state:=transmitting; 11521 11838 jl. w3 n1. ; setup startbyte; 11522 11840 jl. w3 n2. ; setup channelprogram; 11523 11842 al w0 1<2 ; function:=start channel pg; 11524 11844 rl w2 x1+s5 ; mess buff:=mess buff(op); 11525 11846 rl w3 x1+a235 ; dev desc:=dev desc(trm); 11526 11848 al. w1 c0. ; start(ch pg):=start1; 11527 11850 c.p101 b.f1 w. ;*****test33***** 11528 11850 rs. w3 f0. ; 11529 11852 jl. w3 f4. ; 11530 11854 33 ; 11531 11856 f0: 0 ; 11532 11858 jl. f1. ; 11533 11860 al. w0 c0. ; 11534 11862 al. w1 c6.+4 ; 11535 11864 jl. w3 f5. ; 11536 11866 f1: ; 11537 11866 e.z. ;*****test33***** 11538 11866 c.p102 ;*****statistics begin***** 11539 11866 ds. w1 i1. ; 11540 11868 jd 1<11+36 ; get clock; 11541 11870 am (b19) ; 11542 11872 ds w1 +s11+2 ; save start time(operation); 11543 11874 dl. w1 i1. ; 11544 11876 z. ;*****statistics end***** 11545 11876 jd 1<11+p109 ; start io; 11546 11878 sn w0 0 ; if result=0 then 11547 11880 jl (b20) ; wait; 11548 11882 rl w1 b19 ; 11549 11884 rl w2 x1+a50 ; 11550 11886 hs w0 x2+p74 ; result:=io-result; 11551 11888 jl. m12. ; goto return; 11552 11890 11552 11890 m4: am 4.02000 ; reset and wait: operation:=reset, short delay; 11553 11892 m5: al w0 4.00133 ; wait: operation:=short delay; 11554 11894 m1: sz w0 4.00033 ; start wait: 11555 11896 am 2-1 ; if dummy header then 11556 11898 al w2 1 ; state(trm):=waiting before poll; 11557 11900 rs w2 x1+p2 ; else state(trm):=waiting; 11558 11902 rl w3 x1+a235 ; dev desc:=dev desc(trm); 11559 11904 so w0 4.00200 ; if short delay then 11560 11906 am s7-s6 ; time:=short delay; 11561 11908 rl w1 x1+s6 ; else time:=long delay; 11562 11910 sz w0 4.02000 ; if reset bit then 11563 11912 am 1<1 ; function:=reset, start wait; 11564 11914 al w0 2<2 ; else function:=start std wait; 11565 11916 al w2 0 ; message buffer:=0; 11566 11918 c.p101 b.f1 w. ;*****test34***** 11567 11918 rs. w3 f0. ; 11568 11920 jl. w3 f4. ; 11569 11922 34 ; 11570 11924 f0: 0 ; 11571 11926 jl. f1. ; 11572 11928 al w0 x1+2 ; 11573 11930 jl. w3 f5. ; 11574 11932 f1: ; 11575 11932 e.z. ;*****test34***** 11576 11932 jd 1<11+p109 ; start io; 11577 11934 11577 11934 m9: jl (b20) ; wait: wait; 11578 11936 11578 11936 \f 11578 11936 11578 11936 11578 11936 ; after interrupt. 11579 11936 11579 11936 ; w1: transmitter 11580 11936 c44: rl w2 x1+a50 ; interrupt entry: 11581 11938 c.p101 b.f1 w. ;*****test49***** 11582 11938 rs. w0 f0. ; 11583 11940 jl. w3 f4. ; 11584 11942 49 ; 11585 11944 f0: 0 ; 11586 11946 jl. f1. ; 11587 11948 al w2 x3 ; 11588 11950 dl w0 x1+a231 ; 11589 11952 ds w0 x2+2 ; 11590 11954 dl w0 x1+a233 ; 11591 11956 ds w0 x2+6 ; dump std status area 11592 11958 rl w0 x1+a244 ; io-result; 11593 11960 rs w0 x2+8 ; 11594 11962 al w0 x2 ; 11595 11964 al w1 x2+8 ; 11596 11966 jl. w3 f5. ; 11597 11968 f1: ; 11598 11968 e.z. ;*****test49***** 11599 11968 c.p101 b.f1 w. ;*****test36***** 11600 11968 rs. w3 f0. ; 11601 11970 jl. w3 f4. ; 11602 11972 36 ; 11603 11974 f0: 0 ; 11604 11976 jl. f1. ; 11605 11978 al w0 x1+p2 ; 11606 11980 al w1 x1+s3 ; 11607 11982 jl. w3 f5. ; 11608 11984 f1: ; 11609 11984 e.z. ;*****test36***** 11610 11984 rl w3 x1+p2 ; 11611 11986 am x3 ; 11612 11988 jl. (x3+6) ; goto case state of 11613 11990 m15 ; (-2: wait direct, 11614 11992 m16 ; -1: operate direct, 11615 11994 m9 ; 0: idle, 11616 11996 m0 ; 1: waiting before poll, 11617 11998 m0 ; 2: waiting, 11618 12000 m10 ; 3: transmitting); 11619 12002 11619 12002 m10: ; after transmission: 11620 12002 c.p102 ;*****statistics begin***** 11621 12002 ds. w1 i1. ; 11622 12004 ds. w3 i2. ; 11623 12006 jd 1<11+36 ; get clock; 11624 12008 rl w2 b19 ; 11625 12010 ss w1 x2+s11+2 ; 11626 12012 al w2 x2+s12 ; 11627 12014 sl w1 800 ; time>80.0; 11628 12016 al w2 x2+2 ; 11629 12018 sl w1 400 ; time>40.0; 11630 12020 al w2 x2+2 ; 11631 12022 sl w1 200 ; time>20.0; 11632 12024 al w2 x2+2 ; 11633 12026 sl w1 100 ; time>10.0; 11634 12028 al w2 x2+2 ; 11635 12030 sl w1 50 ; time>5.0; 11636 12032 al w2 x2+2 ; 11637 12034 al w0 1 ; 11638 12036 wa w0 x2 ; number(time zone) increased 1; 11639 12038 rs w0 x2 ; 11640 12040 dl. w1 i1. ; 11641 12042 dl. w3 i2. ; 11642 12044 z. ;*****statistics end***** 11643 12044 jl. w3 n0. ; check state(proc,result); 11644 12046 hs w3 x2+p74 ; result(main):=result; 11645 12048 bz w0 x1+s3 ; 11646 12050 ls w0 -4-2 ; 11647 12052 la. w0 i0. ; 11648 12054 hs w0 x2+p76 ; blockcontrol:=statusbyte(5:6); 11649 12056 c.p101 b.f2 w. ;*****test38***** 11650 12056 rs. w3 f0. ; 11651 12058 jl. w3 f4. ; 11652 12060 38 ; 11653 12062 f0: 0 ; 11654 12064 jl. f1. ; 11655 12066 al w0 x2+p75 ; 11656 12068 al w1 x2+p75+14 ; 11657 12070 jl. w3 f5. ; 11658 12072 f1: ; 11659 12072 e.z. ;*****test38***** 11660 12072 c.p101 b.f1 w. ;*****test35***** 11661 12072 rs. w3 f0. ; 11662 12074 jl. w3 f4. ; 11663 12076 35 ; 11664 12078 f0: 0 ; 11665 12080 jl. f1. ; 11666 12082 al w0 x1+s13 ; 11667 12084 al w1 x1+s14-2 ; 11668 12086 jl. w3 f5. ; 11669 12088 f1: ; 11670 12088 e.z. ;*****test35***** 11671 12088 sn w3 0 ; if result=0 then 11672 12090 jl. m11. ; goto ok; 11673 12092 c.p101 b.f1 w. ;*****test37***** 11674 12092 rs. w3 f0. ; 11675 12094 jl. w3 f4. ; 11676 12096 37 ; 11677 12098 f0: 0 ; 11678 12100 jl. f1. ; 11679 12102 al w2 x3 ; 11680 12104 dl w0 x1+a231 ; 11681 12106 ds w0 x2+2 ; 11682 12108 dl w0 x1+a233 ; 11683 12110 ds w0 x2+6 ; 11684 12112 rl w3 x1+a244 ; 11685 12114 rl. w0 f0. ; 11686 12116 ds w0 x2+10 ; 11687 12118 al w0 x2 ; 11688 12120 al w1 x2+10 ; 11689 12122 jl. w3 f5. ; 11690 12124 f1: ; 11691 12124 e.z. ;*****test37***** 11692 12124 al w0 x2 ; save w3 11693 12126 jl w2 (b31) ; call errorlog 11694 12128 rl w2 0 ; restore w3 11695 12130 bz w0 x2+p73 ; 11696 12132 sz w0 4.00001 ; if no error recovery then 11697 12134 jl. m12. ; goto return; 11698 12136 c.p102 ;*****statistics begin***** 11699 12136 al w0 1 ; 11700 12138 am x3-3 ; 11701 12140 ba w0 x1+s10 ; errorcount(result):=errorcount(result)+1; 11702 12142 am x3-3 ; 11703 12144 hs w0 x1+s10 ; 11704 12146 z. ;*****statistics end***** 11705 12146 al w0 1 ; 11706 12148 ba w0 x1+s10 ; errorcount:=errorcount+1; 11707 12150 hs w0 x1+s10 ; 11708 12152 sl w0 p140 ; if errorcount>=max errorcount then 11709 12154 jl. m12. ; goto return; 11710 12156 am x3-3 ; 11711 12158 jl. (x3-3) ; goto case result of 11712 12160 m0 ; 4: blocklength error(read), 11713 12162 m0 ; 5: parity error(read), 11714 12164 m4 ; 6: timeout(write), 11715 12166 m5 ; 7: timeout(mon), 11716 12168 m4 ; 8: abnormal termination, 11717 12170 m0 ; 9: blocklength error(statusbyte), 11718 12172 m0 ; 10: parity error(statusbyte), 11719 12174 m4 ; 11: waitpg term); 11720 12176 11720 12176 m11: al w0 1 ; ok: 11721 12178 wa w0 x1+s4 ; current blockno:=currentblockno+1; 11722 12180 rs w0 x1+s4 ; 11723 12182 m12: al w0 0 ; return: 11724 12184 rs w0 x1+p2 ; state:=ready; 11725 12186 c.p101 b.f1 w. ;*****test39***** 11726 12186 rs. w3 f0. ; 11727 12188 jl. w3 f4. ; 11728 12190 39 ; 11729 12192 f0: 0 ; 11730 12194 jl. f1. ; 11731 12196 al w0 x1+2 ; 11732 12198 jl. w3 f5. ; 11733 12200 f1: ; 11734 12200 e.z. ;*****test39***** 11735 12200 jl. e12. ; return to main; 11736 12202 11736 12202 i0: 2.11 ; mask 11737 12204 11737 12204 c.p102 ;*****statistics begin***** 11738 12204 0 ; 11739 12206 i1: 0 ; 11740 12208 0 ; 11741 12210 i2: 0 ; 11742 12212 z. ;*****statistics end***** 11743 12212 11743 12212 e. 11744 12212 11744 12212 \f 11744 12212 11744 12212 ; check state(proc,result). 11745 12212 ; the procedure checks the result of the i/o operation by inspecting the timeout, 11746 12212 ; the status area of the receive operation and the statusbyte received. 11747 12212 ; result: 0 ok 11748 12212 ; 4 blocklength error 11749 12212 ; 5 parity error(read) 11750 12212 ; 6 time-out(write) 11751 12212 ; 7 time-out(monitor) 11752 12212 ; 8 abnormal termination, that is buserror, disconnected line, 11753 12212 ; disconnected controller, power up, etc. 11754 12212 ; 9 parity error(statusbyte) 11755 12212 ; 10 blocklength error(statusbyte) 11756 12212 ; 11 waitpg termination 11757 12212 ; 11758 12212 ; call: return: 11759 12212 ; w0 destroyed 11760 12212 ; w1 proc unchanged 11761 12212 ; w2 unchanged 11762 12212 ; w3 link result 11763 12212 b.i0,j20 w. 11764 12212 n0: rs. w3 i0. ; check state: 11765 12214 rl w0 x1+a244 ; 11766 12216 se w0 0 ; if timeout<>0 then 11767 12218 jl. j1. ; goto timeout-error; 11768 12220 bz w0 x1+s0+6 ; 11769 12222 sz w0 1<9 ; if bit2(write event status)<>0 then 11770 12224 jl. j13. ; goto timeout(write); 11771 12226 rl w0 x1+s1+6 ; if event status(rec)<>0 then 11772 12228 se w0 0 ; goto event-error; 11773 12230 jl. j0. ; 11774 12232 rl w0 x1+s1+2 ; if rem.char count=0 then 11775 12234 sn w0 0 ; goto check statusbyte; 11776 12236 jl. j2. ; else 11777 12238 jl. j11. ; goto blocklength error; 11778 12240 j0: bz w3 0 ; event-error: 11779 12242 sz w3 1<10 ; if bit1 then 11780 12244 jl. j12. ; goto parity error; 11781 12246 sz w3 1<7 ; if bit4 then 11782 12248 jl. j11. ; goto blocklength error; 11783 12250 jl. j15. ; goto abnormal termination; 11784 12252 j1: sn w0 3 ; timeout-error: 11785 12254 jl. j14. ; if timeout=3 then goto timeout(mon); 11786 12256 sn w0 5 ; if timeout=5 then 11787 12258 jl. j18. ; goto waitpg term; 11788 12260 jl. j15. ; goto abnormal termination; 11789 12262 j2: bz w0 x1+s3 ; check statusbyte: 11790 12264 sz w0 2.01<4 ; if statusbyte(7:7)=1 then 11791 12266 jl. j16. ; goto parity(statusbyte); 11792 12268 sz w0 2.10<4 ; if statusbyte(6:6)=1 then 11793 12270 jl. j17. ; goto blocklength(statusbyte); 11794 12272 jl. j10. ; goto ok; 11795 12274 11795 12274 j18: am 11-10 ; waitpg term: result:=11; 11796 12276 j17: am 10-9 ; blocklength(statusbyte): res:=10; 11797 12278 j16: am 9-8 ; parity(statusbyte): result:=9; 11798 12280 j15: am 8-7 ; abnormal termination: result:=8; 11799 12282 j14: am 7-6 ; timeout(mon): result:=7; 11800 12284 j13: am 6-5 ; timeout(write): result:=6; 11801 12286 j12: am 5-4 ; parity error: result:=5; 11802 12288 j11: am 4-0 ; blocklength error: result:=4; 11803 12290 j10: al w3 0 ; ok: result:=0; 11804 12292 jl. (i0.) ; return; 11805 12294 i0: 0 ; saved link; 11806 12296 e. 11807 12296 11807 12296 11807 12296 ; setup startbyte. 11808 12296 ; call: return: 11809 12296 ; w0 operation 11810 12296 ; w1 proc unchanged 11811 12296 ; w2 main unchanged 11812 12296 ; w3 link destroyed 11813 12296 b.i0,j1 w. 11814 12296 n1: rs. w3 i0. ; setup startbyte: 11815 12298 bz w0 x2+p73 ; 11816 12300 sz w0 4.30000 ; if operation=special header then 11817 12302 jl. j0. ; goto special header; 11818 12304 al w3 4.00032 ; startbyte:= 11819 12306 la w3 0 ; databit<3+headerbit<2+dataflag<1 11820 12308 rl w0 x1+s4 ; 11821 12310 sz w0 2.1 ; +blockcount mod 2<7; 11822 12312 al w3 x3+1<7 ; return; 11823 12314 jl. j1. ; 11824 12316 j0: sz w0 4.10000 ; special header: 11825 12318 am 2.00100000; if master clear then 11826 12320 al w3 2.11011111; startbyte:=master clear; 11827 12322 j1: ls w3 4 ; else 11828 12324 hs w3 x1+s2 ; startbyte:=accept master clear; 11829 12326 jl. (i0.) ; return; 11830 12328 i0: 0 ; saved link 11831 12330 e. 11832 12330 11832 12330 11832 12330 ; setup channelprogram(trm). 11833 12330 ; call: return: 11834 12330 ; w0 destroyed 11835 12330 ; w1 proc unchanged 11836 12330 ; w2 main unchanged 11837 12330 ; w3 link destroyed 11838 12330 b.i0,j0 w. 11839 12330 n2: rs. w3 i0. ; setup ch pg: 11840 12332 al w0 -1 ; statusbyte(trm):= dummy 11841 12334 rs w0 x1+s3 ; 11842 12336 bz w0 x2+p73 ; 11843 12338 so w0 4.00002 ; if dataflag(operation)=off then 11844 12340 jl. j0. ; goto transmit header; 11845 12342 rl w0 x2+p71 ; 11846 12344 rs w0 x1+s5 ; message buffer:=mess buff(main); 11847 12346 al w0 -1 ; op(header):= dummy in chain 11848 12348 hs. w0 c1.+1 ; 11849 12350 bz w0 x2+p72 ; 11850 12352 hs. w0 c2. ; addr code:=addr code(data); 11851 12354 al w0 3<8 ; 11852 12356 hs. w0 c2.+1 ; op(data):=write; 11853 12358 rl w0 x2+p65 ; 11854 12360 rs. w0 c2.+2 ; first addr:=first data trm; 11855 12362 rl w0 x2+p66 ; 11856 12364 rs. w0 c2.+4 ; size:=size data; 11857 12366 jl. (i0.) ; exit: return; 11858 12368 j0: al w0 0 ; transmit header: 11859 12370 rs w0 x1+s5 ; message buffer:=0; 11860 12372 al w0 3<8 ; 11861 12374 hs. w0 c1.+1 ; op(header):=write; 11862 12376 al w0 5<8 ; 11863 12378 hs. w0 c2.+1 ; op(data):=dummy; 11864 12380 jl. (i0.) ; exit: return; 11865 12382 i0: 0 ; saved link 11866 12384 e. 11867 12384 11867 12384 11867 12384 ; initiate proc desc(trm). 11868 12384 ; call: return: 11869 12384 ; w0 unchanged 11870 12384 ; w1 trm unchanged 11871 12384 ; w2 unchanged 11872 12384 ; w3 link destroyed 11873 12384 b.i1,j0 w. 11874 12384 n3: ds. w0 i1. ; initiate proc desc: 11875 12386 al w3 x1+s0 ; 11876 12388 al w0 0 ; clear privat part of 11877 12390 j0: rs w0 x3 ; proc desc from 11878 12392 al w3 x3+2 ; status area to reset delay; 11879 12394 se w3 x1+s6 ; 11880 12396 jl. j0. ; 11881 12398 al w0 1 ; 11882 12400 rs w0 x1+s4 ; current blockno:=1; 11883 12402 rl. w0 i1. ; 11884 12404 jl. (i0.) ; 11885 12406 i0: 0 ; 11886 12408 i1: 0 ; 11887 12410 e. 11888 12410 11888 12410 e. ; end of block including transmitter. 11889 12410 11889 12410 11889 12410 c.p101 11890 12410 11890 12410 ; stepping stones: 11891 12410 11891 12410 jl. f4. ; 11892 12412 f4=k-2 ; 11893 12412 11893 12412 jl. f5. ; 11894 12414 f5=k-2 ; 11895 12414 11895 12414 jl. f6. ; 11896 12416 f6=k-2 ; 11897 12416 11897 12416 z. 11898 12416 11898 12416 e. ; end of block including main- and line-drivers. 11899 12416 \f 11899 12416 11899 12416 m. 11899 12416 monhost - host process drivers 11900 12416 11900 12416 b.i30 w. 11901 12416 i0=81 04 27, i1=12 00 00 11902 12416 11902 12416 ; if newtime (i0,i1) > oldtime (a133,a134) then oldtime:=newtime; 11903 12416 c.i0-a133 11904 12416 c.i0-a133-1, a133=i0, a134=i1, z. 11905 12416 c.i1-a134-1, a134=i1, z. 11906 12416 z. 11907 12416 11907 12416 i10=i0, i20=i1 11908 12416 11908 12416 i15=i10/100000 , i10=i10-i15*100000 , i25=i20/100000 , i20=i20-i25*100000 11909 12416 i14=i10/10000 , i10=i10-i14*10000 , i24=i20/10000 , i20=i20-i24*10000 11910 12416 i13=i10/1000 , i10=i10-i13*1000 , i23=i20/1000 , i20=i20-i23*1000 11911 12416 i12=i10/100 , i10=i10-i12*100 , i22=i20/100 , i20=i20-i22*100 11912 12416 i11=i10/10 , i10=i10-i11*10 , i21=i20/10 , i20=i20-i21*10 11913 12416 11913 12416 i2: <: date :> 11914 12440 (:i15+48:)<16+(:i14+48:)<8+46 11915 12442 (:i13+48:)<16+(:i12+48:)<8+46 11916 12444 (:i11+48:)<16+(:i10+48:)<8+32 11917 12446 11917 12446 (:i25+48:)<16+(:i24+48:)<8+46 11918 12448 (:i23+48:)<16+(:i22+48:)<8+46 11919 12450 (:i21+48:)<16+(:i20+48:)<8+ 0 11920 12452 11920 12452 i3: al. w0 i2. ; write date: 11921 12454 rs w0 x2+0 ; first free:=start(text); 11922 12456 al w2 0 ; 11923 12458 jl x3 ; return to slang(status ok); 11924 12460 11924 12460 jl. i3. ; 11925 12462 e. 11926 12462 j. 11926 12416 date 81.04.27 12.00.00 11927 12416 11927 12416 11927 12416 11927 12416 ; block containing host - and subprocess drivers. 11928 12416 11928 12416 b.u100 w. 11929 12416 11929 12416 c.-p103 11930 12416 p301=p71 11931 12416 p302=p72 11932 12416 p303=p73 11933 12416 p321=p91 11934 12416 p322=p92 11935 12416 p323=p93 11936 12416 z. 11937 12416 11937 12416 ; block containing host and subhost drivers. 11938 12416 11938 12416 b.s120 w. 11939 12416 11939 12416 ; host process. 11940 12416 11940 12416 b.i10,j10 w. 11941 12416 11941 12416 ; format of the process description: 11942 12416 11942 12416 m. 11942 12416 host 11943 12416 11943 12416 11943 12416 ; a48: ; <interval> 11944 12416 ; a49: ; <interval> 11945 12416 ; a10: ; <kind>=90 11946 12416 ; a11: ; <name>=<:host:> 11947 12416 ; a50: ; <dummy> 11948 12416 ; a52: ; <dummy> 11949 12416 ; a53: ; <dummy> 11950 12416 ; a54: ; <next message> 11951 12416 ; a55: ; <last message> 11952 12416 ; a56: ; <dummy> 11953 12416 \f 11953 12416 11953 12416 11953 12416 ; format of message and answer: 11954 12416 11954 12416 s0=8 , s1=s0+1 ; operation , mode 11955 12416 s2=s0+2 ; first addr(buffer) 11956 12416 s3=s2+2 ; last addr(buffer) 11957 12416 s4=s3+2 , s5=s4+1 ; dh.linkno , hostno 11958 12416 s6=s4+2 ; dh.host-id 11959 12416 s7=s6+2 , s8=s7+1 ; dh.home-reg, dh.net-id 11960 12416 s9=s7+2 ; jh.host-id 11961 12416 s10=s9+2 , s11=s10+1 ; jh.linkno , jh.net-id 11962 12416 11962 12416 s31=22 ; size of datas used in connection with operation=1 11963 12416 11963 12416 ; the host-driver accepts the following operations and modes: 11964 12416 11964 12416 ; operation mode header-func name 11965 12416 ; 1 5 9 lookup process 11966 12416 ; 1 6,7 13 lookup 11967 12416 ; 1 8,9 17 lookup reserve 11968 12416 ; 1 10,21 11 cancel reservation 11969 12416 ; 1 12,13 25 linkup remote 11970 12416 ; 1 14,15 29 linkup local 11971 12416 ; 1 16,17 32 lookup link 11972 12416 ; 2 0,1 8 release link 11973 12416 ; 9 0,1,2,3 45 operator output 11974 12416 ; 11 0,1,2,3 41 operator output-input 11975 12416 ; 2 create 11976 12416 ; 6 remove 11977 12416 \f 11977 12416 11977 12416 11977 12416 a0=1<23 11978 12416 i0: a0>0+a0>1+a0>2+a0>9+a0>11 11979 12418 i1: a0>5+a0>6+a0>7+a0>8+a0>9+a0>10+a0>11+a0>12+a0>13+a0>14+a0>15+a0>16+a0>17 11980 12420 i2: a0>0+a0>1 11981 12422 i3: a0>0+a0>1+a0>2+a0>3 11982 12424 11982 12424 h90: bz w0 x2+s0 ; host process: 11983 12426 rl. w1 i1. ; 11984 12428 sn w0 2 ; mode mask:=mode mask(operation); 11985 12430 rl. w1 i2. ; 11986 12432 se w0 16 ; 11987 12434 sl w0 3 ; 11988 12436 rl. w1 i3. ; 11989 12438 rl. w0 i0. ; 11990 12440 jl w3 g16 ; check operation(operation mask, mode mask); 11991 12442 11991 12442 ; check host-addr. 11992 12442 rl w0 x2+s1 ; 11993 12444 so w0 2.1 ; if address mode=1 then 11994 12446 jl. j1. ; begin 11995 12448 la w0 g50 ; address mode:=0; 11996 12450 rs w0 x2+s1 ; 11997 12452 rl w3 x2+s4 ; sub:=proc desc addr(mess); 11998 12454 rl w1 b4 ; 11999 12456 al w1 x1-2 ; 12000 12458 j0: al w1 x1+2 ; if sub is not included in device part of nametable then 12001 12460 sl w1 (b5) ; goto result 3; 12002 12462 jl g5 ; 12003 12464 se w3 (x1) ; 12004 12466 jl. j0. ; 12005 12468 rl w0 x3+a10 ; 12006 12470 la w0 g50 ; 12007 12472 se w0 p112 ; if kind(sub)<>local or remote process then 12008 12474 jl g5 ; goto result3; 12009 12476 rl w0 x3+a50 ; if main(sub)=0 then 12010 12478 sn w0 0 ; goto free sub; 12011 12480 jl. j4. ; 12012 12482 bz w0 x3+p11 ; 12013 12484 hs w0 x2+s4 ; dh.linkno:=dh.linkno(sub); 12014 12486 rl w0 x3+p5 ; 12015 12488 rs w0 x2+s6 ; dh.host-id:=dh.host-id(sub); 12016 12490 bz w0 x3+p6 ; 12017 12492 hs w0 x2+s7 ; dh.home-reg:=dh.home-reg(sub); 12018 12494 bz w0 x3+p7 ; 12019 12496 hs w0 x2+s8 ; dh.net-id:=dh.net-id(sub); 12020 12498 bz w0 x3+p9 ; 12021 12500 hs w0 x2+s10 ; jh.linkno:=jh.linkno(sub); 12022 12502 rl w1 x3+a50 ; 12023 12504 rl w0 x1+p202+p5; 12024 12506 rs w0 x2+s9 ; jh.host-id:=jh.host-id(subhost); 12025 12508 bz w0 x1+p202+p7; 12026 12510 hs w0 x2+s11 ; jh.net-id:=jh.net-id(sender host); 12027 12512 bz w0 x1+p202+p9; 12028 12514 hs w0 x2+s5 ; hostno:=rcno(subhost(main(sub))); 12029 12516 ; end; 12030 12516 12030 12516 ; this block transfers the operation and mode of the message 12031 12516 ; into a function mode of the format: 12032 12516 ; fmode:=header function<2+header mode. 12033 12516 j1: bz w0 x2+s0 ; 12034 12518 se w0 1 ; if operation=1 then 12035 12520 jl. j2. ; begin 12036 12522 bz w3 x2+s1 ; if mode(mess)<>32 then 12037 12524 ls w3 1 ; 12038 12526 se w3 32 ; header function:=(mode(mess)+1)<1; 12039 12528 al w3 x3+1 ; else 12040 12530 ls w3 2 ; header function:=mode(mess)<1; 12041 12532 rl w0 x2+s3 ; 12042 12534 ws w0 x2+s2 ; if size(data)<std data buffer size then 12043 12536 sh w0 s31-2-1 ; goto result 3; 12044 12538 jl g5 ; end; 12045 12540 jl. j3. ; 12046 12542 j2: al w3 8<2 ; if operation=2 then 12047 12544 sn w0 2 ; header function:=8; 12048 12546 jl. j3. ; 12049 12548 sn w0 9 ; if operation=9 then 12050 12550 al w3 45<2 ; header function:=45; 12051 12552 sn w0 11 ; if operation=11 then 12052 12554 al w3 41<2 ; header function:=41; 12053 12556 bz w0 x2+s1 ; 12054 12558 se w0 0 ; if mode<>0 then 12055 12560 al w3 x3+1 ; header mode:=1; 12056 12562 j3: hs w3 x2+s1 ; 12057 12564 12057 12564 ; call subhost. 12058 12564 bz w3 x2+s5 ; subhost:= 12059 12566 ls w3 1 ; word(hostno<1+start(name table)); 12060 12568 wa w3 b4 ; 12061 12570 sl w3 (b5) ; if host process outside name table then 12062 12572 jl g5 ; goto result3; 12063 12574 rl w3 x3 ; 12064 12576 rl w0 x3+a10 ; 12065 12578 se w0 p111 ; if kind(subhost)<>subhost kind then 12066 12580 jl g5 ; goto result 3; 12067 12582 rs w3 b19 ; current process:=subhost; 12068 12584 c.-p103 12069 12584 jl. h34. ; goto subhost-driver; 12070 12584 z. 12071 12584 c.p103-1 12072 12584 jl. h82. ; goto subhost-driver; 12073 12586 z. 12074 12586 12074 12586 j4: rl w0 x2+s0 ; free sub: 12075 12588 se. w0 (i10.) ; if operation<>lookup process then 12076 12590 jl g5 ; goto result3; 12077 12592 ld w0 -100 ; 12078 12594 rs w0 g20 ; 12079 12596 ds w0 g22 ; status, bytes trf:=0,0; 12080 12598 jl g7 ; goto result1; 12081 12600 12081 12600 i10: 1<12+2<1 ; 12082 12602 12082 12602 e. ; end host process. 12083 12602 \f 12083 12602 12083 12602 ; subhost process. 12084 12602 12084 12602 ; block including the host-process driver. 12085 12602 12085 12602 b.n130,q10,r40,t10 w. 12086 12602 12086 12602 m. 12086 12602 subhost 12087 12602 12087 12602 ; a48: ; <interval> 12088 12602 ; a49: ; <interval> 12089 12602 ; a10: ; <kind> 12090 12602 ; a11: ; <name> 12091 12602 ; a50: ; <mainproc> 12092 12602 ; a52: ; <reserver> 12093 12602 ; a53: ; <users> 12094 12602 ; a54: ; <next message> 12095 12602 ; a55: ; <last message> 12096 12602 ; a56: ; <external state> 12097 12602 12097 12602 ; p0: start of specific part: 12098 12602 s40=p0 ; mess buffer 12099 12602 ; p1: top of specific part; 12100 12602 12100 12602 ; p11: , p9 : ; <devno> , <rcno> 12101 12602 ; p10: , p8 : ; <subkind=-2> , <various> 12102 12602 ; p12: ; <state> 12103 12602 ; p14: ; <next subproc> 12104 12602 ; p15: ; <last subproc> 12105 12602 ; p16: , p17: ; <buffers free> , <current bufno> 12106 12602 ; p18: ; <max bufsize=24> 12107 12602 ; p7 : , p6 : ; <net-id(subhost)> , <home reg(subhost)> 12108 12602 ; p5 : ; <host-id(subhost)> 12109 12602 ; p13: ; <current message> 12110 12602 ; p19: ; start(mess buf table): 12111 12602 ; p19+v3<1 ; top(mess buf table). 12112 12602 12112 12602 s100=p19+v3<1 ; start of output buffer: 12113 12602 s101=20 ; size of output buffer 12114 12602 s102=s100+s101 ; start of input buffer: 12115 12602 s103=s101 ; size of input buffer 12116 12602 \f 12116 12602 12116 12602 12116 12602 12116 12602 h99: q0 ; deliver message 12117 12604 q1 ; transfer operation 12118 12606 q2 ; end transfer 12119 12608 q3 ; receive operation 12120 12610 q4 ; end receive 12121 12612 ; q5 ; initiate process 12122 12612 12122 12612 12122 12612 ; answers to create and remove operations are stored in a message buffer 12123 12612 ; (claims are borrowed from the subprocess). the message buffers are queued 12124 12612 ; up in the event queue until the answer can be transmitted. 12125 12612 ; format of the save-buffer: 12126 12612 s16=8 , s17=s16+1 ; -1 , header function<2 12127 12612 s18=s16+2 , s19=s18+1 ; dh.linkno , jh.linkno 12128 12612 s20=s18+2 , s21=s20+1 ; bufno , result 12129 12612 s22=s20+2 , s23=s22+1 ; unused , quality mask 12130 12612 s24=s22+2 , s25=s24+1 ; jh.net-id , jh.home-reg 12131 12612 s26=s24+2 ; jh.host-id 12132 12612 s28=s26+2 , s29=s28+1 ; state , unused 12133 12612 s30=s28+2 ; mode 12134 12612 12134 12612 12134 12612 r0: ; internal output buffer. 12135 12612 h. r1: 0 , r2: 0 ; mode , kind 12136 12614 r3: 0 , r4: 0 ; timeout , buffers 12137 12616 w. r5: 0 ; buffersize 12138 12618 r6: 0 , r.4 ; devicename 12139 12626 r7: 0 ; jh. linkno 12140 12628 r8: 0 ; jh. host-id 12141 12630 h. r9: 0 , r10: 0 ; jh. home-reg, jh. net-id 12142 12632 w. r11: 0 ; proc desc 12143 12634 12143 12634 r20: ; internal input buffer. 12144 12634 r22: 0 ; kind 12145 12636 r24: 0 ; max. buffers 12146 12638 r25: 0 ; max. buffersize 12147 12640 r26: 0 , r.4 ; devicename 12148 12648 r27: 0 ; jh. linkno 12149 12650 r28: 0 ; jh. host-id 12150 12652 h. r29: 0 , r30: 0 ; jh. home-reg, jh. net-id 12151 12654 w. r31: 0 ; process description 12152 12656 12152 12656 r32: 0 ; dh. linkno 12153 12658 \f 12153 12658 12153 12658 ; entry0. 12154 12658 12154 12658 b.i10,j10 w. 12155 12658 12155 12658 q0: ; entry0: 12156 12658 rl w2 b18 ; 12157 12660 rl w1 x2+6 ; proc:=sender(mess); 12158 12662 12158 12662 jl w3 g14 ; check user; 12159 12664 rl w1 b19 ; 12160 12666 c.p101 b.f1 w. ;*****test72***** 12161 12666 rs. w3 f0. ; 12162 12668 jl. w3 f4. ; 12163 12670 72 ; 12164 12672 f0: 0 ; 12165 12674 jl. f1. ; 12166 12676 al w0 x2+8 ; dump contents of mess buffer 12167 12678 al w1 x2+22 ; 12168 12680 jl. w3 f5. ; 12169 12682 f1: ; 12170 12682 e.z. ;*****test72***** 12171 12682 bz w0 x2+s1 ; 12172 12684 sn w0 9<2 ; if fmode=9<2 then 12173 12686 jl. j0. ; goto lookup-process; 12174 12688 jl. w3 n20. ; link operation; 12175 12690 jl. w3 n21. ; testready and link; 12176 12692 jl (b101) ; exit0: return to main; 12177 12694 12177 12694 ; lookup process. 12178 12694 ; lookup process delivers an answer equal to the one described in xxx and 12179 12694 ; an input data buffer of the format- 12180 12694 ; 12181 12694 ; +0 kind 12182 12694 ; +2 buffers 12183 12694 ; +4 max. buffersize 12184 12694 ; +6 name of the external process 12185 12694 ; +14 jh. linkno(=logical devicenumber) 12186 12694 ; +16 jh. host-id (=sender host) 12187 12694 ; +18 jh. home-reg, jh. net-id 12188 12694 ; +20 process description(external process) 12189 12694 12189 12694 j0: bz w3 x2+s10 ; lookup process: 12190 12696 rs. w3 r27. ; jh.linkno:=jh.linkno(mess); 12191 12698 ls w3 1 ; 12192 12700 wa w3 b4 ; 12193 12702 rl w3 x3 ; sub:=sub(rcno); 12194 12704 bl w0 x3+p10 ; 12195 12706 rs. w0 r22. ; kind:=subkind(sub); 12196 12708 sn w0 -2 ; 12197 12710 am v3<1-v0<1 ; if sub=subhost then 12198 12712 am v0<1 ; number of message entries:=v3 12199 12714 al w0 x3+p19 ; else 12200 12716 rs. w0 i0. ; number of message entries:=v1; 12201 12718 al w1 x3+p19 ; max. buffers:=buffers free(sub); 12202 12720 al w0 0 ; for entry=first message entry step 1 until last entry do 12203 12722 bl w2 x3+p16 ; if entry used(<>0) then 12204 12724 j1: se w0 (x1) ; number of buffers:=number of buffers+1; 12205 12726 al w2 x2+1 ; 12206 12728 al w1 x1+2 ; 12207 12730 se. w1 (i0.) ; 12208 12732 jl. j1. ; 12209 12734 rs. w2 r24. ; max. buffers:=number of buffers; 12210 12736 rl w0 x3+p18 ; 12211 12738 ls w0 -1 ; 12212 12740 wa w0 x3+p18 ; 12213 12742 rs. w0 r25. ; max. buffersize:=max. buffersize(sub)//2*3; 12214 12744 dl w1 x3+a11+2 ; 12215 12746 ds. w1 r26.+2 ; name of external process:=process name(sub); 12216 12748 dl w1 x3+a11+6 ; 12217 12750 ds. w1 r26.+6 ; 12218 12752 rl w1 b19 ; 12219 12754 rl w0 x1+p5 ; 12220 12756 rs. w0 r28. ; jh. host-id:=host-id(subhost); 12221 12758 rl w0 x1+p6 ; 12222 12760 hs. w0 r29. ; jh. home-reg:=home-reg(subhost); 12223 12762 rl w0 x1+p7 ; 12224 12764 hs. w0 r30. ; jh. net-id:=net-id(subhost); 12225 12766 rs. w3 r31. ; process description:=sub; 12226 12768 c.p101 b.f1 w. ;*****test73***** 12227 12768 rs. w3 f0. ; 12228 12770 jl. w3 f4. ; 12229 12772 73 ; 12230 12774 f0: 0 ; 12231 12776 jl. f1. ; 12232 12778 al. w0 r20. ; 12233 12780 al. w1 r32. ; dump contents of input area 12234 12782 jl. w3 f5. ; 12235 12784 f1: ; 12236 12784 e.z. ;*****test73***** 12237 12784 rl w2 b18 ; 12238 12786 jl. w3 n1. ; deliver data(mess); 12239 12788 am 0 ; sender stopped: impossible; 12240 12790 rl. w0 (r31.) ; if kind(sub)=remote subkind then 12241 12792 sn w0 p112 ; link desc:=1 12242 12794 am 2-1 ; else 12243 12796 al w0 1 ; link desc:=2; 12244 12798 ls w0 12 ; 12245 12800 rs w0 x2+s1 ; return value:=ok; 12246 12802 al w3 s31 ; 12247 12804 al w0 s31>1*3 ; bytes trf(mess), chars trf(mess):=std buffer size; 12248 12806 j4: ds w0 x2+s3 ; 12249 12808 jl. w3 n19. ; deliver: deliver answer(ok,mess); 12250 12810 jl (b101) ; exit: return to main; 12251 12812 12251 12812 i0: 0 ; 12252 12814 12252 12814 e. ; end of entry0; 12253 12814 \f 12253 12814 12253 12814 ; entry1. 12254 12814 12254 12814 b.i10,j10,m20 w. 12255 12814 12255 12814 q1: jl. w3 (i2.) ; entry1: find first unprocessed message; 12256 12816 c.p101 b.f1 w. ;****test74***** 12257 12816 rs. w3 f0. ; 12258 12818 jl. w3 f4. ; 12259 12820 74 ; 12260 12822 f0: 0 ; 12261 12824 jl. f1. ; 12262 12826 al w0 x2 ; dump contents of mess 12263 12828 sn w2 0 ; if no mess then 12264 12830 al w0 x2+24 ; no record 12265 12832 al w1 x2+22 ; 12266 12834 jl. w3 f5. ; 12267 12836 f1: ; 12268 12836 e.z. ;*****test74***** 12269 12836 sn w2 0 ; if message queue empty then 12270 12838 jl. (i1.) ; goto no block; 12271 12840 rs w2 x1+s40 ; current buffer:=mess; 12272 12842 bz w3 x2+s1 ; 12273 12844 ls w3 -2-1 ; function:=fmode>2; 12274 12846 jl. (x3+i0.) ; goto case function of 12275 12848 12275 12848 i0: m0 ; ( 0-3 : create, 12276 12850 m0 ; 4-7 : remove, 12277 12852 m2 ; 8-11 : release link, 12278 12854 m3 ; 12-15 : lookup, 12279 12856 m3 ; 16-19 : lookup reserve, 12280 12858 m3 ; 20-23 : cancel reservation, 12281 12860 m6 ; 24-27 : linkup remote, 12282 12862 m7 ; 28-31 : linkup local, 12283 12864 m2 ; 32-35 : lookup link, 12284 12866 -1 ; 36-39 : unused, 12285 12868 m10 ; 40-43 : operator output/input, 12286 12870 m10 ; 44-47 : operator output); 12287 12872 12287 12872 i1: u3 ; 12288 12874 i2: u12 ; 12289 12876 12289 12876 ; create. 12290 12876 ; remove. 12291 12876 ; 12292 12876 m0: rl w3 x1+a50 ; create: 12293 12878 bz w0 x2+s1 ; 12294 12880 ls w0 -2 ; 12295 12882 hs w0 x3+p61 ; function(trm):=function( m buff) 12296 12884 bz w0 x2+10 ; 12297 12886 hs w0 x3+p69 ; receiver linkno(trm):=devno( m buff) 12298 12888 bz w0 x2+11 ; 12299 12890 hs w0 x3+p78 ; sender linkno(trm):=rcno( m buff) 12300 12892 bz w0 x2+12 ; 12301 12894 hs w0 x3+p68 ; bufno(trm):=bufno( m buff) 12302 12896 bz w0 x2+13 ; 12303 12898 rs w0 x3+p64 ; size(trm):= result( m buff) 12304 12900 bz w0 x2+20 ; 12305 12902 c.p103-1 12306 12902 hs w0 x3+p62 ; state(rec):=state(mess); 12307 12904 rl w0 x2+22 ; status(rec):=mode(mess); 12308 12906 rs w0 x3+p63 ; 12309 12908 z. 12310 12908 c.-p103 12311 12908 hs w0 x3+p74 ; various(trm):= quality mask( m buff ) 12312 12908 z. 12313 12908 rl w0 x2+16 ; receiver net-id, home reg(trm):= 12314 12910 rs w0 x3+p301 ; answer add1( m buff) 12315 12912 rl w0 x2+18 ; receiver host-id(trm):= 12316 12914 rs w0 x3+p303 ; answer add2( m buff) 12317 12916 jl (b101) ; return to main 12318 12918 12318 12918 ; release. 12319 12918 ; lookup link. 12320 12918 ; 12321 12918 m2: jl. w3 n4. ; release: setup header1; 12322 12920 jl (b101) ; exit: return; 12323 12922 12323 12922 ; lookup. 12324 12922 ; lookup reserve. 12325 12922 ; cancel reservation. 12326 12922 ; 12327 12922 m3: jl. w3 n0. ; lookup: get data buffer(mess); 12328 12924 jl. m16. ; sender stopped: goto stopped sender; 12329 12926 ld w0 -100 ; ok: 12330 12928 ds. w0 r8. ; value(unused fields):=0; 12331 12930 rs. w0 r10. ; 12332 12932 jl. j0. ; goto deliver; 12333 12934 12333 12934 ; linkup remote. 12334 12934 ; 12335 12934 m6: jl. w3 n0. ; linkup remote: get data buffer(mess); 12336 12936 jl. m16. ; sender stopped: goto stopped sender; 12337 12938 al w0 0 ; ok: 12338 12940 rs. w0 r7. ; jh.linkno:=0; 12339 12942 se. w0 (r8.) ; if host-id=0 then 12340 12944 jl. j0. ; host-addr:=host-addr(subhost); 12341 12946 rl w0 x1+p5 ; 12342 12948 rs. w0 r8. ; 12343 12950 bz w0 x1+p6 ; 12344 12952 hs. w0 r9. ; 12345 12954 bz w0 x1+p7 ; 12346 12956 hs. w0 r10. ; 12347 12958 j0: jl. w3 n2. ; deliver: check and packin(data); 12348 12960 jl. m17. ; error: goto parameter error; 12349 12962 j1: jl. w3 n5. ; setup: setup header2; 12350 12964 c.p101 b.f1 w. ;*****test75***** 12351 12964 rs. w3 f0. ; 12352 12966 jl. w3 f4. ; 12353 12968 75 ; 12354 12970 f0: 0 ; 12355 12972 jl. f1. ; 12356 12974 al w0 x1+s100 ; dump output buffer 12357 12976 al w1 x1+s100+s101-2 12358 12978 jl. w3 f5. ; 12359 12980 f1: ; 12360 12980 e.z. ;*****test75***** 12361 12980 jl (b101) ; exit: return; 12362 12982 12362 12982 ; linkup local. 12363 12982 ; 12364 12982 m7: jl. w3 n0. ; linkup local: get data buffer(mess); 12365 12984 jl. m16. ; sender stopped: goto stopped sender; 12366 12986 rl w0 x1+p5 ; ok: 12367 12988 rs. w0 r8. ; host-addr:=host-addr(subhost); 12368 12990 bz w0 x1+p6 ; 12369 12992 hs. w0 r9. ; 12370 12994 bz w0 x1+p7 ; 12371 12996 hs. w0 r10. ; 12372 12998 jl. w3 n2. ; check and packin(data); 12373 13000 jl. m17. ; error: goto parameter error; 12374 13002 rl. w2 r7. ; ok: 12375 13004 am (b18) ; 12376 13006 hs w2 +s10 ; jh.linkno(mess):=jh.linkno(data); 12377 13008 ls w2 1 ; 12378 13010 wa w2 b4 ; 12379 13012 rl w2 x2 ; sub:=proc(jh. linkno); 12380 13014 rs. w2 r11. ; process desc:=proc desc(sub); 12381 13016 rl w0 x2+a10 ; 12382 13018 rl w3 x2+a50 ; if kind(sub)<>free subprocess 12383 13020 sn w0 p113 ; or main(sub)<>0 then 12384 13022 se w3 0 ; goto no resources; 12385 13024 jl. m15. ; 12386 13026 jl. w3 n25. ; create subprocess(sub,host); 12387 13028 rl w2 b18 ; 12388 13030 rl. w3 r11. ; 12389 13032 rl w0 x2+s6 ; 12390 13034 rs w0 x3+p5 ; host-id(sub):=dh.host-id(mess); 12391 13036 bz w0 x2+s7 ; 12392 13038 hs w0 x3+p6 ; home-reg(sub):=dh.home-reg(mess); 12393 13040 bz w0 x2+s8 ; 12394 13042 hs w0 x3+p7 ; net-id(sub):=dh.net-id(mess); 12395 13044 jl. j1. ; goto setup; 12396 13046 12396 13046 ; operator output. 12397 13046 ; operator output-input. 12398 13046 ; 12399 13046 m10: ; operator output: 12400 13046 bz w0 x2+s1 ; 12401 13048 so w0 2.1 ; if function mode(mess)=1 then 12402 13050 jl. j2. ; 12403 13052 al w0 0 ; 12404 13054 hs w0 x2+s4 ; dh.linkno:=0; 12405 13056 hs w0 x2+s10 ; jh.linkno:=0; 12406 13058 j2: jl w3 g34 ; examine sender(mess); 12407 13060 jl. m16. ; sender stopped: goto stopped sender; 12408 13062 jl w3 g31 ; increase stopcount(sender); 12409 13064 jl. w3 n6. ; setup header3; 12410 13066 jl (b101) ; exit: return to main; 12411 13068 12411 13068 12411 13068 ; no resources in job host. 12412 13068 m15: ; no resources: 12413 13068 rl w2 b18 ; 12414 13070 jl. w3 n14. ; return noresources answer; 12415 13072 jl. q1. ; goto entry1; 12416 13074 12416 13074 12416 13074 ; stopped sender. 12417 13074 m16: rl w2 b18 ; stopped sender: 12418 13076 jl. w3 n12. ; return stopped answer; 12419 13078 jl. q1. ; goto entry1; 12420 13080 12420 13080 ; parameter error in data. 12421 13080 m17: al w0 3 ; parameter error: result:=3; 12422 13082 jl w3 g19 ; deliver result; 12423 13084 jl. q1. ; goto entry1; 12424 13086 12424 13086 e. ; end of entry1; 12425 13086 12425 13086 \f 12425 13086 12425 13086 12425 13086 12425 13086 ; entry2. 12426 13086 12426 13086 b.i5,j5 w. 12427 13086 12427 13086 q2: ; entry2: 12428 13086 al w0 0 ; 12429 13088 rs w0 x1+p13 ; current message:=0; 12430 13090 jl. w3 (i0.) ; test after header and data transmitted; 12431 13092 jl. j1. ; goto error; 12432 13094 ; ok: 12433 13094 rl w2 x1+s40 ; 12434 13096 bz w0 x2+s1 ; 12435 13098 so w0 2.10<2 ; if type(header)<>answer then 12436 13100 jl. j0. ; goto test next; 12437 13102 rs w2 b18 ; answer type: 12438 13104 am (x1+a50) ; 12439 13106 bz w0 +p60 ; 12440 13108 sn w0 p161 ; if int status=wait then 12441 13110 rs w2 x1+p13 ; current mess:=mess; 12442 13112 se w0 p161 ; else 12443 13114 jl. w3 n27. ; release buffer; 12444 13116 jl. j0. ; goto test next; 12445 13118 j1: rl w2 x1+s40 ; mess:= current mess; 12446 13120 am (x1+a50) ; 12447 13122 bz w0 +p61 ; function:= function(trm); 12448 13124 se w0 29 ; if function = linkup local then 12449 13126 jl. j0. ; begin 12450 13128 bz w2 x2+s10 ; jh.linkno:= jh.linkno(mess); 12451 13130 ls w2 1 ; 12452 13132 wa w2 b4 ; proc:= name table(jh.linkno); 12453 13134 rl w2 x2 ; 12454 13136 jl. w3 n24. ; remove subprocess(proc); 12455 13138 ; end; 12456 13138 j0: ; test next: 12457 13138 c.p101 b.f1 w. ;*****test76***** 12458 13138 rs. w3 f0. ; 12459 13140 jl. w3 f4. ; 12460 13142 76 ; 12461 13144 f0: 0 ; 12462 13146 jl. f1. ; 12463 13148 al w0 x1 ; 12464 13150 al w1 x1+p19+4 ; 12465 13152 jl. w3 f5. ; 12466 13154 f1: ; 12467 13154 e.z. ;*****test76***** 12468 13154 jl. w3 u12. ; find first unprocessed message; 12469 13156 se w2 0 ; if mess<>0 then 12470 13158 jl. w3 n21. ; testready and link; 12471 13160 jl (b101) ; exit2: return; 12472 13162 12472 13162 i0: u40 ; 12473 13164 12473 13164 e. 12474 13164 \f 12474 13164 12474 13164 12474 13164 12474 13164 ; entry3. 12475 13164 12475 13164 b.j10,i10 w. 12476 13164 q3: jl. w3 n9. ; entry3: get mess(bufno); 12477 13166 c.p101 b.f1 w. ;*****test80***** 12478 13166 rs. w3 f0. ; 12479 13168 jl. w3 f4. ; 12480 13170 80 ; 12481 13172 f0: 0 ; 12482 13174 jl. f1. ; 12483 13176 al w0 x2+0 ; dump contents of mess 12484 13178 al w1 x2+22 ; 12485 13180 jl. w3 f5. ; 12486 13182 f1: ; 12487 13182 e.z. ;*****test80***** 12488 13182 rl w3 x1+a50 ; 12489 13184 bz w0 x3+p99 ; 12490 13186 sn w0 3 ; if local function=reject then 12491 13188 jl. j3. ; goto rejected; 12492 13190 bz w0 x3+p81 ; 12493 13192 se w0 v23+1 ; if function<>operator output-input then 12494 13194 jl. j1. ; goto lookup; 12495 13196 jl. w3 (i0.) ; operator output-input: test and increase stopcount; 12496 13198 jl. j0. ; error: goto setskip; 12497 13200 rl w3 x1+a50 ; ok: 12498 13202 rl w0 x2+s2 ; first:=first(mess); 12499 13204 rs w0 x3+p85 ; 12500 13206 c.-p103 12501 13206 rl w0 x2+s3 ; last:=last(mess); 12502 13206 rs w0 x3+p86 ; count:=0; 12503 13206 z. 12504 13206 c.p103-1 12505 13206 al w0 0 ; 12506 13208 hs w0 x3+p92 ; address code:=sender area; 12507 13210 c. p103-1 12508 13210 rs w2 x3+p91 ; message buffer(main):= message 12509 13212 z. 12510 13212 z. 12511 13212 jl. j2. ; goto setok; 12512 13214 12512 13214 j3: ; rejected: 12513 13214 bz w0 x3+p81 ; 12514 13216 se w0 8 ; if operation(rec)=release link 12515 13218 sn w0 29 ; or operation(rec)=linkup local then 12516 13220 jl. w3 n22. ; check and remove; 12517 13222 jl. w3 n9. ; get mess buffer; 12518 13224 al w0 0 ; bytes tranferred:=0; 12519 13226 jl. w3 n11. ; return answer(bytes trf); 12520 13228 12520 13228 j0: al w0 p162 ; setskip: 12521 13230 am (x1+a50) ; internal status:=skip; 12522 13232 hs w0 +p80 ; 12523 13234 jl. w3 u12. ; find first message; 12524 13236 se w2 0 ; if mess<>0 then 12525 13238 jl. w3 n21. ; testready and link; 12526 13240 jl (b101) ; exit: return to main; 12527 13242 12527 13242 j1: ; lookup: 12528 13242 al w0 x1+s102 ; 12529 13244 rs w0 x3+p85 ; first:=first(std input buffer); 12530 13246 c.-p103 12531 13246 al w0 x1+s102+s101-2 12532 13246 rs w0 x3+p86 ; last:=first+size; 12533 13246 al w0 0 ; 12534 13246 hs w0 x3+p87 ; charcount:=0; 12535 13246 z. 12536 13246 c.p103-1 12537 13246 al w0 s101>1*3 ; 12538 13248 rs w0 x3+p86 ; size(rec):=std data size; 12539 13250 c. p103-1 12540 13250 al w0 0 ; messagebuf(main):= 0 (no buf.) 12541 13252 rs w0 x3+p91 ; 12542 13254 z. 12543 13254 al w0 8 ; 12544 13256 hs w0 x3+p92 ; address code:=dirty; 12545 13258 z. 12546 13258 12546 13258 j2: al w0 p160 ; setok: 12547 13260 am (x1+a50) ; 12548 13262 hs w0 +p80 ; internal status:=ok; 12549 13264 jl (b101) ; exit: return; 12550 13266 12550 13266 i0: u21 ; 12551 13268 12551 13268 e. ; end of entry3; 12552 13268 12552 13268 \f 12552 13268 12552 13268 ; entry 4. 12553 13268 12553 13268 b.i10,j20,m20 w. 12554 13268 12554 13268 q4: ; entry4: 12555 13268 am (x1+a50) ; 12556 13270 bz w3 +p81 ; 12557 13272 c.p101 b.f1 w. ;*****test84***** 12558 13272 rs. w3 f0. ; 12559 13274 jl. w3 f4. ; 12560 13276 84 ; 12561 13278 f0: 0 ; 12562 13280 jl. f1. ; 12563 13282 rl w3 x1+a50 ; 12564 13284 al w0 x3+p80 ; dump param area(rec) 12565 13286 al w1 x3+p90 ; 12566 13288 jl. w3 f5. ; 12567 13290 f1: ; 12568 13290 e.z. ;*****test84***** 12569 13290 ls w3 -1 ; 12570 13292 jl. (x3+i0.) ; goto case function of 12571 13294 12571 13294 i0: m0 ; ( 0-3 : create, 12572 13296 m1 ; 4-7 : remove, 12573 13298 m2 ; 8-11 : release, 12574 13300 m3 ; 12-15 : lookup, 12575 13302 m3 ; 16-19 : lookup reserve, 12576 13304 m3 ; 20-23 : cancel reservation, 12577 13306 m6 ; 24-27 : linkup remote, 12578 13308 m7 ; 28-31 : linkup local, 12579 13310 m3 ; 32-35 : lookup link, 12580 13312 -1 ; 36-39 : unused, 12581 13314 m10 ; 40-43 : operator output-input, 12582 13316 m11 ; 44-47 : operator output); 12583 13318 12583 13318 12583 13318 ; create. 12584 13318 ; 12585 13318 b.i10,j20 w. 12586 13318 m0: jl. w3 n26. ; create: get free buffer; 12587 13320 12587 13320 ; initialize selected message buffer 12588 13320 al w0 -1 ; 12589 13322 hs w0 x2+8 ; 12590 13324 al w0 v32<2 ; 12591 13326 hs w0 x2+9 ; mess(0):=-1,function; 12592 13328 c.-p103 12593 13328 bz w0 x3+p94 ; 12594 13328 hs w0 x2+15 ; quality mask:=various 12595 13328 z. 12596 13328 c.p103-1 12597 13328 bz w0 x3+p82 ; 12598 13330 hs w0 x2+20 ; state(mess):=state(rec); 12599 13332 rl w0 x3+p83 ; 12600 13334 rs w0 x2+22 ; mode(mess):=mode(rec); 12601 13336 z. 12602 13336 bz w0 x3+p98 ; 12603 13338 hs w0 x2+10 ; devno(m buf):=sender lnkno(rec) 12604 13340 rs. w0 i3. ; save dh.linkno 12605 13342 rl w0 x3+p321 ; answer add1(m buf):= 12606 13344 rs w0 x2+16 ; sender net-id, sender home reg 12607 13346 rl w0 x3+p323 ; answer add2(m buf):= 12608 13348 rs w0 x2+18 ; sender host-id 12609 13350 rs. w0 i4. ; save dh.id 12610 13352 ; find free subprocess description. start searching from high device numbers. 12611 13352 rl w3 b5 ; for dev:=dev(last dev in nametable) step -1 until 0 do 12612 13354 j6: al w3 x3-2 ; if kind(dev) = remote subkind then 12613 13356 ; begin 12614 13356 sl w3 (b4) ; if main(dev) = 0 or 12615 13358 jl. +4 ; (dh.linkno(dev) = dh.linkno(mess) and 12616 13360 jl. j13. ; dh.id(dev) = dh.id(mess) ) 12617 13362 rl w2 x3 ; then goto found; 12618 13364 al w0 p113 ; 12619 13366 se w0 (x2+a10) ; end; 12620 13368 jl. j6. ; not found: goto error 3; 12621 13370 al w0 0 ; 12622 13372 sn w0 (x2+a50) ; 12623 13374 jl. j5. ; 12624 13376 bz w0 x2+p11 ; 12625 13378 rl w1 x2+p5 ; 12626 13380 se. w0 (i3.) ; 12627 13382 jl. j6. ; 12628 13384 se. w1 (i4.) ; 12629 13386 jl. j6. ; 12630 13388 j5: ; found: 12631 13388 12631 13388 ; free process description found: w2=free sub found, w3=add of subproc nametable entry 12632 13388 ws w3 b4 ; rcno:=(entry(sub) - entry(first dev))/2 12633 13390 as w3 -1 ; 12634 13392 ds. w3 i1. ; save sub, rcno - jobhost linkno - 12635 13394 rl w1 b19 ; w1:= host proc 12636 13396 jl. w3 n25. ; create subprocess 12637 13398 12637 13398 ; transfer receive parameters to subprocess 12638 13398 rl w0 x1+a53 ; 12639 13400 rs w0 x2+a53 ; *users(sub):=users(subhost) 12640 13402 rl w1 x1+a50 ; w1:=main 12641 13404 rl w0 x1+p84 ; 12642 13406 al w3 0 ; 12643 13408 wd w0 g48 ; 12644 13410 ls w0 1 ; max buffersize(sub):=size(rec)/3*2; 12645 13412 rs w0 x2+p18 ; 12646 13414 bz w0 x1+p88 ; 12647 13416 hs w0 x2+p16 ; buffers free(sub):=bufno(rec) 12648 13418 al w0 8.377 ; 12649 13420 la w0 x1+p83 ; 12650 13422 hs w0 x2+p10 ; subkind(sub):=status(rec)(16:23); 12651 13424 bz w0 x1+p98 ; 12652 13426 hs w0 x2+p11 ; devno(sub):= sender linkno(rec) 12653 13428 rl. w0 i1. ; 12654 13430 hs w0 x2+p9 ; rcno(sub):= saved rcno 12655 13432 c.-p103 12656 13432 bz w0 x1+p94 ; 12657 13432 ls w0 -2 ; 12658 13432 z. 12659 13432 c.p103-1 12660 13432 bz w0 x1+p82 ; 12661 13434 ls w0 5 ; 12662 13436 rl w3 x1+p83 ; 12663 13438 ls w3 -8 ; 12664 13440 lo w0 6 ; data quality(sub):=state(mess)<5+mode(mess)(0:4); 12665 13442 z. 12666 13442 hs w0 x2+p8 ; *data quality(sub):=quality mask(rec) 12667 13444 bz w0 x1+p321 ; 12668 13446 hs w0 x2+p7 ; receiver net-id(sub):=sender net-id(rec) 12669 13448 bz w0 x1+p322 ; 12670 13450 hs w0 x2+p6 ; receiver home reg(sub):=sender home reg(rec) 12671 13452 al w0 0 ;***until net-id and home-reg are defined in the net: 12672 13454 rs w0 x2+p6 ; net-id, home-reg:=0,0; 12673 13456 rl w0 x1+p323 ; receiver host-id(sub):=sender host-id(rec) 12674 13458 rs w0 x2+p5 ; 12675 13460 c.p101 b.f1 w. ;*****test85***** 12676 13460 rs. w3 f0. ; 12677 13462 jl. w3 f4. ; 12678 13464 85 ; 12679 13466 f0: 0 ; 12680 13468 jl. f1. ; 12681 13470 al w0 x2-4 ; 12682 13472 al w1 x2+p19+14 ; 12683 13474 jl. w3 f5. ; 12684 13476 f1: ; 12685 13476 e.z. ;*****test85***** 12686 13476 rl w1 b19 ; w1:=host proc 12687 13478 rl w2 b18 ; w2:=mess buff 12688 13480 12688 13480 ; set rcno in message buffer; receive param internal status:= ok; 12689 13480 ; link message to event queue of host and if host not already in 12690 13480 ; main queue then link it first in main queue. finnally return 12691 13480 ; to main initialize return point. 12692 13480 rl w3 x1+a50 ; w3:=main 12693 13482 rl. w0 i1. ; 12694 13484 hs w0 x2+11 ; rcno(m buf):=saved rcno 12695 13486 al w0 p160 ; 12696 13488 hs w0 x3+p80 ; internal status(rec):=ok 12697 13490 c.p101 b.f1 w. ;*****test86***** 12698 13490 rs. w3 f0. ; 12699 13492 jl. w3 f4. ; 12700 13494 86 ; 12701 13496 f0: 0 ; 12702 13498 jl. f1. ; 12703 13500 rl. w3 f0. ; 12704 13502 al w0 x3+p80 ; 12705 13504 al w1 x3+p90 ; 12706 13506 jl. w3 f5. ; 12707 13508 f1: ; 12708 13508 e.z. ;*****test86***** 12709 13508 jl. w3 n20. ; link operation; 12710 13510 jl. w3 n21. ; testready and link; 12711 13512 rl. w2 i0. ; return: w2:=sub created 12712 13514 am (b101) ; 12713 13516 jl -2 ; return to main init 12714 13518 12714 13518 ; error. 12715 13518 j10: am 0-1 ; 12716 13520 j12: am 1-3 ; error1: 12717 13522 j13: am 3-5 ; error3: 12718 13524 j9 : al w0 5 ; error5: 12719 13526 c.p101 b.f1 w. ;*****test87***** 12720 13526 rs. w3 f0. ; 12721 13528 jl. w3 f4. ; 12722 13530 87 ; 12723 13532 f0: 0 ; 12724 13534 jl. f1. ; 12725 13536 rs w0 x3 ; 12726 13538 al w0 x3 ; 12727 13540 al w1 x3 ; 12728 13542 jl. w3 f5. ; 12729 13544 f1: ; 12730 13544 e.z. ;*****test87***** 12731 13544 rl w2 b18 ; 12732 13546 hs w0 x2+13 ; result(m buf):=case error _entry of ((0),1,3,5) 12733 13548 j14: rl w1 b19 ; out: 12734 13550 rl w3 x1+a50 ; 12735 13552 al w0 p160 ; 12736 13554 hs w0 x3+p80 ; internal state(main):=ok 12737 13556 jl. w3 n20. ; link operation; 12738 13558 jl. w3 n21. ; testready and link; 12739 13560 jl (b101) ; 12740 13562 12740 13562 12740 13562 ; remove. 12741 13562 ; 12742 13562 m1: jl. w3 n26. ; remove: get free mess buffer; 12743 13564 al w0 -1 ; 12744 13566 hs w0 x2+8 ; 12745 13568 al w0 v38<2 ; 12746 13570 hs w0 x2+9 ; mess(0):=-1,function; 12747 13572 bz w0 x3+p88 ; 12748 13574 hs w0 x2+12 ; bufno(m buf):= bufno(rec) 12749 13576 bz w0 x3+p98 ; 12750 13578 hs w0 x2+10 ; dh.linkno(mess):=dh.linkno(rec); 12751 13580 bz w0 x3+p89 ; 12752 13582 hs w0 x2+11 ; jh.linkno(mess):=jh.linkno(rec); 12753 13584 rl w0 x3+p321 ; answer add1(m buf):= 12754 13586 rs w0 x2+16 ; sender net-id,home reg(rec) 12755 13588 rl w0 x3+p323 ; answer add2(m buf):= 12756 13590 rs w0 x2+18 ; sender host-id 12757 13592 bz w2 x3+p89 ; 12758 13594 ls w2 1 ; 12759 13596 wa w2 b4 ; 12760 13598 rl w2 x2 ; sub:=proc(rcno) 12761 13600 rl w0 x2+a10 ; 12762 13602 la w0 g50 ; if kind(subproc kind)<>sub or 12763 13604 sn w0 p112 ; main(sub)<>main(host) 12764 13606 se w3 (x2+a50) ; 12765 13608 jl. j12. ; then goto error1 12766 13610 bz w0 x3+p98 ; 12767 13612 bs w0 x2+p11 ; 12768 13614 bz w3 x3+p89 ; 12769 13616 bs w3 x2+p9 ; 12770 13618 sn w0 0 ; if dh.linkno(sub)<>dh.linkno(mess) 12771 13620 se w3 0 ; or jh.linkno(sub)<>jh.linkno(mess) then 12772 13622 jl. j12. ; goto error1; 12773 13624 jl. w3 n24. ; remove subprocess(sub); 12774 13626 c.p101 b.f1 w. ;*****test88***** 12775 13626 rs. w3 f0. ; 12776 13628 jl. w3 f4. ; 12777 13630 88 ; 12778 13632 f0: 0 ; 12779 13634 jl. f1. ; 12780 13636 al w0 x2-4 ; 12781 13638 al w1 x2+p19+14 ; 12782 13640 jl. w3 f5. ; 12783 13642 f1: ; 12784 13642 e.z. ;*****test88***** 12785 13642 rl w2 b18 ; 12786 13644 jl. j14. ; goto out; 12787 13646 12787 13646 j20: al w0 p163 ; error4: 12788 13648 hs w0 x3+p80 ; internal status:=reject; 12789 13650 jl (b101) ; return(std); 12790 13652 12790 13652 ; parameters. 12791 13652 12791 13652 i0: 0 ; subproc 12792 13654 i1: 0 ; rcno 12793 13656 i2: 0 ; devno 12794 13658 i3: 0 ; save dev.host linkno 12795 13660 i4: 0 ; save dev.host id 12796 13662 12796 13662 e. 12797 13662 12797 13662 ; release. 12798 13662 ; 12799 13662 m2: jl. w3 n9. ; release: 12800 13664 am (x1+a50) ; 12801 13666 rl w0 +p84 ; 12802 13668 sn w0 0 ; if result=ok then 12803 13670 jl. j0. ; goto deliver; 12804 13672 rl w3 x2+s9 ; notok: 12805 13674 bz w0 x2+s11 ; if jh.host-id(mess)<>jh.host-id(subhost) 12806 13676 bs w0 x1+p7 ; or jh.net-id(mess)<>jh.net-id(subhost) then 12807 13678 sn w3 (x1+p5) ; goto deliver; 12808 13680 se w0 0 ; 12809 13682 jl. j0. ; 12810 13684 bz w3 x2+s10 ; 12811 13686 ls w3 1 ; 12812 13688 wa w3 b4 ; 12813 13690 rl w3 x3 ; 12814 13692 rl w0 x2+s6 ; sub:=proc(jh.linkno); 12815 13694 bz w1 x2+s8 ; if dh.host-id(mess)=dh.host-id(sub) 12816 13696 bs w1 x3+p7 ; and dh.net-id(mess)=dh.net-id(sub) 12817 13698 sn w0 (x3+p5) ; and dh.linkno(mess)=dh.linkno(sub) 12818 13700 se w1 0 ; and jh.linkno(mess)=jh.linkno(sub) then 12819 13702 jl. j10. ; remove subprocess(sub); 12820 13704 bz w0 x2+s4 ; 12821 13706 bs w0 x3+p11 ; 12822 13708 bz w1 x2+s10 ; 12823 13710 bs w1 x3+p9 ; 12824 13712 sn w0 0 ; 12825 13714 se w1 0 ; 12826 13716 jl. j10. ; 12827 13718 al w2 x3 ; 12828 13720 jl. w3 n24. ; 12829 13722 al w0 0 ; 12830 13724 rl w1 b19 ; 12831 13726 am (x1+a50) ; simulate ok-result; 12832 13728 rs w0 +p84 ; 12833 13730 j10: rl w1 b19 ; 12834 13732 rl w2 b18 ; 12835 13734 j0: al w0 0 ; deliver: 12836 13736 j1: jl. w3 n11. ; return answer; 12837 13738 c.p101 b.f1 w. ;*****test89***** 12838 13738 rs. w3 f0. ; 12839 13740 jl. w3 f4. ; 12840 13742 89 ; 12841 13744 f0: 0 ; 12842 13746 jl. f1. ; 12843 13748 rl w2 b18 ; 12844 13750 al w0 x2+0 ; 12845 13752 al w1 x2+22 ; dump contents of mess 12846 13754 jl. w3 f5. ; 12847 13756 f1: ; 12848 13756 e.z. ;*****test89***** 12849 13756 jl. w3 u12. ; find first message; 12850 13758 se w2 0 ; if mess<>0 then 12851 13760 jl. w3 n21. ; testready and link; 12852 13762 jl (b101) ; exit: return to main; 12853 13764 12853 13764 ; lookup. 12854 13764 ; lookup reserve. 12855 13764 ; cancel reservation. 12856 13764 ; lookup link. 12857 13764 ; 12858 13764 m3: jl. w3 n9. ; lookup: 12859 13766 jl. w3 n18. ; return operation; 12860 13768 jl. j1. ; goto release; 12861 13770 12861 13770 12861 13770 ; linkup remote. 12862 13770 ; 12863 13770 m6: jl. w3 n9. ; linkup remote: 12864 13772 jl. w3 n18. ; return operation; 12865 13774 al w3 8.77 ; 12866 13776 am (x1+a50) ; result:=size(rec); 12867 13778 la w3 +p84 ; 12868 13780 se w3 0 ; 12869 13782 sn w3 7 ; 12870 13784 sz ; if result<>0,7 then 12871 13786 jl. j1. ; goto release; 12872 13788 rl w3 x2+6 ; proc:=sender(mess); 12873 13790 sh w3 0 ; if proc<0 then 12874 13792 ac w3 x3 ; proc:=-proc; 12875 13794 rl w3 x3+a14 ; 12876 13796 am. (r31.) ; 12877 13798 lo w3 +a53 ; include caller as user 12878 13800 am. (r31.) ; 12879 13802 rs w3 +a53 ; users(sub):=sender(mess); 12880 13804 jl. j1. ; goto release; 12881 13806 12881 13806 ; linkup local. 12882 13806 ; 12883 13806 m7: jl. w3 n9. ; linkup local: 12884 13808 rl w3 x1+a50 ; 12885 13810 rl w0 x3+p84 ; result:=size(18:23); 12886 13812 bz w3 x3+p99 ; 12887 13814 se w3 3 ; if local function=reject 12888 13816 sz w0 8.77 ; or result<>0 then 12889 13818 jl. j2. ; goto clear subprocess; 12890 13820 jl. w3 n3. ; packout(buffer); 12891 13822 al w1 b4 ; 12892 13824 jl. +4 ; 12893 13826 j15: al w1 x1+2 ; for dev:= first dev. in name table step 2 12894 13828 sh w1 (b5) ; until last dev. in name table do 12895 13830 jl. +4 ; begin 12896 13832 jl. j16. ; 12897 13834 rl w2 x1 ; if kind(dev) = remote subkind or 12898 13836 rl w0 x2+a10 ; kind(dev) = local subkind then 12899 13838 sn w0 p112 ; begin 12900 13840 jl. j17. ; 12901 13842 se w0 p113 ; 12902 13844 jl. j16. ; 12903 13846 j17: am (b18) ; if dh.id(dev) = dh.id and 12904 13848 rl w0 +s6 ; dh.linkno(dev) = dh.linkno(mess) 12905 13850 se w0 (x2+p5) ; then remove subprocess(dev); 12906 13852 jl. j15. ; 12907 13854 bz w0 x2+p11 ; 12908 13856 se. w0 (r32.) ; 12909 13858 jl. j15. ; 12910 13860 jl. w3 n24. ; 12911 13862 jl. j15. ; end; 12912 13864 ; end; 12913 13864 ; initiate process description. 12914 13864 j16: rl w1 b19 ; 12915 13866 rl. w2 r31. ; 12916 13868 al w0 p112 ; 12917 13870 rs w0 x2+a10 ; kind(sub):=local kind; 12918 13872 am (b18) ; 12919 13874 rl w3 +6 ; proc:=sender(mess); 12920 13876 sh w3 0 ; 12921 13878 ac w3 x3 ; 12922 13880 rl w0 x3+a14 ; 12923 13882 j7: rl w3 x3+a34 ; users(sub):=proc+all ancestors(proc); 12924 13884 sn w3 0 ; 12925 13886 jl. j8. ; 12926 13888 lo w0 x3+a14 ; 12927 13890 jl. j7. ; 12928 13892 j8: rs w0 x2+a53 ; 12929 13894 rl. w0 r32. ; 12930 13896 hs w0 x2+p11 ; dh.linkno(sub):=dh.linkno; 12931 13898 rl. w0 r27. ; 12932 13900 hs w0 x2+p9 ; jh. linkno(sub):=jh.linkno; 12933 13902 rl. w0 r22. ; 12934 13904 hs w0 x2+p10 ; subkind(sub):=subkind; 12935 13906 rl. w0 r24. ; 12936 13908 hs w0 x2+p16 ; buffers free(sub):=max buffers; 12937 13910 rl. w0 r25. ; 12938 13912 al w3 0 ; 12939 13914 wd w0 g48 ; 12940 13916 ls w0 1 ; 12941 13918 rs w0 x2+p18 ; max bufsize(sub):=max.bufsize/3*2; 12942 13920 rl w2 b18 ; 12943 13922 jl. w3 n1. ; deliver data; 12944 13924 am 0-s31 ; error: size:=0; 12945 13926 al w0 s31 ; ok: size:=std buffer size; 12946 13928 rl. w3 r32. ; 12947 13930 hs w3 x2+s4 ; dh.linkno(mess):=dh.linkno; 12948 13932 jl. w3 n11. ; return answer; 12949 13934 c.p101 b.f1 w. ;*****test90***** 12950 13934 rs. w3 f0. ; 12951 13936 jl. w3 f4. ; 12952 13938 90 ; 12953 13940 f0: 0 ; 12954 13942 jl. f1. ; 12955 13944 rl w2 b18 ; 12956 13946 al w0 x2+0 ; dump contents of mess 12957 13948 al w1 x2+22 ; 12958 13950 jl. w3 f5. ; 12959 13952 f1: ; 12960 13952 e.z. ;*****test90***** 12961 13952 jl. w3 u12. ; find first message; 12962 13954 se w2 0 ; if mess<>0 then 12963 13956 jl. w3 n21. ; testready and link; 12964 13958 rl. w2 r31. ; init-exit: 12965 13960 am (b101) ; 12966 13962 jl -2 ; return to main(init); 12967 13964 12967 13964 ; clear subprocess description. 12968 13964 j2: am (b18) ; clear process: 12969 13966 bz w2 +s10 ; 12970 13968 ls w2 1 ; 12971 13970 wa w2 b4 ; sub:=word(jh.linkno(mess)<1+base(name table)); 12972 13972 rl w2 x2 ; 12973 13974 jl. w3 n24. ; remove subprocess(sub); 12974 13976 rl w2 b18 ; 12975 13978 jl. w3 n18. ; return operation; 12976 13980 jl. j1. ; goto deliver; 12977 13982 12977 13982 12977 13982 ; operator output-input. 12978 13982 ; 12979 13982 m10: jl. w3 n9. ; operator output-input: 12980 13984 am (x1+a50) ; 12981 13986 bz w0 +p81 ; 12982 13988 so w0 2.1 ; if no datas received then 12983 13990 jl. j0. ; goto deliver size0; 12984 13992 am (x1+a50) ; 12985 13994 bz w2 +p88 ; bufno:=bufno(rec); 12986 13996 jl. w3 u18. ; test and decrease stopcount; 12987 13998 c.-p103 12988 13998 rl w2 b18 ; 12989 13998 al w0 2 ; 12990 13998 wa w0 x2+s3 ; bytes trf:=last(mess)-first(mess)+2; 12991 13998 ws w0 x2+s2 ; 12992 13998 z. 12993 13998 c.p103-1 12994 13998 am (x1+a50) ; 12995 14000 rl w0 +p86 ; bytes trf:=size(data); 12996 14002 jl. w3 u15. ; convert bytes8 to bytes12; 12997 14004 z. 12998 14004 jl. j1. ; goto deliver size; 12999 14006 12999 14006 12999 14006 ; operator output. 13000 14006 ; 13001 14006 m11: jl. w3 n9. ; operator output: 13002 14008 jl. j0. ; goto deliver; 13003 14010 13003 14010 e. ; end of entry4. 13004 14010 13004 14010 13004 14010 c.p101 13005 14010 ; stepping stones. 13006 14010 jl. f4. ; 13007 14012 f4=k-2 13008 14012 jl. f5. ; 13009 14014 f5=k-2 13010 14014 jl. f6. ; 13011 14016 f6=k-2 13012 14016 z. 13013 14016 \f 13013 14016 13013 14016 13013 14016 ; subprocedures used in subhost. 13014 14016 13014 14016 ; get data. 13015 14016 ; copies a data area defined by current message buffer from sender to std driver 13016 14016 ; buffer. 13017 14016 ; deliver data. 13018 14016 ; transfers a datablock from std driver buffer to an internal process. the 13019 14016 ; buffer is defined in a message buffer. 13020 14016 ; call: return: 13021 14016 ; w0 destroyed 13022 14016 ; w1 subhost unchanged 13023 14016 ; w2 mess unchanged 13024 14016 ; w3 link destroyed 13025 14016 c.p103-1 13026 14016 b.i2 w. 13027 14016 n0: am i2 ; get data: 13028 14018 n1: al. w1 i1. ; deliver data: 13029 14020 jd 1<11+84 ; general copy; 13030 14022 rl w1 b19 ; 13031 14024 se w0 0 ; if result<>0 then 13032 14026 jl x3+0 ; return to link; 13033 14028 jl x3+2 ; exit: return to link+2; 13034 14030 13034 14030 13034 14030 i0: 2<1+0 ; function (addr pair<1+mode) 13035 14032 r0 ; first 13036 14034 r0+s31-2 ; last 13037 14036 0 ; relative 13038 14038 13038 14038 i1: 2<1+1 ; function (addr pair<1+mode) 13039 14040 r20 ; first 13040 14042 r20+s31-2 ; last 13041 14044 0 ; relative 13042 14046 13042 14046 i2=i0-i1 13043 14046 e. 13044 14046 z. 13045 14046 13045 14046 c.-p103 13046 14046 b.i5,j5 w. 13047 14046 n0: 13048 14046 ds. w3 i1. ; get data buffer: 13049 14046 al w0 s31 ; bytecount:=std size(data); 13050 14046 al. w1 r0. ; first addr:=start(int driver buffer); 13051 14046 wa w0 x2+10 ; 13052 14046 rl w2 x2+10 ; 13053 14046 j0: rl w3 x2 ; 13054 14046 rs w3 x1 ; 13055 14046 al w2 x2+2 ; 13056 14046 al w1 x1+2 ; 13057 14046 se w2 (0) ; 13058 14046 jl. j0. ; 13059 14046 rl w1 b19 ; 13060 14046 dl. w3 i1. ; 13061 14046 jl x3+2 ; 13062 14046 n1: 13063 14046 ds. w3 i1. ; get data buffer: 13064 14046 al w0 s31 ; bytecount:=std size(data); 13065 14046 al. w1 r20. ; first addr:=start(int driver buffer); 13066 14046 wa w0 x2+10 ; 13067 14046 rl w2 x2+10 ; 13068 14046 j0: rl w3 x1 ; 13069 14046 rs w3 x2 ; 13070 14046 al w2 x2+2 ; 13071 14046 al w1 x1+2 ; 13072 14046 se w2 (0) ; 13073 14046 jl. j0. ; 13074 14046 rl w1 b19 ; 13075 14046 dl. w3 i1. ; 13076 14046 jl x3+2 ; 13077 14046 i0: 0 ; 13078 14046 i1: 0 ; 13079 14046 e. 13080 14046 z. 13081 14046 13081 14046 ; check and packin(buffer). 13082 14046 ; checks the values of the different fields and packs the data buffer into the 13083 14046 ; std output buffer in the process description of hostprocess. return to link 13084 14046 ; in case of errors else to link+2. 13085 14046 ; call: return: 13086 14046 ; w0 destroyed 13087 14046 ; w1 subhost unchanged 13088 14046 ; w2 unchanged 13089 14046 ; w3 link destroyed 13090 14046 b.i10 w. 13091 14046 n2: rs. w3 i0. ; check and packin: 13092 14048 bl. w3 r1. ; 13093 14050 sl w3 -1 ; if mode<-1 13094 14052 sl w3 1<8 ; or mode>255 then 13095 14054 jl. (i0.) ; return to link; 13096 14056 bl. w0 r2. ; 13097 14058 sl w0 -1 ; if subkind<-1 13098 14060 sl w0 1<8 ; or subkind>255 then 13099 14062 jl. (i0.) ; return to link; 13100 14064 ls w0 16 ; 13101 14066 ld w0 8 ; 13102 14068 rl. w0 r3. ; 13103 14070 sz. w0 (i4.) ; if size(timeout) or size(buffers)>=8 bits then 13104 14072 jl. (i0.) ; return to link; 13105 14074 ls w0 4 ; 13106 14076 ld w0 8 ; word0(outarea):= 13107 14078 rs w3 x1+s100+0 ; mode<16+subkind<8+timeout; 13108 14080 ls w0 4 ; 13109 14082 rl. w3 r5. ; 13110 14084 sz. w3 (i7.) ; if size(buffer size)>=16 bits then 13111 14086 jl. (i0.) ; return to link; 13112 14088 lo w0 6 ; 13113 14090 rs w0 x1+s100+2 ; word1(outarea):=buffers<16+buffer size; 13114 14092 rl. w3 r7. ; 13115 14094 sz. w3 (i6.) ; if size(jh.linkno)>=10 bits then 13116 14096 jl. (i0.) ; return to link; 13117 14098 ls w3 8 ; 13118 14100 rl. w0 r10. ; 13119 14102 sz. w0 (i5.) ; if size(jh.net-id)>=8 bits then 13120 14104 jl. (i0.) ; return to link; 13121 14106 lo w0 6 ; 13122 14108 rs w0 x1+s100+8 ; word4(outarea):=jh.linkno<8+jh.net-id; 13123 14110 bz. w0 r9. ; 13124 14112 sz. w0 (i5.) ; if size(jh.home-reg)>=8 bits then 13125 14114 jl. (i0.) ; return to link; 13126 14116 ls w0 16 ; 13127 14118 rl. w3 r8. ; 13128 14120 sz. w3 (i7.) ; if size(jh.host-id)>=16 bits then 13129 14122 jl. (i0.) ; return to link; 13130 14124 lo w0 6 ; word5(outarea):= 13131 14126 rs w0 x1+s100+10; jh.home-reg<16+jh.host-id; 13132 14128 dl. w0 r6.+2 ; 13133 14130 ds w0 x1+s100+14; 13134 14132 dl. w0 r6.+6 ; word6-9(outarea):= 13135 14134 ds w0 x1+s100+18; devicename; 13136 14136 am. (i0.) ; 13137 14138 jl +2 ; exit: return to link+2; 13138 14140 13138 14140 i0: 0 ; saved link 13139 14142 i4: 8.7400 7400 ; 13140 14144 i5: 8.7777 7400 ; 13141 14146 i6: 8.7777 6000 ; 13142 14148 i7: 8.7760 0000 ; 13143 14150 13143 14150 e. 13144 14150 13144 14150 ; packout. 13145 14150 ; packs out a buffer from the std. input buffer in the process description of 13146 14150 ; the subhost process. the parameters are delivered in the std. driver input 13147 14150 ; buffer. 13148 14150 ; call: return: 13149 14150 ; w0 destroyed 13150 14150 ; w1 subhost unchanged 13151 14150 ; w2 destroyed 13152 14150 ; w3 link destroyed 13153 14150 b.i5 w. 13154 14150 n3: rs. w3 i0. ; packout: 13155 14152 rl w0 x1+s102+0 ; 13156 14154 ls w0 -8 ; 13157 14156 la. w0 i4. ; 13158 14158 rs. w0 r22. ; subkind:=word0(8:15); 13159 14160 rl w0 x1+s102+2 ; 13160 14162 al w3 0 ; 13161 14164 ld w0 8 ; 13162 14166 rs. w3 r24. ; max. buffers:=word1(0:7); 13163 14168 ls w0 -8 ; 13164 14170 rs. w0 r25. ; max. buffersize:=word1(8:23); 13165 14172 rl w0 x1+s102+4 ; 13166 14174 ls w0 -8 ; 13167 14176 la. w0 i5. ; 13168 14178 rs. w0 r32. ; dh.linkno:=word2(6:15); 13169 14180 rl w3 x1+s102+8 ; 13170 14182 ld w0 -8 ; 13171 14184 la. w3 i5. ; 13172 14186 rs. w3 r27. ; jh.linkno:=word4(6:15); 13173 14188 ld w0 -16 ; 13174 14190 hs. w0 r30. ; jh.net-id:=word4(16:23); 13175 14192 rl w0 x1+s102+10; 13176 14194 ld w0 8 ; 13177 14196 hs. w3 r29. ; jh.home-reg:=word5(0:7); 13178 14198 ls w0 -8 ; 13179 14200 rs. w0 r28. ; jh.host-id:=word5(8:23); 13180 14202 al w0 0 ;***jh.home-reg,jh.net-id:=0 13181 14204 rs. w0 r29. ;*** used until they are defined from the dev contr 13182 14206 dl w0 x1+s102+14; 13183 14208 ds. w0 r26.+2 ; 13184 14210 dl w0 x1+s102+18; 13185 14212 ds. w0 r26.+6 ; devicename:=word6-9(inarea); 13186 14214 rl. w3 r27. ; 13187 14216 ls w3 1 ; 13188 14218 wa w3 b4 ; 13189 14220 rl w3 x3 ; 13190 14222 bz w0 x1+p7 ; 13191 14224 bs. w0 r30. ; 13192 14226 rl w2 x1+p5 ; 13193 14228 sn w0 0 ; if jobhost(data)=jobhost(subhost) then 13194 14230 se. w2 (r28.) ; proc desc:=word(jh.linkno<1+base(nametable)); 13195 14232 al w3 0 ; else 13196 14234 rs. w3 r31. ; proc desc:=0; 13197 14236 jl. (i0.) ; exit: return; 13198 14238 13198 14238 i0: 0 ; saved link 13199 14240 i4: 8.0000 0377 ; 13200 14242 i5: 8.0000 1777 ; 13201 14244 13201 14244 e. 13202 14244 13202 14244 ; setup header1. 13203 14244 ; this procedure sets up the header transmission parameters according to 13204 14244 ; the format used of release link and lookup link. 13205 14244 ; 13206 14244 ; setup header2. 13207 14244 ; this procedure sets up the header transmission parameters according to 13208 14244 ; the format used of lookup, lookup reserve, cancel reservation, linkup 13209 14244 ; remote and linkup local. 13210 14244 ; 13211 14244 ; setup header3. 13212 14244 ; this procedure sets up the header transmission parameters according to 13213 14244 ; the format used of operaor output and operator output-input. 13214 14244 ; 13215 14244 ; call: return: 13216 14244 ; w0 destroyed 13217 14244 ; w1 subhost unchanged 13218 14244 ; w2 mess unchanged 13219 14244 ; w3 link destroyed 13220 14244 b.i5,j5 w. 13221 14244 n4: ds. w3 i1. ; setup header1: 13222 14246 rl w3 x1+a50 ; 13223 14248 rl w0 x2+s9 ; 13224 14250 rs w0 x3+p64 ; size:=jh.host-id; 13225 14252 bz w0 x2+s11 ; 13226 14254 rs w0 x3+p63 ; mode:=jh.net-id; 13227 14256 jl. j0. ; goto common part; 13228 14258 13228 14258 n5: ds. w3 i1. ; setup header2: 13229 14260 rl w3 x1+a50 ; 13230 14262 al w0 x1+s100 ; 13231 14264 rs w0 x3+p65 ; first:=first(outarea); 13232 14266 c.-p103 13233 14266 al w0 x1+s100+s101-2; 13234 14266 rs w0 x3+p66 ; last:=last(outarea); 13235 14266 al w0 s101>1*3 ;****midlertidigt 13236 14266 rs w0 x3+p64 ;***** 13237 14266 z. 13238 14266 c.p103-1 13239 14266 al w0 s101>1*3 ; 13240 14268 rs w0 x3+p66 ; size:=std buffer size; 13241 14270 al w0 8 ; 13242 14272 hs w0 x3+p72 ; address code:=dirty; 13243 14274 z. 13244 14274 jl. j0. ; goto common2; 13245 14276 13245 14276 n6: rs. w3 i1. ; setup header3: 13246 14278 al w0 x2+1 ; 13247 14280 rs. w0 i0. ; saved mess:=uneven mess; 13248 14282 rl w0 x2+s2 ; 13249 14284 am (x1+a50) ; 13250 14286 rs w0 +p65 ; first(trm):=first(mess); 13251 14288 al w0 2 ; 13252 14290 wa w0 x2+s3 ; 13253 14292 ws w0 x2+s2 ; size12:=last(mess)+2-first(mess); 13254 14294 jl. w3 u14. ; convert size12 to size8; 13255 14296 rl w3 x1+a50 ; 13256 14298 rs w0 x3+p64 ; size(trm):=size8; 13257 14300 c.-p103 13258 14300 rl w0 x2+s3 ; 13259 14300 z. 13260 14300 rs w0 x3+p66 ; last(trm):=last(mess); 13261 14302 ; charcount(trm):=0; 13262 14302 c.p103-1 13263 14302 c. p103-1 13264 14302 al w0 0 ; 13265 14304 hs w0 x3+p72 ; address code(main):= sender area 13266 14306 al w0 x2 ; 13267 14308 rs w0 x3+p71 ; message buffer(main):= message 13268 14310 z. 13269 14310 z. 13270 14310 j0: bz w0 x2+s4 ; common1: 13271 14312 hs w0 x3+p69 ; rec.linkno:=dh.linkno(mess); 13272 14314 bz w0 x2+s10 ; 13273 14316 hs w0 x3+p78 ; sender linkno(trm):=jh.linkno(mess); 13274 14318 13274 14318 j1: bz w0 x2+s1 ; common2: 13275 14320 ls w0 -2 ; internal status:=ok, function(trm):=header function(mess); 13276 14322 hs w0 x3+p61 ; state(trm):=0; 13277 14324 al w0 2.11 ; 13278 14326 la w0 x2+s1 ; 13279 14328 rs w0 x3+p63 ; mode(trm):=function mode(mess); 13280 14330 bz w0 x2+s8 ; 13281 14332 hs w0 x3+p301 ; receiver net-id(trm):=dh.net-id(mess); 13282 14334 bz w0 x2+s7 ; 13283 14336 hs w0 x3+p302 ; receiver home-reg(trm):=dh.home-reg(mess); 13284 14338 rl w0 x2+s6 ; 13285 14340 rs w0 x3+p303 ; receiver host-id(trm):=dh.host-id(mess); 13286 14342 rl. w2 i0. ; mess:=saved mess; 13287 14344 jl. w3 n10. ; get next free message entry(host); 13288 14346 la w2 g50 ; mess:=even mess; 13289 14348 am (x1+a50) ; 13290 14350 hs w3 +p68 ; bufno(trm):=current bufno; 13291 14352 jl. (i1.) ; exit: return; 13292 14354 13292 14354 i0: 0 ; saved mess 13293 14356 i1: 0 ; saved link 13294 14358 13294 14358 e. 13295 14358 13295 14358 ; get mess buffer. 13296 14358 ; 13297 14358 ; call: return: 13298 14358 ; w0 unchanged 13299 14358 ; w1 subhost unchanged 13300 14358 ; w2 mess buffer(bufno) 13301 14358 ; w3 link unchanged 13302 14358 b. w. 13303 14358 n9: am (x1+a50) ; get mess: 13304 14360 bz w2 +p88 ; 13305 14362 am x2 ; 13306 14364 am x2 ; 13307 14366 rl w2 x1+p19 ; mess:=even message addr(bufno); 13308 14368 la w2 g50 ; 13309 14370 rs w2 b18 ; current buffer:=mess; 13310 14372 jl x3 ; return; 13311 14374 e. 13312 14374 13312 14374 ; get next free message entry. 13313 14374 ; finds the next free mess entry in the message table, and inserts the value in 13314 14374 ; current bufno. mess - even or uneven - is inserted in the mess entry. 13315 14374 ; call: return: 13316 14374 ; w0 destroyed 13317 14374 ; w1 subhost unchanged 13318 14374 ; w2 mess unchanged 13319 14374 ; w3 link bufferno 13320 14374 b.i0,j1 w. 13321 14374 n10: rs. w3 i0. ; get next free mess entry: 13322 14376 al w0 -1 ; 13323 14378 ba w0 x1+p16 ; buffers free:=buffers free-1; 13324 14380 hs w0 x1+p16 ; 13325 14382 al w0 0 ; 13326 14384 bz w3 x1+p17 ; 13327 14386 al w3 x3-1 ; 13328 14388 j0: al w3 x3+1 ; 13329 14390 sl w3 v3 ; 13330 14392 al w3 0 ; 13331 14394 am x3 ; 13332 14396 am x3 ; 13333 14398 se w0 (x1+p19) ; 13334 14400 jl. j0. ; 13335 14402 j1: hs w3 x1+p17 ; 13336 14404 am x3 ; 13337 14406 am x3 ; 13338 14408 rs w2 x1+p19 ; insert message in mess entry; 13339 14410 ac w0 (x2+4) ; 13340 14412 sl w0 0 ; if receiver(mess) > 0 then 13341 14414 jl. (i0.) ; begin 13342 14416 rs w0 x2+4 ; receiver(mess):= -receiver(mess); 13343 14418 al w0 -1 ; 13344 14420 am (b1) ; bufclaim(current internal):= 13345 14422 ba w0 +a19 ; bufclaim(current internal) - 1; 13346 14424 am (b1) ; c. driverproc(receiver) 13347 14426 hs w0 +a19 ; end; 13348 14428 jl. (i0.) ; exit: return; 13349 14430 i0: 0 ; saved link 13350 14432 13350 14432 e. 13351 14432 13351 14432 ; return answer. 13352 14432 ; 13353 14432 ; call: return: 13354 14432 ; w0 bytes trf destroyed 13355 14432 ; w1 subhost unchanged 13356 14432 ; w2 mess destroyed 13357 14432 ; w3 link destroyed 13358 14432 b.i0 w. 13359 14432 n11: rs. w3 i0. ; return answer: 13360 14434 rl w3 0 ; 13361 14436 ls w0 -1 ; 13362 14438 wa w0 6 ; bytes trf(mess):=bytes trf; 13363 14440 ds w0 x2+s3 ; chars trf(mess):=bytes trf*3/2; 13364 14442 am (x1+a50) ; 13365 14444 rl w3 +p84 ; 13366 14446 ld w0 -8 ; 13367 14448 ls w3 2 ; 13368 14450 ld w0 2 ; 13369 14452 ls w3 6 ; 13370 14454 ld w0 6 ; 13371 14456 am (x1+a50) ; 13372 14458 zl w0 +p99 ; 13373 14460 sn w0 3 ; if local function=reject then 13374 14462 al w3 8 ; function result:=8; 13375 14464 rs w3 x2+s0 ; return value:=device status<16+linkno descriptor<12+function result; 13376 14466 rl. w0 r32. ; 13377 14468 hs w0 x2+s4 ; dh.linkno(mess):=dh.linkno; 13378 14470 jl. w3 u11. ; clear message entry; 13379 14472 jl. w3 n19. ; deliver answer(ok,buf); 13380 14474 am (x1+a50) 13381 14476 bz w0 +p81 13382 14478 sn w0 42 13383 14480 am p162-p160 13384 14482 al w0 p160 ; 13385 14484 am (x1+a50) ; 13386 14486 hs w0 +p80 ; internal status(rec):=ok; 13387 14488 jl. (i0.) ; exit: return; 13388 14490 i0: 0 ; saved link; 13389 14492 e. 13390 14492 13390 14492 ; return stopped answer. 13391 14492 ; 13392 14492 ; call: return: 13393 14492 ; w0 destroyed 13394 14492 ; w1 subhost unchanged 13395 14492 ; w2 mess destroyed 13396 14492 ; w3 link destroyed 13397 14492 b.i0 w. 13398 14492 n12: am -1+2 ; return stopped answer: 13399 14494 n13: am -2-3 ; return relected answer: 13400 14496 n14: al w0 3 ; return noresources answer: 13401 14498 rs. w3 i0. ; 13402 14500 rs w0 x2+s1 ; function result:=-1; 13403 14502 ld w0 -100 ; 13404 14504 ds w0 x2+s3 ; bytes, chars trf:=0,0; 13405 14506 jl. w3 n19. ; deliver answer(ok,mess); 13406 14508 jl. (i0.) ; exit: return; 13407 14510 i0: 0 ; saved link 13408 14512 e. 13409 14512 13409 14512 13409 14512 ; return operation. 13410 14512 ; call: return: 13411 14512 ; w0 size 13412 14512 ; w1 subhost unchanged 13413 14512 ; w2 message 13414 14512 ; w3 link destroyed 13415 14512 b.i4,j4 w. 13416 14512 n18: rs. w3 i0. ; return operation: 13417 14514 rl w3 x1+a50 ; 13418 14516 bz w0 x3+p81 ; 13419 14518 bz w3 x3+p99 ; 13420 14520 sz w0 2.1 ; if no datas 13421 14522 sn w3 3 ; or local function=reject then 13422 14524 jl. j0. ; size:=0; 13423 14526 jl. w3 n3. ; else 13424 14528 rl w2 b18 ; packout; 13425 14530 jl. w3 n1. ; deliver data; 13426 14532 j0: am 0-s31 ; sender stopped: size:=0; 13427 14534 al w0 s31 ; ok: size:=std size; 13428 14536 jl. (i0.) ; exit: return; 13429 14538 i0: 0 ; save link 13430 14540 e. 13431 14540 13431 14540 13431 14540 ; deliver answer(ok,mess). 13432 14540 ; 13433 14540 ; call: return: 13434 14540 ; w0 destroyed 13435 14540 ; w1 subhost unchanged 13436 14540 ; w2 mess destroyed 13437 14540 ; w3 link destroyed 13438 14540 b.i0 w. 13439 14540 n19: ; deliver answer: 13440 14540 c.-p103 13441 14540 al w0 1 ; 13442 14540 rs w0 x2+4 ; result(mess):=0k; 13443 14540 jl d15 ; deliver answer(mess); 13444 14540 z. 13445 14540 c.p103-1 13446 14540 rs. w3 i0. ; 13447 14542 dl w0 x2+10 ; 13448 14544 ds w0 g21 ; 13449 14546 dl w0 x2+14 ; transfer 5 words from buffer to 13450 14548 ds w0 g23 ; answer area to possibilitate 13451 14550 rl w0 x2+16 ; the use of g18 13452 14552 rs w0 g24 ; 13453 14554 jl w3 g18 ; deliver result(ok); 13454 14556 jl. (i0.) ; exit: return; 13455 14558 i0: 0 ; saved link 13456 14560 z. 13457 14560 e. 13458 14560 13458 14560 13458 14560 ; link operation. 13459 14560 ; 13460 14560 ; call: return: 13461 14560 ; w0 destroyed 13462 14560 ; w1 proc unchanged 13463 14560 ; w2 mess destroyed 13464 14560 ; w3 link destroyed 13465 14560 b.i0 w. 13466 14560 n20: rs. w3 i0. ; link operation: 13467 14562 al w1 x1+a54 ; 13468 14564 jl w3 d6 ; 13469 14566 al w1 x1-a54 ; 13470 14568 jl. (i0.) ; exit: return; 13471 14570 i0: 0 ; saved link 13472 14572 e. 13473 14572 13473 14572 13473 14572 ; testready and link. 13474 14572 ; if the subhost is in mainproc queue, the state of the subhost is ready 13475 14572 ; and there is free buffers the subhost is linked in the main process queue. 13476 14572 ; call: return: 13477 14572 ; w0 destroyed 13478 14572 ; w1 proc destroyed 13479 14572 ; w2 destroyed 13480 14572 ; w3 link destroyed 13481 14572 b.i1 w. 13482 14572 n21: rl w0 x1+p14 ; testmore: 13483 14574 se w0 x1+p14 ; if proc already in mainproc queue then 13484 14576 jl x3 ; return to link; 13485 14578 rl w0 x1+p12 ; 13486 14580 se w0 0 ; if state(proc)<>0 then 13487 14582 jl x3 ; return to link; 13488 14584 bl w0 x1+p16 ; 13489 14586 sh w0 0 ; if buffers free=<0 then 13490 14588 jl x3 ; return to link; 13491 14590 al w2 x1+p14 ; 13492 14592 rl w1 x1+a50 ; main:=main(host); 13493 14594 rl w1 x1+p14 ; queue head:=last(mainproc queue); 13494 14596 jl d6 ; link(head,elem); 13495 14598 ; exit: return to link; 13496 14598 e. 13497 14598 13497 14598 13497 14598 ; procedure check and remove. 13498 14598 ; call: return: 13499 14598 ; w0 destroyed 13500 14598 ; w1 subhost unchanged 13501 14598 ; w2 destroyed 13502 14598 ; w3 link destroyed 13503 14598 b.i4 w. 13504 14598 n22: rs. w3 i0. ; check and remove: 13505 14600 rl w3 x1+a50 ; 13506 14602 bz w2 x3+p89 ; 13507 14604 ls w2 1 ; 13508 14606 wa w2 b4 ; sub:=proc(jh.linkno(rec)); 13509 14608 rl w2 x2 ; 13510 14610 rl w0 x3+p323 ; 13511 14612 sn w0 (x2+p5) ; if main(sub)=main 13512 14614 se w3 (x2+a50) ; and dh.host-id(sub)=dh.host-id(rec) 13513 14616 jl. (i0.) ; and dh.net-id(sub)=dh.net-id(rec) then 13514 14618 bz w0 x3+p321 ; remove subprocess(sub); 13515 14620 bs w0 x2+p7 ; 13516 14622 sn w0 0 ; 13517 14624 jl. w3 n24. ; 13518 14626 jl. (i0.) ; exit: return; 13519 14628 i0: 0 ; 13520 14630 e. 13521 14630 13521 14630 13521 14630 ; remove subprocess(sub). 13522 14630 ; removes a subprocess by returning all messages in the event queue 13523 14630 ; with dummy answer and clearing the mainproc addr. 13524 14630 ; call: return: 13525 14630 ; w0 destroyed 13526 14630 ; w1 unchanged 13527 14630 ; w2 subproc unchanged 13528 14630 ; w3 link destroyed 13529 14630 b.i2 w. 13530 14630 v102: ; 13531 14630 n24: rs. w3 i0. ; remove subprocess: save link; 13532 14632 rs. w1 i1. ; save w1; 13533 14634 c.p101 b.f1 w. ;*****test94***** 13534 14634 rs. w3 f0. ; 13535 14636 jl. w3 f4. ; 13536 14638 94 ; 13537 14640 f0: 0 ; 13538 14642 jl. f1. ; 13539 14644 rs w2 x3 ; 13540 14646 al w0 x3 ; 13541 14648 al w1 x3 ; 13542 14650 jl. w3 f5. ; 13543 14652 f1: ; 13544 14652 e.z. ;*****test94***** 13545 14652 jl. w3 (i2.) ; clean subproc(sub); 13546 14654 al w0 p113 ; 13547 14656 rs w0 x2+a10 ; kind(sub):=remote subproc kind; 13548 14658 ld w0 -100 ; 13549 14660 ds w0 x2+a11+2 ; name(subproc):=0; 13550 14662 ds w0 x2+a11+6 ; 13551 14664 rs w0 x2+a50 ; mainproc(subproc):=0; 13552 14666 ds w0 x2+a53 ; reserver, users :=0; 13553 14668 rl. w1 i1. ; restore w1; 13554 14670 jl. (i0.) ; exit: return; 13555 14672 i0: 0 ; saved link 13556 14674 i1: 0 ; saved w1 13557 14676 i2: v101 ; address of clean subprocess 13558 14678 e. 13559 14678 13559 14678 13559 14678 ; create subprocess. 13560 14678 ; call: return: 13561 14678 ; w0 destroyed 13562 14678 ; w1 hostproc unchanged 13563 14678 ; w2 subproc unchanged 13564 14678 ; w3 link destroyed 13565 14678 b.i10,j10 w. 13566 14678 n25: rs. w3 i0. ; create subprocess: save link; 13567 14680 ds. w2 i2. ; save host, sub; 13568 14682 al w0 0 ; insert zeroes in 13569 14684 al w3 x2+2 ; process description; 13570 14686 j0: rs w0 x3 ; 13571 14688 al w3 x3+2 ; 13572 14690 sh w3 x2+a79-2 ; 13573 14692 jl. j0. ; 13574 14694 dl w0 x1+a49 ; 13575 14696 ds w0 x2+a49 ; interval(sub):=interval(subhost); 13576 14698 rl w0 x1+a50 ; 13577 14700 rs w0 x2+a50 ; main(sub):=main(host); 13578 14702 al w0 x2+a54 ; initiate next,last event; 13579 14704 rs w0 x2+a54 ; 13580 14706 rs w0 x2+a55 ; 13581 14708 al w1 x2+p14 ; 13582 14710 rs w1 x2+p14 ; next, last subproc(sub):=sub; 13583 14712 rs w1 x2+p15 ; 13584 14714 ; generate name - <:sub<number>:> 13585 14714 j1: al w1 1 ; 13586 14716 wa. w1 i3. ; number:=number+1; 13587 14718 sl w1 1000 ; if number>=1000 then 13588 14720 al w1 0 ; number:=0; 13589 14722 rs. w1 i3. ; 13590 14724 ld w0 -100 ; 13591 14726 wd. w1 i4. ; w1:=cif1; 13592 14728 wd. w0 i5. ; w0:=cif2; 13593 14730 ls w1 8 ; w3:=cif3; 13594 14732 wa w1 0 ; number:= 13595 14734 ls w1 8 ; cif1<16+cif2<8+cif3 13596 14736 wa w1 6 ; + 48<16+ 48<8+ 48; 13597 14738 lo. w1 i7. ; name:=<:sub:>,number; 13598 14740 ; check name. if name already exists as device name then 13599 14740 ; generate a new name. 13600 14740 rl w2 b4 ; entry:=first entry in name table; 13601 14742 al w2 x2-2 ; 13602 14744 j2: rl. w0 i6. ; next: 13603 14746 j3: al w2 x2+2 ; entry:=next entry; 13604 14748 sl w2 (b5) ; if entry>=first area entry then 13605 14750 jl. j4. ; goto insert parameters; 13606 14752 rl w3 x2 ; proc:=proc(entry); 13607 14754 sn w0 (x3+a11) ; if name(proc)<><:sub:> then 13608 14756 se w1 (x3+a11+2) ; goto next; 13609 14758 jl. j3. ; 13610 14760 al w0 0 ; else 13611 14762 sn w0 (x3+a11+4) ; goto generate name; 13612 14764 se w0 (x3+a11+6) ; 13613 14766 jl. j2. ; 13614 14768 jl. j1. ; 13615 14770 ; the name is checked to be ok. 13616 14770 ; insert name and parameters. 13617 14770 j4: rl. w2 i2. ; insert name: 13618 14772 ds w1 x2+a11+2 ; insert number in name; 13619 14774 rl. w1 i1. ; restore host; 13620 14776 jl. (i0.) ; exit: return; 13621 14778 i0: 0 ; last number generated 13622 14780 i1: 0 ; saved host 13623 14782 i2: 0 ; saved sub 13624 14784 i3: 0 ; last number generated 13625 14786 i4: 100 ; 13626 14788 i5: 10 ; 13627 14790 i6: <:sub:> ; 13628 14792 i7: <:000:> ; 13629 14794 e. 13630 14794 13630 14794 13630 14794 ; get free buffer. 13631 14794 ; takes the first free buffer from the message buffer pool and inserts 13632 14794 ; it in the event queue. 13633 14794 ; call: return: 13634 14794 ; w0 destroyed 13635 14794 ; w1 host unchanged 13636 14794 ; w2 buffer 13637 14794 ; w3 link main 13638 14794 b.i0 w. 13639 14794 n26: rs. w3 i0. ; get free buffer: 13640 14796 rl w2 b8 ; buffer:=first free in pool; 13641 14798 rs w2 b18 ; 13642 14800 jl w3 d5 ; remove buffer; 13643 14802 rs w1 x2+4 ; receiver(buf):=subhost; 13644 14804 rs w1 x2+6 ; sender(buf):=subhost; 13645 14806 ld w0 -100 ; 13646 14808 ds w0 x2+10 ; 13647 14810 ds w0 x2+14 ; insert zeroes in mess buffer; 13648 14812 ds w0 x2+18 ; 13649 14814 ds w0 x2+22 ; 13650 14816 rl w3 x1+a50 ; 13651 14818 jl. (i0.) ; exit: return; 13652 14820 i0: 0 ; link 13653 14822 e. 13654 14822 13654 14822 13654 14822 ; release buffer. 13655 14822 ; removes a buffer from the event queue and inserts it in the 13656 14822 ; pool of free buffers. 13657 14822 ; call: return: 13658 14822 ; w0 unchanged 13659 14822 ; w1 unchanged 13660 14822 ; w2 buffer destroyed 13661 14822 ; w3 link destroyed 13662 14822 b.i1 w. 13663 14822 n27: rs. w3 i0. ; release buffer: 13664 14824 rs. w1 i1. ; save link, w1; 13665 14826 jl w3 d5 ; remove buffer; 13666 14828 al w1 b8 ; pool:=empty pool; 13667 14830 jl w3 d13 ; insert buffer in pool; 13668 14832 rl. w1 i1. ; restore w1; 13669 14834 jl. (i0.) ; exit: return; 13670 14836 i0: 0 ; saved link 13671 14838 i1: 0 ; saved w1 13672 14840 e. 13673 14840 13673 14840 e. ; end of subhost driver. 13674 14840 13674 14840 e. ; end of host- and subhost drivers. 13675 14840 13675 14840 c. p101 13676 14840 jl. f4. ; stepping stone testoutput 13677 14842 f4=k-2 13678 14842 jl. f5. ; stepping stone testoutput 13679 14844 f5=k-2 13680 14844 jl. f6. ; stepping stone testoutput 13681 14846 f6=k-2 13682 14846 z. ; end test 13683 14846 \f 13683 14846 13683 14846 m. 13683 14846 monfpasub - fpa subprocesses drivers 13684 14846 13684 14846 b.i30 w. 13685 14846 i0=82 03 30, i1=12 00 00 13686 14846 13686 14846 ; if newtime (i0,i1) > oldtime (a133,a134) then oldtime:=newtime; 13687 14846 c.i0-a133 13688 14846 c.i0-a133-1, a133=i0, a134=i1, z. 13689 14846 c.i1-a134-1, a134=i1, z. 13690 14846 z. 13691 14846 13691 14846 i10=i0, i20=i1 13692 14846 13692 14846 i15=i10/100000 , i10=i10-i15*100000 , i25=i20/100000 , i20=i20-i25*100000 13693 14846 i14=i10/10000 , i10=i10-i14*10000 , i24=i20/10000 , i20=i20-i24*10000 13694 14846 i13=i10/1000 , i10=i10-i13*1000 , i23=i20/1000 , i20=i20-i23*1000 13695 14846 i12=i10/100 , i10=i10-i12*100 , i22=i20/100 , i20=i20-i22*100 13696 14846 i11=i10/10 , i10=i10-i11*10 , i21=i20/10 , i20=i20-i21*10 13697 14846 13697 14846 i2: <: date :> 13698 14870 (:i15+48:)<16+(:i14+48:)<8+46 13699 14872 (:i13+48:)<16+(:i12+48:)<8+46 13700 14874 (:i11+48:)<16+(:i10+48:)<8+32 13701 14876 13701 14876 (:i25+48:)<16+(:i24+48:)<8+46 13702 14878 (:i23+48:)<16+(:i22+48:)<8+46 13703 14880 (:i21+48:)<16+(:i20+48:)<8+ 0 13704 14882 13704 14882 i3: al. w0 i2. ; write date: 13705 14884 rs w0 x2+0 ; first free:=start(text); 13706 14886 al w2 0 ; 13707 14888 jl x3 ; return to slang(status ok); 13708 14890 13708 14890 jl. i3. ; 13709 14892 e. 13710 14892 j. 13710 14846 date 82.03.30 12.00.00 13711 14846 13711 14846 ; 13712 14846 ; fpa-subproc 13713 14846 ; 13714 14846 \f 13714 14846 13714 14846 ; fpa-subproc common procedures 13715 14846 ; eli, 7.8.1975 13716 14846 13716 14846 ; start of subprocess-code 13717 14846 ;************************* 13718 14846 w. 13719 14846 13719 14846 ; table of reservations 13720 14846 ; 13721 14846 ; the following table is used to determine, whether the sender of a 13722 14846 ; message has to have reserved the device or just has to be a user 13723 14846 ; of the device. 13724 14846 ; 13725 14846 ; the table holds one word for each kind of subprocesses. bit(i)=1 13726 14846 ; means, that reservation is needed for operation=i, otherwise just user is needed. 13727 14846 13727 14846 a0= 1<23 13728 14846 13728 14846 u0= 0 ; first subkind used 13729 14846 13729 14846 u1=k-u0 13730 14846 13730 14846 ; subkind 0: general sequential device 13731 14846 0 ; 13732 14848 13732 14848 ; subkind 2: not used 13733 14848 0 ; 13734 14850 13734 14850 ; subkind 4: area processes 13735 14850 ; note, that areaprocesses are checked at normal entry 13736 14850 0 ; 13737 14852 13737 14852 ; subkind 6: disc 13738 14852 a0>5 ; output needs reservation 13739 14854 13739 14854 ; subkind 8: typewriter 13740 14854 0 ; reservation never needed 13741 14856 13741 14856 ; subkind 10: paper tape reader 13742 14856 -1 ; reservation always needed 13743 14858 13743 14858 ; subkind 12: paper tape punch 13744 14858 -1 ; reservation always needed 13745 14860 13745 14860 ; subkind 14: line printer 13746 14860 -1 ; reservation always needed 13747 14862 13747 14862 ; subkind 16: card reader 13748 14862 -1 ; reservation always needed 13749 14864 13749 14864 ; subkind 18: magnetic tape 13750 14864 -1 ; reservation always needed 13751 14866 13751 14866 ; subkind 20: plotter 13752 14866 -1 ; reservation always needed 13753 14868 13753 14868 ; subkind 22: discette 13754 14868 -1 ; reservation always needed 13755 14870 ; subkind 24: character level i/o 13756 14870 -1 ; reservation always needed 13757 14872 \f 13757 14872 ; fpa-subproc common procedures 13758 14872 ; eli, 16.2.1976 13759 14872 13759 14872 ;u2: ; see after u21. 13760 14872 13760 14872 ;u3: ; - - - 13761 14872 \f 13761 14872 ; fpa-subproc common procedures 13762 14872 ; eli, 4.11.1975 13763 14872 13763 14872 ; procedure check and link operation 13764 14872 ; 13765 14872 ; checks, that the sender of the message is a user or reserver of the 13766 14872 ; device as defined by the reservation table of the corresponding 13767 14872 ; subkind. 13768 14872 ; 13769 14872 ; for messages with operation code 3 or 5 (input or output) the field 13770 14872 ; <updated first> in the message is initialized according to <first address> in 13771 14872 ; the message and the addresses in the message are checked. 13772 14872 ; 13773 14872 ; if user or reservation is ok, the message is linked to the queue of 13774 14872 ; the subproc. 13775 14872 ; 13776 14872 ; note: contrary to the standard procedure 'link operation' return is 13777 14872 ; always made, even if other messages exist in the queue. 13778 14872 ; 13779 14872 ; call return 13780 14872 ; w0 undefined 13781 14872 ; w1 subproc unchanged 13782 14872 ; w2 undefined 13783 14872 ; w3 link undefined 13784 14872 13784 14872 b. i10, j10 13785 14872 w. 13786 14872 13786 14872 u4: rs. w3 j0. ; check and link operation: save link 13787 14874 bl w3 x1+p10 ; w3:= subkind(subproc) 13788 14876 rl. w0 x3+u1. ; w0:= reservation mask(subkind) 13789 14878 rl w2 b18 ; w2:= current message 13790 14880 bz w3 x2+8 ; w3:= operation(message) 13791 14882 rl w1 x2+6 ; w1:= sender(message) 13792 14884 ls w0 x3 ; if reservation mask(bit(operation))=1 then 13793 14886 sh w0 -1 ; 13794 14888 am g15-g14 ; check reservation else 13795 14890 jl w3 g14 ; check user 13796 14892 13796 14892 ; access rights ok 13797 14892 ; w1 still holds address of internal process 13798 14892 13798 14892 bz w0 x2+8 ; if operation(mes)= input or output then 13799 14894 se w0 3 ; 13800 14896 sn w0 5 ; begin 13801 14898 jl. i0. ; 13802 14900 jl. i1. ; 13803 14902 i0: dl w0 x2+12 ; make first and last address in message even 13804 14904 la w0 g50 ; 13805 14906 la w3 g50 ; 13806 14908 sl w3 (x1+a17) ; if first(mes)<first(internal) or 13807 14910 sl w0 (x1+a18) ; last(mes)>=top(internal) or 13808 14912 jl g5 ; 13809 14914 sh w0 x3-2 ; first(mes)>last(mes) then 13810 14916 jl g5 ; goto result 3 13811 14918 ds w0 x2+12 ; 13812 14920 rs w3 x2+22 ; updated first(mes):= first(mes) 13813 14922 ; end 13814 14922 13814 14922 ; link message to message queue of subproc 13815 14922 13815 14922 i1: am (b19) ; w1:= addr. of message queue of subproc 13816 14924 al w1 +a54 ; 13817 14926 jl w3 d6 ; link(w1=head,w2=elem) 13818 14928 13818 14928 c.p101 b.f1 w. ;*****test48***** 13819 14928 rs. w3 f0. ;* 13820 14930 jl. w3 f4. ;* 13821 14932 48 ;* 13822 14934 f0: 0 ;* 13823 14936 jl. f1. ;* 13824 14938 al w0 x2 ;* 13825 14940 al w1 x2+22 ;* 13826 14942 jl. w3 f5. ;* 13827 14944 f1: ;* 13828 14944 e.z. ;*****test48***** 13829 14944 13829 14944 ; return 13830 14944 13830 14944 rl w1 b19 ; restore subproc address 13831 14946 jl. (j0.) ; 13832 14948 13832 14948 j0: 0 ; saved return 13833 14950 13833 14950 e. ; end of check and link operation 13834 14950 \f 13834 14950 ; fpa-subproc common procedures 13835 14950 ; eli, 11.2.1976 13836 14950 13836 14950 ; procedure get and deliver result 13837 14950 ; 13838 14950 ; returns an answer with a result as defined in the result-field of mainproc 13839 14950 ; in the following way: 13840 14950 ; 13841 14950 ; result4000:= result(mainproc)+1 13842 14950 ; deliver result(result4000) 13843 14950 ; 13844 14950 ; call return 13845 14950 ; w0 undefined 13846 14950 ; w1 subproc unchanged 13847 14950 ; w2 undefined 13848 14950 ; w3 link undefined 13849 14950 13849 14950 b. i10, j10 13850 14950 w. 13851 14950 13851 14950 u5: ; get and deliver result: 13852 14950 am (x1+a50) ; if function(mainproc(subproc))= 13853 14952 bz w0 +p81 ; answer message with data then 13854 14954 se w0 v55+(:1<0:); begin 13855 14956 jl. i0. ; copy answer content to words g20, g21, ... 13856 14958 rl w2 b18 ; w2:= message 13857 14960 rl w0 x2+8 ; copy status 13858 14962 rs w0 g20 ; 13859 14964 dl w1 x2+12 ; copy rest of answer 13860 14966 ds w1 g22 ; 13861 14968 dl w1 x2+16 ; 13862 14970 ds w1 g24 ; 13863 14972 rl w1 b19 ; end 13864 14974 i0: al w0 1 ; result4000:= result(mainproc(subproc))+1 13865 14976 am (x1+a50) ; 13866 14978 ba w0 +p82 ; 13867 14980 c.p101 b.f1 w. ;*****test49***** 13868 14980 rs. w3 f0. ; 13869 14982 jl. w3 f4. ; 13870 14984 49 ; 13871 14986 f0: 0 ; 13872 14988 jl. f1. ; 13873 14990 rl w1 g20 ; 13874 14992 ds w1 x3+2 ; 13875 14994 dl w1 g22 ; 13876 14996 ds w1 x3+6 ; 13877 14998 dl w1 g24 ; 13878 15000 ds w1 x3+10 ; 13879 15002 al w0 x3 ; 13880 15004 al w1 x3+10 ; 13881 15006 jl. w3 f5. ; 13882 15008 f1: ; 13883 15008 e.z. ;*****test49***** 13884 15008 jl g19 ; goto deliver result(result4000) 13885 15010 ; note: link unchanged. 13886 15010 13886 15010 e. ; end of get and deliver result 13887 15010 \f 13887 15010 ; fpa-subproc common procedures 13888 15010 ; eli, 7.8.1975 13889 15010 13889 15010 ; procedure prepare answer 13890 15010 ; 13891 15010 ; prepares the variables 13892 15010 ; g20 <status> 13893 15010 ; g21 <bytes> 13894 15010 ; g22 <chars> 13895 15010 ; for sending of an answer 13896 15010 ; 13897 15010 ; <status> is taken from the status-field of the mainproc 13898 15010 ; <bytes> and <chars> are calculated by the fields <first address> and 13899 15010 ; <updated first> in the message buffer and by the field <size> in 13900 15010 ; mainproc. 13901 15010 ; 13902 15010 ; the separate entry, prepare after stop, initially clears the <size> and <status> fields 13903 15010 ; of mainproc. it may be used, when the sender is stopped thus returning 13904 15010 ; an answer corresponding to the message only. 13905 15010 ; 13906 15010 ; call return 13907 15010 ; w0 undefined 13908 15010 ; w1 subproc unchanged 13909 15010 ; w2 message undefined 13910 15010 ; w3 link undefined 13911 15010 13911 15010 b. i10, j10 13912 15010 w. 13913 15010 13913 15010 u6: rl w1 x1+a50 ; prepare after stop: 13914 15012 al w0 0 ; result(mainproc):= status(mainproc):= 13915 15014 rs w0 x1+p83 ; size(mainproc):= 0 13916 15016 rs w0 x1+p84 ; 13917 15018 rl w1 b19 ; restore current subproc 13918 15020 u7: rs. w3 j0. ; prepare answer: 13919 15022 rl w3 x1+a50 ; main:= mainproc(subproc) 13920 15024 rl w0 x3+p83 ; 13921 15026 ls w0 12 ; 13922 15028 rs w0 g20 ; 13923 15030 rl w0 x2+22 ; chars:= 13924 15032 ws w0 x2+10 ; (updated first(mess)-first(mess))/2*3 13925 15034 rl w2 0 ; 13926 15036 ls w2 -1 ; 13927 15038 wa w2 0 ; 13928 15040 wa w2 x3+p84 ; chars:= chars+size(main) 13929 15042 rs w2 g22 ; save chars 13930 15044 al w1 0 ; 13931 15046 wd. w2 j1. ; bytes:= 13932 15048 se w1 0 ; if chars mod 3=0 then chars/3*2 else 13933 15050 al w2 x2+1 ; chars/3*2 +2 13934 15052 ls w2 1 ; 13935 15054 rs w2 g21 ; save bytes 13936 15056 13936 15056 ; restore w1 to subproc and return 13937 15056 13937 15056 rl w1 b19 ; w1:= current subproc 13938 15058 jl. (j0.) ; 13939 15060 13939 15060 j0: 0 ; saved return 13940 15062 j1: 3 ; division constant 13941 15064 13941 15064 e. ; end of prepare answer 13942 15064 \f 13942 15064 13942 15064 ; fpa-subproc common procedures 13943 15064 ; eli, 8.8.1975 13944 15064 13944 15064 ; procedure current message address 13945 15064 ; 13946 15064 ; returns the content of the message address entry corresponding 13947 15064 ; to current bufno. 13948 15064 ; 13949 15064 ; call return 13950 15064 ; w0 13951 15064 ; w1 subproc unchanged 13952 15064 ; w2 even entry content 13953 15064 ; w3 link unchanged 13954 15064 13954 15064 b. i10, j10 13955 15064 w. 13956 15064 13956 15064 u8: bl w2 x1+p17 ; current message entry: 13957 15066 am x2 ; 13958 15068 am x2 ; w2:= even mes.adr(current fubno*2) 13959 15070 rl w2 x1+p19 ; 13960 15072 la w2 g50 ; 13961 15074 jl x3 ; return 13962 15076 13962 15076 e. ; end of current message address 13963 15076 \f 13963 15076 ; fpa-subproc common procedures 13964 15076 ; eli, 8.8.1975 13965 15076 13965 15076 ; procedure current message entry 13966 15076 ; 13967 15076 ; returns the absolute address of the message address entry 13968 15076 ; corresponding to current bufno. 13969 15076 ; 13970 15076 ; call return 13971 15076 ; w0 13972 15076 ; w1 subproc unchanged 13973 15076 ; w2 absolute address of entry 13974 15076 ; w3 link unchanged 13975 15076 13975 15076 b.i10, j10 13976 15076 w. 13977 15076 13977 15076 u9: bl w2 x1+p17 ; current message entry: 13978 15078 am x2 ; 13979 15080 am x2 ; w2:= entry address(current bufno*2) 13980 15082 al w2 x1+p19 ; 13981 15084 jl x3 ; return 13982 15086 13982 15086 e. ; end of current message entry 13983 15086 \f 13983 15086 ; fpa-subproc common procedures 13984 15086 ; eli, 8.8.1975 13985 15086 13985 15086 ; procedure increase message entry 13986 15086 ; 13987 15086 ; increases the field current bufno to point to the next entry, 13988 15086 ; modulo the system constant max number of buffers. 13989 15086 ; 13990 15086 ; call return 13991 15086 ; w0 new bufferno 13992 15086 ; w1 subproc unchanged 13993 15086 ; w2 unchanged 13994 15086 ; w3 link unchanged 13995 15086 13995 15086 b. i10, j10 13996 15086 w. 13997 15086 13997 15086 u10: ; increase message entry: 13998 15086 bl w0 x1+p17 ; current bufno(subproc):= 13999 15088 ba. w0 1 ; current bufno(subproc) + 1 14000 15090 sl w0 v0 ; modulo max bufferno 14001 15092 al w0 0 ; 14002 15094 hs w0 x1+p17 ; 14003 15096 jl x3 ; return 14004 15098 14004 15098 e. 14005 15098 \f 14005 15098 ; fpa-subproc common procedures 14006 15098 ; eli, 8.8.1975 14007 15098 14007 15098 ; procedure clear message entry 14008 15098 ; 14009 15098 ; the entry in the message address table corresponding to bufno in 14010 15098 ; the receiver-field of mainproc is cleared. the field free bufs in 14011 15098 ; the subproc is increased by one. 14012 15098 ; 14013 15098 ; call return 14014 15098 ; w0 undefined 14015 15098 ; w1 subproc unchanged 14016 15098 ; w2 14017 15098 ; w3 link undefined 14018 15098 14018 15098 b. i10, j10 14019 15098 w. 14020 15098 14020 15098 u11: rs. w3 j0. ; clear message entry: save link 14021 15100 am (x1+a50) ; 14022 15102 bl w3 +p88 ; 14023 15104 al w0 0 ; 14024 15106 am x3 ; 14025 15108 am x3 ; message addr.(bufno(mainproc)*2):= 0 14026 15110 rs w0 x1+p19 ; 14027 15112 al w3 1 ; free bufs(subproc):= 14028 15114 ba w3 x1+p16 ; free bufs(subproc)+1 14029 15116 hs w3 x1+p16 ; 14030 15118 ; 14031 15118 jl. (j0.) ; return 14032 15120 14032 15120 j0: 0 ; saved link 14033 15122 14033 15122 e. ; end of clear message entry 14034 15122 \f 14034 15122 ; fpa-subproc common procedures 14035 15122 ; eli, 20.1.1976 14036 15122 14036 15122 ; procedure find first message 14037 15122 ; 14038 15122 ; if <current message> is nonzero, this value is returned. 14039 15122 ; otherwise the procedure continues through 14040 15122 ; <find first unprocessed message> 14041 15122 ; 14042 15122 ; call return 14043 15122 ; w0 undefined 14044 15122 ; w1 subproc unchanged 14045 15122 ; w2 message or 0 14046 15122 ; w3 link unchanged 14047 15122 14047 15122 b. i10, j10 14048 15122 w. 14049 15122 14049 15122 u12: ; find first message: 14050 15122 rl w2 x1+p13 ; if current message(subproc)<>0 then 14051 15124 se w2 0 ; goto check regret 14052 15126 jl. i3. ; 14053 15128 14053 15128 ; continue through u22 14054 15128 \f 14054 15128 14054 15128 ; fpa-subproc common procedures 14055 15128 ; eli, 12.8.1976 14056 15128 14056 15128 ; procedure find first unprocessed message 14057 15128 ; 14058 15128 ; scans the messagequeue of the calling subproc and returns 14059 15128 ; the address of the first unprocessed messagebuffer. 14060 15128 ; 0 is returned, if no buffer is found. 14061 15128 ; 14062 15128 ; if a message selected has been regretted (or the sender removed) 14063 15128 ; the message is returned and the queue scanned again. 14064 15128 ; 14065 15128 ; note: a processed messagebuffer has receiver(mes)<0. 14066 15128 ; the procedure does not change the receiver-field 14067 15128 ; of the message. 14068 15128 ; the monitor-word <current message> is set to the buffer found. 14069 15128 ; 14070 15128 ; call return 14071 15128 ; w0 undefined 14072 15128 ; w1 subproc unchanged 14073 15128 ; w2 message or 0 14074 15128 ; w3 link undefined 14075 15128 14075 15128 14075 15128 u22: rs. w3 j0. ; save link 14076 15130 14076 15130 ; scan message queue 14077 15130 14077 15130 i0: rl w2 x1+a54 ; scan: 14078 15132 jl. i2. ; mes:= first message(subproc) 14079 15134 i1: rl w0 x2+4 ; while receiver(mes)<0 14080 15136 sl w0 0 ; and mes<>last message(subproc) do 14081 15138 jl. i4. ; 14082 15140 rl w2 x2+0 ; mes:= next(mes) 14083 15142 i2: se w2 x1+a54 ; 14084 15144 jl. i1. ; 14085 15146 14085 15146 ; no message pending in queue 14086 15146 14086 15146 al w2 0 ; 14087 15148 jl. (j0.) ; return 14088 15150 14088 15150 ; w2 points to message. check regretted 14089 15150 14089 15150 i3: rs. w3 j0. ; check regret: save link 14090 15152 i4: rs w2 b18 ; current message(monitor):= mes 14091 15154 rl w0 x2+6 ; 14092 15156 sl w0 0 ; if sender(mes)>0 then 14093 15158 jl. (j0.) ; return 14094 15160 al w0 0 ; 14095 15162 sn w2 (x1+p13) ; 14096 15164 rs w0 x1+p13 ; 14097 15166 al. w3 i0. ; no operation(mes) 14098 15168 jl g26 ; goto scan 14099 15170 14099 15170 j0: 0 ; 14100 15172 14100 15172 e. ; end of find first message 14101 15172 \f 14101 15172 ; fpa-subproc common procedures 14102 15172 ; eli, 8.8.1975 14103 15172 14103 15172 ; procedure save and reserve message 14104 15172 ; 14105 15172 ; stores a message buffer address in the message entry described by 14106 15172 ; current entry and in the current message field of the subproc. 14107 15172 ; the message is reserved by setting the receiver-field negative, 14108 15172 ; if it is not already so. 14109 15172 ; 14110 15172 ; call return 14111 15172 ; w0 14112 15172 ; w1 subproc unchanged 14113 15172 ; w2 message unchanged 14114 15172 ; w3 link undefined 14115 15172 14115 15172 b. i10, j10 14116 15172 w. 14117 15172 14117 15172 u13: ds. w3 j1. ; save and reserve message: save message and link 14118 15174 jl. w3 u9. ; w2:= current entry address 14119 15176 rx. w2 j0. ; save entry:= w2 14120 15178 rs. w2 (j0.) ; mess addr(entry):= message 14121 15180 rs w2 x1+p13 ; current message(subproc):= message 14122 15182 al w3 -1 ; free buffers(subproc):= 14123 15184 ba w3 x1+p16 ; free buffers(subproc)-1 14124 15186 hs w3 x1+p16 ; 14125 15188 ac w3 (x2+4) ; if receiver(mes)>0 then 14126 15190 sl w3 0 ; begin 14127 15192 jl. (j1.) ; 14128 15194 rs w3 x2+4 ; receiver(mes):= -receiver(mes) 14129 15196 am (b1) ; decrease(buffer claim(current internal proc)) 14130 15198 bz w3 +a19 ; 14131 15200 al w3 x3-1 ; 14132 15202 am (b1) ; 14133 15204 hs w3 +a19 ; end 14134 15206 ; 14135 15206 jl. (j1.) ; return 14136 15208 14136 15208 j0: 0 ; saved message 14137 15210 j1: 0 ; saved link 14138 15212 14138 15212 e. ; end of save and reserve message 14139 15212 \f 14139 15212 ; fpa-subproc common procedures 14140 15212 ; eli, 8.8.1975 14141 15212 14141 15212 ; procedure convert to 8-bit 14142 15212 ; 14143 15212 ; converts the number in w0, representing a number of 12-bit characters, 14144 15212 ; to the corresponding number of 8-bit characters 14145 15212 ; 14146 15212 ; call return 14147 15212 ; w0 number in 12-bits 14148 15212 ; number in 8-bits 14149 15212 ; w1 14150 15212 ; w2 14151 15212 ; w3 link undefined 14152 15212 14152 15212 b. i10, j10 14153 15212 w. 14154 15212 14154 15212 u14: rs. w3 j0. ; convert to 8-bit: save link 14155 15214 rl w3 0 ; size8:= 14156 15216 ls w3 -1 ; size12*3/2 14157 15218 wa w0 6 ; 14158 15220 jl. (j0.) ; return 14159 15222 14159 15222 j0: 0 ; saved link 14160 15224 14160 15224 e. ; end of convert to 8-bit 14161 15224 \f 14161 15224 ; fpa-subproc common procedures 14162 15224 ; eli, 15.1.1976 14163 15224 14163 15224 ; procedure convert to 12-bit 14164 15224 ; 14165 15224 ; converts the number in w0, representing a number of 8-bit characters, 14166 15224 ; to the corresponding number of 12-bit characters. 14167 15224 ; 14168 15224 ; call return 14169 15224 ; w0 number in 8-bit 14170 15224 ; number in 12-bit 14171 15224 ; w1 14172 15224 ; w2 14173 15224 ; w3 link undefined 14174 15224 14174 15224 b. i10, j10 14175 15224 w. 14176 15224 14176 15224 u15: rs. w3 j0. ; convert to 12-bit: save link 14177 15226 al w3 0 ; prepare division 14178 15228 wd. w0 j1. ; size12:= size8/3*2 14179 15230 se w3 0 ; if size8 mod 3<>0 then 14180 15232 ba. w0 1 ; size12:= size12+2 14181 15234 ls w0 1 ; 14182 15236 jl. (j0.) ; return 14183 15238 14183 15238 j0: 0 ; saved link 14184 15240 j1: 3 ; 8-bit characters per word 14185 15242 14185 15242 e. ; end of convert to 12-bit 14186 15242 \f 14186 15242 14186 15242 ; fpa-subproc common procedures 14187 15242 ; eli, 19.8.1975 14188 15242 14188 15242 ; procedure prepare addresses 14189 15242 ; 14190 15242 ; initializes the fields <first addr>, <data size> and <size> 14191 15242 ; in the mainproc sender table corresponding to the next part 14192 15242 ; of a message to be transmitted. 14193 15242 ; if a block of size 0 is encountered, the data-bit in the func- 14194 15242 ; tion-field is cleared. 14195 15242 ; 14196 15242 ; call return 14197 15242 ; w0 undefined 14198 15242 ; w1 subproc unchanged 14199 15242 ; w2 message unchanged 14200 15242 ; w3 link undefined 14201 15242 14201 15242 b. i10, j10 14202 15242 w. 14203 15242 14203 15242 u16: rs. w3 j0. ; prepare addresses: save link 14204 15244 al w3 2 ; saved size:= 14205 15246 wa w3 x2+12 ; last addr(mes)-updated first(mes) 14206 15248 ws w3 x2+22 ; +2 14207 15250 rl w0 6 ; size:= saved size 14208 15252 14208 15252 ; test for maximum size exceeded 14209 15252 14209 15252 sl w0 (x1+p18) ; if size>maxsize(subproc) then 14210 15254 rl w0 x1+p18 ; size:= maxsize(subproc) 14211 15256 sl. w0 (j1.) ; if size>maxsize(datanet) then 14212 15258 rl. w0 j1. ; size:= maxsize(datanet) 14213 15260 se w0 (6) ; if size= saved size then 14214 15262 jl. i0. ; comment: last block of message 14215 15264 al w3 0 ; current message(subproc):= 0 14216 15266 rs w3 x1+p13 ; 14217 15268 14217 15268 ; set first, last and size in mainproc 14218 15268 14218 15268 i0: rl w1 x1+a50 ; main:= mainproc(subproc) 14219 15270 rl w3 x2+22 ; first:= first(main):= updated first(mes) 14220 15272 rs w3 x1+p65 ; 14221 15274 se w0 0 ; if size=0 then 14222 15276 jl. i1. ; 14223 15278 bl w3 x1+p61 ; databit(function(main)):= 0 14224 15280 la w3 g50 ; 14225 15282 hs w3 x1+p61 ; 14226 15284 i1: jl. w3 u14. ; header size(main):= data size(main):= 14227 15286 rs w0 x1+p64 ; convert to 8-bit(size) 14228 15288 rs w0 x1+p66 ; 14229 15290 rs w0 x2+20 ; expected size(mes):= size(main) 14230 15292 14230 15292 ; return 14231 15292 14231 15292 rl w1 b19 ; restore subproc addr 14232 15294 jl. (j0.) ; 14233 15296 14233 15296 j0: 0 ; saved link 14234 15298 j1: v2 ; datanet max buffer size 14235 15300 14235 15300 e. ; end of prepare addresses 14236 15300 \f 14236 15300 14236 15300 ; fpa-subproc common procedures 14237 15300 ; eli, 17.9.1975 14238 15300 14238 15300 ; procedure test and decrease stop count 14239 15300 ; 14240 15300 ; upon entry w2 holds a number of an entry in the message table. 14241 15300 ; if the entry points to a message and the stop count of 14242 15300 ; the sender of the corresponding message has been increased (i.e. 14243 15300 ; message entry is odd) then the stop count of the sender is decreased 14244 15300 ; and the flag in the message table cleared. 14245 15300 ; 14246 15300 ; call return 14247 15300 ; w0 undefined 14248 15300 ; w1 subproc unchanged 14249 15300 ; w2 messageno undefined 14250 15300 ; w3 link undefined 14251 15300 14251 15300 b. i10, j10 14252 15300 w. 14253 15300 u18: ; test and decrease stop count: 14254 15300 am x2 ; mes:= message table(messageno*2) 14255 15302 am x2 ; 14256 15304 al w2 x1+p19 ; 14257 15306 rl w0 x2 ; 14258 15308 sl w0 (b8+4) ; if not possible messageaddress or 14259 15310 so w0 2.1 ; not stop count increased(mes) then 14260 15312 jl x3 ; return 14261 15314 rs. w3 j0. ; save return 14262 15316 la w0 g50 ; stop count increased(mes):= false 14263 15318 rs w0 x2 ; 14264 15320 rx w0 b18 ; current message(monitor):= mes 14265 15322 rs. w0 j1. ; save old current message(monitor) 14266 15324 jl w3 g32 ; decrease stop count 14267 15326 rl w1 b19 ; restore subproc 14268 15328 rl. w2 j1. ; restore current message(monitor) 14269 15330 rs w2 b18 ; 14270 15332 14270 15332 jl. (j0.) ; return 14271 15334 14271 15334 j0: 0 ; saved link 14272 15336 j1: 0 ; saved current message(monitor) 14273 15338 14273 15338 e. ; end of test and decrease stop count 14274 15338 \f 14274 15338 ; fpa-subproc common procedures 14275 15338 ; eli, 17.9.1975 14276 15338 14276 15338 ; procedure clear subproc message queue 14277 15338 ; 14278 15338 ; called from hostproc, when a transmission line error is detected or a 14279 15338 ; master clear received. 14280 15338 ; 14281 15338 ; all messages in the queue of the subproc (processed as well as unprocessed) 14282 15338 ; are returned with result=4 (receiver malfunction) 14283 15338 ; 14284 15338 ; call return 14285 15338 ; w0 undefined 14286 15338 ; w1 subproc unchanged 14287 15338 ; w2 undefined 14288 15338 ; w3 link undefined 14289 15338 14289 15338 b. i10, j10 14290 15338 w. 14291 15338 u19: ; clear subproc message queue: 14292 15338 v100= u19 ; 14293 15338 rs. w3 j0. ; save link 14294 15340 rl w2 b18 ; 14295 15342 rs. w2 j2. ; save curr mess; 14296 15344 al w2 0 ; for w2:= all entries in message table do 14297 15346 c.p101 b.f1 w. ;******test50***** 14298 15346 rs. w3 f0. ; 14299 15348 jl. w3 f4. ; 14300 15350 50 ; 14301 15352 f0: 0 ; 14302 15354 jl. f1. ; 14303 15356 al w0 x1 ; testrecord:= 14304 15358 al w1 x1+p19+16 ; process description; 14305 15360 jl. w3 f5. ; 14306 15362 f1: ; 14307 15362 e.z. ;*****test50***** 14308 15362 i2: rs. w2 j1. ; 14309 15364 jl. w3 u18. ; test and decrease stopcount(w2) 14310 15366 rl. w2 j1. ; 14311 15368 al w0 0 ; 14312 15370 am x2 ; if message table(w2)<>0 then 14313 15372 am x2 ; begin 14314 15374 rx w0 x1+p19 ; 14315 15376 sn w0 0 ; 14316 15378 jl. i3. ; 14317 15380 al w3 1 ; free bufs(subproc):= free bufs(subproc)+1 14318 15382 ba w3 x1+p16 ; 14319 15384 hs w3 x1+p16 ; 14320 15386 i3: al w2 x2+1 ; 14321 15388 rl w0 x1+a10 ; if kind(sub)=hostproc kind then 14322 15390 sn w0 p111 ; max entries:=v3 14323 15392 am v3-v0 ; max entries:=v0; 14324 15394 se w2 v0 ; 14325 15396 jl. i2. ; end 14326 15398 jl. i1. ; 14327 15400 14327 15400 ; scan message queue and return answers 14328 15400 14328 15400 i0: rs w2 b18 ; for mes:= first message(subproc) 14329 15402 al w0 4 ; while mes<>last message(subproc) do 14330 15404 jl w3 g19 ; 14331 15406 rl w1 b19 ; deliver result(4) 14332 15408 i1: rl w2 x1+a54 ; 14333 15410 se w2 x1+a54 ; 14334 15412 jl. i0. ; 14335 15414 al w0 0 ; internal state(subproc):= 0 14336 15416 rs w0 x1+p12 ; 14337 15418 rs w0 x1+p13 ; current message(subproc):= 0 14338 15420 hs w0 x1+p17 ; current bufno(subproc):= 0 14339 15422 rl. w2 j2. ; 14340 15424 rs w2 b18 ; restore curr mess; 14341 15426 14341 15426 jl. (j0.) ; return 14342 15428 14342 15428 j0: 0 ; saved link 14343 15430 j1: 0 ; saved messageno 14344 15432 j2: 0 ; saved curr mess 14345 15434 14345 15434 e. ; end of clear subproc message queue 14346 15434 \f 14346 15434 ; fpa-subproc common procedures 14347 15434 ; eli, 15.1.1976 14348 15434 14348 15434 ; procedure test answer attention 14349 15434 ; 14350 15434 ; called when the subproc is ready for sending a header. 14351 15434 ; 14352 15434 ; if the <answer attention> flag is set in the statefield of the subproc, 14353 15434 ; mainproc will be initiated to transmit the answer. <bufno> from the 14354 15434 ; attention message received has previously been saved in the rightmost 8 14355 15434 ; bits of <state>. 14356 15434 ; if an attention answer is pending the procedure will return to mainproc. 14357 15434 ; 14358 15434 ; call return 14359 15434 ; w0 undefined 14360 15434 ; w1 subproc unchanged 14361 15434 ; w2 unchanged 14362 15434 ; w3 link undefined 14363 15434 14363 15434 b. i10, j10 14364 15434 w. 14365 15434 14365 15434 u20: ; test answer attention: 14366 15434 rl w0 x1+p12 ; if answer attention(state(subproc))=0 then 14367 15436 so w0 v71 ; return 14368 15438 jl x3 ; 14369 15440 ; 14370 15440 rl w3 x1+a50 ; main:= mainproc(subproc) 14371 15442 c. p103-1 14372 15442 al w0 8 ; addresscode(main):= ' no check ' 14373 15444 hs w0 x3+p72 ; 14374 15446 z. 14375 15446 jl. w3 u25. ; set linkparams 14376 15448 al w0 v59 ; function(main):= answer attention 14377 15450 hs w0 x3+p61 ; 14378 15452 rl w0 x1+p12 ; bufno(main):= rightmost 8 bits 14379 15454 la w0 g53 ; (state(subproc)) 14380 15456 hs w0 x3+p68 ; 14381 15458 ; 14382 15458 jl (b101) ; goto mainproc return 14383 15460 14383 15460 e. ; end of test answer attention 14384 15460 \f 14384 15460 ; fpa-subproc common procedures 14385 15460 ; eli, 11.2.1976 14386 15460 14386 15460 ; procedure test and increase stop count 14387 15460 ; 14388 15460 ; increases the stop count of the sender of a message, if it has 14389 15460 ; not already been increased. the message must be present in the 14390 15460 ; message table and the address in the table must bee odd if stop 14391 15460 ; count has been increased. 14392 15460 ; 14393 15460 ; call return 14394 15460 ; w0 undefined 14395 15460 ; w1 subproc unchanged 14396 15460 ; w2 message see below 14397 15460 ; w3 link undefined 14398 15460 ; 14399 15460 ; if stop count could not bee increased, because the sender has been 14400 15460 ; stopped then return will be made to <link> and the message has 14401 15460 ; been returned (w2 is undefined). 14402 15460 ; 14403 15460 ; otherwise return to <link+2> (w2 is unchanged). 14404 15460 14404 15460 b. i10, j10 14405 15460 w. 14406 15460 14406 15460 u21: ; test and increase stop count: 14407 15460 rs. w3 j0. ; save link 14408 15462 al w3 x1+p19 ; search message table for message 14409 15464 jl. i1. ; 14410 15466 14410 15466 14410 15466 i0: al w3 x3+2 ; 14411 15468 i1: rl w0 x3 ; w0:= even message(message table) 14412 15470 la w0 g50 ; 14413 15472 se w0 x2 ; 14414 15474 jl. i0. ; 14415 15476 14415 15476 ; w3 points to entry. w0 holds even message address 14416 15476 14416 15476 lo w0 g63 ; set odd value in message table 14417 15478 rx w0 x3 ; 14418 15480 sz w0 2.1 ; if stop count already increased then 14419 15482 jl. i2. ; goto ok-return 14420 15484 14420 15484 ; examine state of sender before increase 14421 15484 14421 15484 rs. w3 j1. ; save entry 14422 15486 jl w3 g34 ; exam sender 14423 15488 jl. i3. ; stopped: goto stop-return 14424 15490 jl w3 g31 ; ok: increase stop count 14425 15492 14425 15492 ; return to <link+2> 14426 15492 14426 15492 i2: rl. w3 j0. ; ok-return: 14427 15494 jl x3+2 ; 14428 15496 14428 15496 ; stop count could not be increased. deliver answer 14429 15496 14429 15496 i3: al w0 0 ; message entry:= 0 14430 15498 rs w0 x1+p12 ; state(subproc):= ready; 14431 15500 rs. w0 (j1.) ; if mes=current message(subproc) then 14432 15502 sn w2 (x1+p13) ; current message(subproc):= 0 14433 15504 rs w0 x1+p13 ; 14434 15506 al w3 1 ; 14435 15508 ba w3 x1+p16 ; 14436 15510 hs w3 x1+p16 ; free buffers:= free buffers+1 14437 15512 c.p101 b.f1 w. ;*****test51***** 14438 15512 rs. w3 f0. ;* 14439 15514 jl. w3 f4. ;* 14440 15516 51 ;* 14441 15518 f0: 0 ;* 14442 15520 jl. f1. ;* 14443 15522 al w0 x1+p11 ;* 14444 15524 al w1 x1+p19+14 ;* 14445 15526 jl. w3 f5. ;* 14446 15528 f1: ;* 14447 15528 e.z. ;*****test51***** 14448 15528 jl. w3 u6. ; prepare answer after stop 14449 15530 jl w3 g18 ; deliver result(1) 14450 15532 jl. (j0.) ; goto <link> 14451 15534 14451 15534 j0: 0 ; saved link 14452 15536 j1: 0 ; saved entry 14453 15538 14453 15538 e. ; end of test and increase stop count 14454 15538 \f 14454 15538 ; fpa-subproc common procedures 14455 15538 ; eli, 8.6.1977 14456 15538 14456 15538 ; procedure set linkparams 14457 15538 ; 14458 15538 ; copies the fields devhost linkno, jobhost linkno, 14459 15538 ; devhost host-id, devhost net-id and devhost 14460 15538 ; home-reg to the mainproc parameters. 14461 15538 ; 14462 15538 ; also copies the bufferno of the link and sets the 14463 15538 ; monitor address code to 'no check'. 14464 15538 ; 14465 15538 ; call return 14466 15538 ; w0 undefined 14467 15538 ; w1 subproc unchanged 14468 15538 ; w2 unchanged 14469 15538 ; w3 link mainproc 14470 15538 14470 15538 b. i10, j10 14471 15538 w. 14472 15538 14472 15538 u25: ; set linkparams: 14473 15538 rs. w3 j0. ; save link 14474 15540 rl w3 x1+a50 ; main:= mainproc(subproc) 14475 15542 bz w0 x1+p11 ; receiver linkno(main):= 14476 15544 hs w0 x3+p69 ; devhost linkno(subproc) 14477 15546 bz w0 x1+p9 ; sender linkno(main):= 14478 15548 hs w0 x3+p78 ; jobhost linkno(subproc) 14479 15550 bz w0 x1+p7 ; receiver net-id(main):= 14480 15552 hs w0 x3+p301 ; devhost net-id(subproc) 14481 15554 bz w0 x1+p6 ; receiver home-reg(main):= 14482 15556 hs w0 x3+p302 ; devhost home-reg(subproc) 14483 15558 rl w0 x1+p5 ; receiver host-id(main):= 14484 15560 rs w0 x3+p303 ; devhost host-id(subproc) 14485 15562 bz w0 x1+p17 ; bufno(main):= bufno(subproc) 14486 15564 hs w0 x3+p68 ; 14487 15566 ; 14488 15566 jl. (j0.) ; goto return 14489 15568 14489 15568 j0: 0 ; saved link 14490 15570 14490 15570 e. ; end of set linkparams 14491 15570 \f 14491 15570 ; fpa-subproc common procedures 14492 15570 ; eli, 8.6.1977 14493 15570 14493 15570 ; procedure testlink 14494 15570 ; 14495 15570 ; tests, that the mainproc parameters sender linkno, sender host-id 14496 15570 ; and sender net-id are equal to the parameters devhost linkno, 14497 15570 ; devhost host-id and devhost net-id in the subproc. 14498 15570 ; 14499 15570 ; if not equal, return will be made to link+0, otherwise 14500 15570 ; to link+2. 14501 15570 ; 14502 15570 ; call return 14503 15570 ; w0 undefined 14504 15570 ; w1 subproc unchanged 14505 15570 ; w2 mainproc 14506 15570 ; w3 link unchanged 14507 15570 14507 15570 b. i10, j10 14508 15570 w. 14509 15570 14509 15570 u23: ; testlink: 14510 15570 rl w2 x1+a50 ; main:= mainproc(subproc) 14511 15572 bl w0 x2+p98 ; if sender linkno(main)<> 14512 15574 bs w0 x1+p11 ; devhost linkno(subproc) then 14513 15576 se w0 0 ; goto link+0 14514 15578 jl x3+0 ; 14515 15580 rl w0 x2+p323 ; if sender host-id(main)<> 14516 15582 se w0 (x1+p5) ; devhost host-id(subproc) then 14517 15584 jl x3+0 ; goto link+0 14518 15586 bl w0 x2+p321 ; if sender net-id(main)<> 14519 15588 bs w0 x1+p7 ; devhost net-id(subproc) then 14520 15590 ; se w0 0 ; goto link+0 14521 15590 ; jl x3+0 ; 14522 15590 jl x3+2 ; goto link+2 14523 15592 14523 15592 e. ; end of testlink 14524 15592 \f 14524 15592 ; fpa-subproc common procedures 14525 15592 ; eli, 8.6.1977 14526 15592 14526 15592 ; procedure reject 14527 15592 ; 14528 15592 ; sets the internal status of mainproc to 'reject' 14529 15592 ; and jumps to testmore 14530 15592 ; 14531 15592 ; call no return 14532 15592 ; w0 14533 15592 ; w1 subproc 14534 15592 ; w2 14535 15592 ; w3 14536 15592 14536 15592 b. i10, j10 14537 15592 w. 14538 15592 14538 15592 u24: ; reject: 14539 15592 al w0 p163 ; internal status(mainproc(subproc):= 14540 15594 am (x1+a50) ; reject 14541 15596 hs w0 +p80 ; 14542 15598 jl. u2. ; goto testmore 14543 15600 14543 15600 e. ; end of reject 14544 15600 \f 14544 15600 ; fpa-subproc common procedures 14545 15600 ; eli, 7.8.1975 14546 15600 14546 15600 ; testmore 14547 15600 ; 14548 15600 ; entered, when the subproc-state should be tested for more messages to 14549 15600 ; process. 14550 15600 ; 14551 15600 ; if the state of the subproc is free, and more messages to process exist 14552 15600 ; the subproc is linked to the mainproc. 14553 15600 ; 14554 15600 ; return is made through the common return. 14555 15600 ; 14556 15600 ; upon entry: 14557 15600 ; 14558 15600 ; w0 14559 15600 ; w1 14560 15600 ; w2 14561 15600 ; w3 14562 15600 ; b19 subproc 14563 15600 14563 15600 b.i10, j10 14564 15600 w. 14565 15600 14565 15600 u2: ; testmore: 14566 15600 rl w1 b19 ; get current subproc 14567 15602 c.p101 b.f1 w. ;*****test52***** 14568 15602 rs. w3 f0. ; 14569 15604 jl. w3 f4. ; 14570 15606 52 ; 14571 15608 f0: 0 ; 14572 15610 jl. f1. ; 14573 15612 al w0 x1 ; testrecord:= 14574 15614 al w1 x1+p19+16 ; process description; 14575 15616 jl. w3 f5. ; 14576 15618 f1: ; 14577 15618 e.z. ;*****test52***** 14578 15618 rl w0 x1+p14 ; if in mainproc queue then 14579 15620 se w0 x1+p14 ; 14580 15622 jl (b101) ; return 14581 15624 14581 15624 ; test answers to transmit 14582 15624 14582 15624 rl w0 x1+p12 ; 14583 15626 c.p101 b.f1 w. ;*****test53***** 14584 15626 rs. w3 f0. ;* 14585 15628 jl. w3 f4. ;* 14586 15630 53 ;* 14587 15632 f0: 0 ;* 14588 15634 jl. f1. ;* 14589 15636 al w0 x3 ;* 14590 15638 al w1 x3-2 ;* 14591 15640 jl. w3 f5. ;* 14592 15642 f1: ;* 14593 15642 e.z. ;*****test53***** 14594 15642 sz w0 v71 ; if answer att<>0 then 14595 15644 jl. i0. ; goto link subproc 14596 15646 14596 15646 ; test message entry free and number of buffers free 14597 15646 14597 15646 jl. w3 u8. ; if mess.addr.(cur.entry)<>0 14598 15648 bl w0 x1+p16 ; 14599 15650 c.p101 b.f1 w. ;*****test54***** 14600 15650 rs. w3 f0. ;* 14601 15652 jl. w3 f4. ;* 14602 15654 54 ;* 14603 15656 f0: 0 ;* 14604 15658 jl. f1. ;* 14605 15660 al w0 x3 ;* 14606 15662 al w1 x3-2 ;* 14607 15664 jl. w3 f5. ;* 14608 15666 f1: ;* 14609 15666 e.z. ;*****test54***** 14610 15666 sn w2 0 ; or bufs free=0 then 14611 15668 sn w0 0 ; 14612 15670 jl (b101) ; goto return 14613 15672 14613 15672 ; test for a current message or more messages to process 14614 15672 14614 15672 rl w0 x1+p12 ; 14615 15674 sz w0 v70 ; if blocked(subproc) then 14616 15676 jl (b101) ; goto mainproc return 14617 15678 sz w0 v72 ; if pending messages(subproc)<>0 then 14618 15680 jl. i0. ; goto link subproc 14619 15682 jl. w3 u12. ; if next pending=0 then 14620 15684 c.p101 b.f1 w. ;*****test55***** 14621 15684 rs. w3 f0. ;* 14622 15686 jl. w3 f4. ;* 14623 15688 55 ;* 14624 15690 f0: 0 ;* 14625 15692 jl. f1. ;* 14626 15694 al w0 x3 ;* 14627 15696 al w1 x3-2 ;* 14628 15698 jl. w3 f5. ;* 14629 15700 f1: ;* 14630 15700 e.z. ;*****test55***** 14631 15700 sn w2 0 ; 14632 15702 jl (b101) ; goto return 14633 15704 14633 15704 ; a message or answer is pending 14634 15704 ; link subproc to the corresponding mainproc 14635 15704 ; 14636 15704 ; note: the buffer is not reserved for the subproc and the bufferaddress 14637 15704 ; not saved until processing actually starts. 14638 15704 14638 15704 i0: ; link subproc: 14639 15704 al w2 x1+p14 ; elem:= queue elem(subproc) 14640 15706 am (x1+a50) ; head:= queue head(mainproc(subproc)) 14641 15708 al w1 +p14 ; 14642 15710 jl w3 d6 ; link(head,elem) 14643 15712 14643 15712 ; mainproc will later activate the subproc 14644 15712 14644 15712 jl (b101) ; goto return 14645 15714 14645 15714 e. ; end of testmore 14646 15714 \f 14646 15714 ; fpa-subproc common procedures 14647 15714 ; eli, 7.8.1975 14648 15714 14648 15714 ; procedure no block 14649 15714 ; 14650 15714 ; signals a 'nothing to do' status to mainproc, 14651 15714 ; clears busy and returns to mainproc 14652 15714 ; 14653 15714 ; call no return 14654 15714 ; w0 14655 15714 ; w1 subproc 14656 15714 ; w2 14657 15714 ; w3 14658 15714 14658 15714 b. i10, j10 14659 15714 w. 14660 15714 14660 15714 u3: al w0 p164 ; no block: 14661 15716 am (x1+a50) ; internal state(mainproc):= 14662 15718 hs w0 +p60 ; 'nothing to do' (i.e. regretted) 14663 15720 jl. u2. ; goto testmore 14664 15722 14664 15722 e. ; end of no block 14665 15722 \f 14665 15722 14665 15722 ; fpa-subproc stepping stones 14666 15722 ; eli, 77.06.14 14667 15722 14667 15722 c. p101 14668 15722 14668 15722 jl. f4. ; 14669 15724 f4=k-2 14670 15724 14670 15724 jl. f5. ; 14671 15726 f5=k-2 14672 15726 14672 15726 jl. f6. ; 14673 15728 f6=k-2 14674 15728 14674 15728 z. 14675 15728 14675 15728 jl. u4. ; 14676 15730 u4=k-2 14677 15730 14677 15730 jl. u8. ; 14678 15732 u8=k-2 14679 15732 14679 15732 jl. u12. ; 14680 15734 u12=k-2 14681 15734 14681 15734 jl. u15. ; 14682 15736 u15=k-2 14683 15736 \f 14683 15736 ; fpa-subproc common procedures 14684 15736 ; eli, 11.2.1976 14685 15736 14685 15736 ; procedure prepare transfer 14686 15736 ; 14687 15736 ; saves the message address for the subproc and then 14688 15736 ; prepares transmission of a header (and maybe a datablock) 14689 15736 ; depending on the operation-field in the message. 14690 15736 ; finally the standard parameters in mainproc corresponding to 14691 15736 ; the subproc are set. 14692 15736 ; 14693 15736 ; note, that only the operations <input>, <output> or <message> 14694 15736 ; may be handled. 14695 15736 ; 14696 15736 ; call return 14697 15736 ; w0 undefined 14698 15736 ; w1 subproc unchanged 14699 15736 ; w2 message unchanged 14700 15736 ; w3 link undefined 14701 15736 14701 15736 b. i10, j10 14702 15736 w. 14703 15736 14703 15736 u30: ; prepare transfer: 14704 15736 rs. w3 j0. ; save link 14705 15738 jl. w3 u13. ; save and reserve message 14706 15740 al. w3 i0. ; link:= after prepare 14707 15742 14707 15742 ; switch to procedure, corresponding to operation 14708 15742 14708 15742 bl w0 x2+8 ; op:= operation(mes) 14709 15744 sn w0 3 ; if op=input then 14710 15746 jl. u31. ; goto prepare input 14711 15748 sn w0 5 ; if op=output then 14712 15750 jl. u32. ; goto prepare output 14713 15752 jl. u33. ; goto prepare message 14714 15754 14714 15754 ; return is made to here from all subroutine calls. 14715 15754 ; set rest of parameters 14716 15754 14716 15754 i0: rl w3 x1+a50 ; main:= mainproc(subproc) 14717 15756 bz w0 x1+a56+1 ; s:= initialize state(subproc) 14718 15758 se w0 1 ; state(main):= if s=1 then s else 0 14719 15760 al w0 0 ; 14720 15762 hs w0 x3+p62 ; 14721 15764 al w0 0 ; initialize state(subproc):=0 14722 15766 hs w0 x1+a56+1 ; 14723 15768 bz w0 x2+9 ; mode(main):= mode(mes) 14724 15770 rs w0 x3+p63 ; 14725 15772 jl. w3 u25. ; set linkparams 14726 15774 rl w0 x1+p13 ; if current message(subproc)<>0 then 14727 15776 sn w0 0 ; blocked(subproc):=true; 14728 15778 jl. i1. ; 14729 15780 al w0 v70 ; 14730 15782 lo w0 x1+p12 ; 14731 15784 rs w0 x1+p12 ; 14732 15786 i1: ; 14733 15786 c.p101 b.f1 w. ;*****test56***** 14734 15786 rs. w3 f0. ;* 14735 15788 jl. w3 f4. ;* 14736 15790 56 ;* 14737 15792 f0: 0 ;* 14738 15794 jl. f1. ;* 14739 15796 al w0 x2 ;* 14740 15798 al w1 x2+22 ;* 14741 15800 jl. w3 f5. ;* 14742 15802 f1: ;* 14743 15802 e.z. ;*****test56***** 14744 15802 14744 15802 ; return 14745 15802 14745 15802 jl. (j0.) ; 14746 15804 14746 15804 j0: 0 ; saved link 14747 15806 14747 15806 e. ; end of prepare transfer 14748 15806 \f 14748 15806 ; fpa-subproc common procedures 14749 15806 ; eli, 19.8.1975 14750 15806 14750 15806 ; procedure prepare input 14751 15806 ; 14752 15806 ; prepares transmission of a header corresponding to an input- 14753 15806 ; message. the <size>-field of the header shows how many characters 14754 15806 ; should be input. 14755 15806 ; 14756 15806 ; call return 14757 15806 ; w0 undefined 14758 15806 ; w1 subproc unchanged 14759 15806 ; w2 message unchanged 14760 15806 ; w3 link undefined 14761 15806 14761 15806 b. i10, j10 14762 15806 w. 14763 15806 u31: ; prepare input: 14764 15806 rs. w3 j0. ; save link 14765 15808 jl. w3 u16. ; prepare addresses 14766 15810 rl w3 x1+a50 ; main:= mainproc(subproc) 14767 15812 al w0 v50 ; function(main):= input 14768 15814 hs w0 x3+p61 ; 14769 15816 al w0 0 ; data size(main):= 0 14770 15818 rs w0 x3+p66 ; 14771 15820 jl. (j0.) ; goto link 14772 15822 14772 15822 j0: 0 ; saved link 14773 15824 14773 15824 e. ; end of prepare input 14774 15824 \f 14774 15824 ; fpa-subproc common procedures 14775 15824 ; eli, 11.2.1976 14776 15824 14776 15824 ; procedure prepare output 14777 15824 ; 14778 15824 ; prepares the transmission of a header corresponding to an 14779 15824 ; output-message. the addresses in the sender table of mainproc 14780 15824 ; are initialized corresponding to a datablock, which is to 14781 15824 ; be transmitted following the header. 14782 15824 ; if the sender of the message is stopped, an answer is 14783 15824 ; generated showing the number of bytes and characters output 14784 15824 ; until now. 14785 15824 ; 14786 15824 ; call return 14787 15824 ; w0 undefined 14788 15824 ; w1 subproc unchanged 14789 15824 ; w2 message unchanged 14790 15824 ; w3 link undefined 14791 15824 14791 15824 b. i10, j10 14792 15824 w. 14793 15824 14793 15824 u32: rs. w3 j0. ; prepare output: save link 14794 15826 14794 15826 ; examine state of sender 14795 15826 14795 15826 jl. w3 u21. ; test and increase stop count 14796 15828 jl. u3. ; stopped: goto no block 14797 15830 14797 15830 ; sender still running 14798 15830 rl w3 x1+a50 ; main:= main(subproc) 14799 15832 al w0 v52+(:1<0:); function(main):= 14800 15834 hs w0 x3+p61 ; output+databit 14801 15836 c. p103-1 14802 15836 al w0 0 ; addresscode(main):= 14803 15838 hs w0 x3+p72 ; sender area 14804 15840 rs w2 x3+p71 ; messagebuf(main):= message; 14805 15842 z. 14806 15842 jl. w3 u16. ; prepare addresses 14807 15844 jl. (j0.) ; goto link 14808 15846 14808 15846 j0: 0 ; saved link 14809 15848 14809 15848 e. ; end of prepare output 14810 15848 \f 14810 15848 ; fpa-subproc common procedures 14811 15848 ; eli, 19.8.1975 14812 15848 14812 15848 ; procedure prepare message 14813 15848 ; 14814 15848 ; prepares transmission of a header , followed by the content of 14815 15848 ; the messagebuffer (only the user part is transmitted). 14816 15848 ; the field <current message> in the subproc is cleared. 14817 15848 ; 14818 15848 ; call return 14819 15848 ; w0 undefined 14820 15848 ; w1 subproc unchanged 14821 15848 ; w2 message unchanged 14822 15848 ; w3 link mainproc 14823 15848 14823 15848 b. i10, j10 14824 15848 w. 14825 15848 14825 15848 u33: rs. w3 j0. ; prepare message: save link 14826 15850 al w0 0 ; current message(subproc):= 0 14827 15852 rs w0 x1+p13 ; 14828 15854 rl w3 x1+a50 ; main:= mainproc(subproc) 14829 15856 al w0 x2+8 ; first(main):= first user addr(mes) 14830 15858 rs w0 x3+p65 ; 14831 15860 al w0 (:22-8+2:)/2*3; header size(main):= data size(main):= 14832 15862 rs w0 x3+p64 ; size of user part(mes) 14833 15864 rs w0 x3+p66 ; 14834 15866 al w0 v54+(:1<0:); function(mainproc):= message+databit 14835 15868 hs w0 x3+p61 ; 14836 15870 c. p103-1 14837 15870 al w0 8 ; 14838 15872 hs w0 x3+p72 ; 14839 15874 z. 14840 15874 14840 15874 ; return 14841 15874 14841 15874 jl. (j0.) ; 14842 15876 14842 15876 j0: 0 ; saved link 14843 15878 14843 15878 e. ; end of prepare message 14844 15878 \f 14844 15878 ; fpa-subproc common procedures 14845 15878 ; eli, 11.2.1976 14846 15878 14846 15878 ; procedure test header and data transmitted 14847 15878 ; 14848 15878 ; tests the result of transmission of a header and (maybe) 14849 15878 ; a datablock. 14850 15878 ; if the <stop count increased>-flag is set, the stop count 14851 15878 ; of the sender of current message is decreased. 14852 15878 ; if a transmission error has occured, the message is returned 14853 15878 ; with result=4 (receiver malfunction) and the <current message>- 14854 15878 ; field cleared. return will then be made to <link+0>. 14855 15878 ; 14856 15878 ; if no error has occured, <current bufno> is 14857 15878 ; increased and return made to <link+2>. 14858 15878 ; 14859 15878 ; call return 14860 15878 ; w0 undefined 14861 15878 ; w1 subproc unchanged 14862 15878 ; w2 undefined 14863 15878 ; w3 link undefined 14864 15878 14864 15878 b. i10, j10 14865 15878 w. 14866 15878 14866 15878 u40: ; test header and data transmitted: 14867 15878 rs. w3 j0. ; save link 14868 15880 rl w3 x1+a50 ; if function type(main(subproc))=answer then 14869 15882 bz w0 x3+p61 ; 14870 15884 sz w0 2.10 ; 14871 15886 jl. i1. ; goto after answer attention 14872 15888 jl. w3 u8. ; <current buffer>:= w2:= 14873 15890 rs w2 b18 ; message 14874 15892 bl w2 x1+p17 ; get messageno 14875 15894 sz w0 2.1 ; if databit(function)=1 then 14876 15896 jl. w3 u18. ; test and decrease stop count 14877 15898 rl w2 b18 ; 14878 15900 14878 15900 ; test transmission state 14879 15900 14879 15900 am (x1+a50) ; if internal state(mainproc(subproc))<>0 then 14880 15902 bl w0 +p60 ; begin 14881 15904 sn w0 0 ; 14882 15906 jl. i0. ; 14883 15908 14883 15908 ; transmission trouble 14884 15908 14884 15908 sl w2 (b8+4) ; if message addr>=first message then 14885 15910 jl. +4 ; begin 14886 15912 jl. i2. ; 14887 15914 ; 14888 15914 se w0 p161 ; if state<>1 then 14889 15916 al w2 0 ; mes:= 0 14890 15918 rs w2 x1+p13 ; comment: state=1 after wait; 14891 15920 bl w2 x1+p17 ; get messageno; 14892 15922 jl. w3 u18. ; test and decrease stopcount; 14893 15924 rl w2 x1+p13 ; mes:= current message(subproc); 14894 15926 al w0 4 ; current message(subproc):= mes 14895 15928 sn w2 0 ; if mes=0 then 14896 15930 jl w3 g19 ; deliver result(4) 14897 15932 i2: al w0 -1-v70 ; end 14898 15934 la w0 x1+p12 ; blocked(subproc):= false 14899 15936 rs w0 x1+p12 ; 14900 15938 c.p101 b. f1 w. ;*****test57***** 14901 15938 rs. w3 f0. ;* 14902 15940 jl. w3 f4. ;* 14903 15942 57 ;* 14904 15944 f0: 0 ;* 14905 15946 jl. f1. ;* 14906 15948 rl w2 b18 ;* 14907 15950 al w0 x2 ;* 14908 15952 al w1 x2+22 ;* 14909 15954 jl. w3 f5. ;* 14910 15956 f1: ;* 14911 15956 e.z. ;*****test57***** 14912 15956 al w0 0 ; 14913 15958 jl. w3 u9. ; message addr(current entry):= 0 14914 15960 rs w0 x2 ; 14915 15962 al w0 1 ; increase(free buffers(subproc)) 14916 15964 ba w0 x1+p16 ; 14917 15966 hs w0 x1+p16 ; 14918 15968 jl. (j0.) ; goto link+0 14919 15970 ; end 14920 15970 14920 15970 ; transmission ok. 14921 15970 14921 15970 i0: ; 14922 15970 c.p101 b.f1 w. ;*****test58***** 14923 15970 rs. w3 f0. ;* 14924 15972 jl. w3 f4. ;* 14925 15974 58 ;* 14926 15976 f0: 0 ;* 14927 15978 jl. f1. ;* 14928 15980 rs w2 x3 ;* 14929 15982 rl w2 x1+p13 ;* 14930 15984 rs w2 x3+2 ;* 14931 15986 al w0 x3 ;* 14932 15988 al w1 x3+2 ;* 14933 15990 jl. w3 f5. ;* 14934 15992 f1: ;* 14935 15992 e.z. ;*****test58***** 14936 15992 jl. w3 u10. ; increase(current entry(subproc)) 14937 15994 14937 15994 ; return 14938 15994 14938 15994 jl. i3. ; goto link+2 14939 15996 14939 15996 ; answer attention has been transmitted 14940 15996 14940 15996 i1: bz w3 x3+p60 ; after answer attention: 14941 15998 c.p101 b.f1 w. ;*****test59***** 14942 15998 rs. w3 f0. ;* 14943 16000 jl. w3 f4. ;* 14944 16002 59 ;* 14945 16004 f0: 0 ;* 14946 16006 jl. f1. ;* 14947 16008 rs w0 x3 ;* 14948 16010 al w0 x3 ;* 14949 16012 al w1 x3 ;* 14950 16014 jl. w3 f5. ;* 14951 16016 f1: ;* 14952 16016 e.z. ;*****test59***** 14953 16016 al w0 -1-v71 ; if internal state(main)=0 then 14954 16018 la w0 x1+p12 ; 14955 16020 sn w3 0 ; 14956 16022 rs w0 x1+p12 ; answer attention flag(subproc):= false 14957 16024 i3: rl. w3 j0. ; goto link+2 14958 16026 jl x3+2 ; 14959 16028 14959 16028 j0: 0 ; saved link 14960 16030 14960 16030 e. ; end of test header and data transmitted 14961 16030 \f 14961 16030 ; fpa-subproc common procedures 14962 16030 ; eli, 15.1.1976 14963 16030 14963 16030 ; procedure test answer header 14964 16030 ; 14965 16030 ; called when a header, which is going to be followed by a datablock has 14966 16030 ; been received. 14967 16030 ; in the current version only answers to previously transmitted messages 14968 16030 ; may be handled. 14969 16030 ; functions may be <answer input> or <answer message>. 14970 16030 ; the bufno in the answer is used to find the message table entry. 14971 16030 ; depending on the value in the entry, the following is performed: 14972 16030 ; 14973 16030 ; message entry: 14974 16030 ; 14975 16030 ; 0 the message has been returned due to line errors. a reject 14976 16030 ; status is returned on the communication line. return 14977 16030 ; will be made to testmore. 14978 16030 ; impossible message address: signals a special function for the 14979 16030 ; subproc. return to <link+2>. 14980 16030 ; normal message address: procedure corresponding to function is 14981 16030 ; activated. if the datablock can be received return is 14982 16030 ; made to mainproc. otherwise a skip-status is signalled 14983 16030 ; and return made to <link>. 14984 16030 ; 14985 16030 ; call return 14986 16030 ; w0 undefined 14987 16030 ; w1 subproc unchanged 14988 16030 ; w2 undefined 14989 16030 ; w3 link undefined 14990 16030 14990 16030 b.i10, j10 14991 16030 w. 14992 16030 14992 16030 u50: ; test header: 14993 16030 rs. w3 j0. ; save link 14994 16032 jl. w3 u23. ; testlink 14995 16034 jl. u24. ; error: goto reject 14996 16036 rl. w3 j0. ; restore link 14997 16038 al w0 p160 ; 14998 16040 hs w0 x2+p80 ; skip(main):= false 14999 16042 bz w0 x2+p81 ; func:= function(main) 15000 16044 bz w2 x2+p88 ; mes:= even message table(bufno(main)) 15001 16046 am x2 ; 15002 16048 am x2 ; 15003 16050 rl w2 x1+p19 ; 15004 16052 c.p101 b.f1 w. ;*****test60***** 15005 16052 rs. w3 f0. ;* 15006 16054 jl. w3 f4. ;* 15007 16056 60 ;* 15008 16058 f0: 0 ;* 15009 16060 jl. f1. ;* 15010 16062 al w0 x2 ;* 15011 16064 al w1 x2+22 ;* 15012 16066 jl. w3 f5. ;* 15013 16068 f1: ;* 15014 16068 e.z. ;*****test60***** 15015 16068 la w2 g50 ; 15016 16070 sl w2 (b8+4) ; if mes<first message then 15017 16072 jl. i0. ; begin 15018 16074 sn w2 0 ; if mes=0 then 15019 16076 jl. u24. ; goto reject 15020 16078 c.p101 b.f1 w. ;*****test61***** 15021 16078 rs. w3 f0. ; 15022 16080 jl. w3 f4. ;* 15023 16082 61 ;* 15024 16084 f0: 0 ;* 15025 16086 jl. f1. ;* 15026 16088 al w0 x1+p19 ;* 15027 16090 al w1 x1+p19+14 ;* 15028 16092 jl. w3 f5. ;* 15029 16094 f1: ;* 15030 16094 e.z. ;*****test61***** 15031 16094 jl x3+2 ; goto <link+2> 15032 16096 ; end 15033 16096 i0: rs w2 b18 ; current message(monitor):= mes 15034 16098 am (x1+a50) ; if local function(rec)= 15035 16100 bz w3 +p99 ; rejected packet then 15036 16102 se w3 3 ; begin comment: deliver answer malfunction; 15037 16104 jl. i1. ; 15038 16106 am (x1+a50) ; w2:= bufno(rec) 15039 16108 bz w2 +p88 ; 15040 16110 jl. w3 u18. ; test and decrease stopcount 15041 16112 jl. w3 u11. ; clear message entry 15042 16114 jl w3 g4 ; deliver result(4) 15043 16116 al w0 p162 ; internal status(main):= skip 15044 16118 am (x1+a50) ; 15045 16120 hs w0 +p80 ; 15046 16122 jl. u2. ; goto testmore 15047 16124 i1: rl. w3 j0. ; end 15048 16126 15048 16126 ; switch to action 15049 16126 15049 16126 sn w0 v51+(:1<0:); if function= <answer input with data> then 15050 16128 jl. u51. ; goto test answer input 15051 16130 jl. u53. ; goto test answer message 15052 16132 15052 16132 j0: 0 ; saved link 15053 16134 15053 16134 e. ; end of test answer header 15054 16134 \f 15054 16134 15054 16134 ; fpa-subproc common procedures 15055 16134 ; eli, 11.2.1976 15056 16134 15056 16134 ; procedure test answer input header 15057 16134 ; 15058 16134 ; called, when a header with function=<answer input with data> has been 15059 16134 ; received. 15060 16134 ; the state of the receiving process 15061 16134 ; is checked. if it is still running, the mainproc parameters 15062 16134 ; are initialized and the procedure returns to mainproc. 15063 16134 ; 15064 16134 ; if the receiver is stopped an answer is returned and a skip-status signalled 15065 16134 ; to mainproc. 15066 16134 ; 15067 16134 ; call return 15068 16134 ; w0 undefined 15069 16134 ; w1 subproc unchanged 15070 16134 ; w2 message undefined 15071 16134 ; w3 link undefined 15072 16134 15072 16134 b. i10, j10 15073 16134 w. 15074 16134 15074 16134 u51: ; test answer input header: 15075 16134 rs. w3 j0. ; save link 15076 16136 15076 16136 ; examine state of receiving process 15077 16136 15077 16136 jl. w3 u21. ; test and increase stop count 15078 16138 jl. i0. ; stopped: goto skip 15079 16140 15079 16140 ; sender still running 15080 16140 15080 16140 rl w3 x1+a50 ; main:= mainproc(subproc) 15081 16142 rl w0 x2+22 ; first(main):= updated first(mes) 15082 16144 rs w0 x3+p85 ; 15083 16146 rl w0 x3+p84 ; 15084 16148 rs w0 x3+p86 ; data size(main):= header size(main) 15085 16150 c. p103-1 15086 16150 al w0 0 ; addres code(main):= 15087 16152 hs w0 x3+p92 ; sender area 15088 16154 rs w2 x3+p91 ; messagebuf(main):= message 15089 16156 z. 15090 16156 15090 16156 ; return to mainproc, which will then receive the datablock 15091 16156 15091 16156 jl (b101) ; goto mainproc return 15092 16158 15092 16158 ; receiver of databuffer stopped 15093 16158 15093 16158 i0: al w0 p162 ; skip: signal skip-status to mainproc 15094 16160 am (x1+a50) ; 15095 16162 hs w0 +p80 ; 15096 16164 al w0 0 ; 15097 16166 rs w0 x1+p12 ; state(proc):=0; 15098 16168 15098 16168 ; return 15099 16168 15099 16168 jl. (j0.) ; 15100 16170 15100 16170 j0: 0 ; saved link 15101 16172 15101 16172 e. ; end of test answer input header 15102 16172 \f 15102 16172 ; fpa-subproc common procedures 15103 16172 ; eli, 15.1.1976 15104 16172 15104 16172 ; procedure test answer message header 15105 16172 ; 15106 16172 ; called when a header with function=<answer message with data> has been 15107 16172 ; received. 15108 16172 ; the parameters in mainproc are initiated to receive the answer. 15109 16172 ; return will always be made to mainproc. 15110 16172 ; 15111 16172 ; note, that it is not necessary to check the running status 15112 16172 ; of the receiver, as the datablock is received directly 15113 16172 ; in the messagebuffer area in the monitor. 15114 16172 ; 15115 16172 ; call no return 15116 16172 ; w0 15117 16172 ; w1 subproc 15118 16172 ; w2 message 15119 16172 ; w3 15120 16172 15120 16172 b. i10, j10 15121 16172 w. 15122 16172 15122 16172 u53: ; test answer message header: 15123 16172 rl w3 x1+a50 ; main:= mainproc(subproc) 15124 16174 al w0 x2+8 ; first(main):= first user word(mes) 15125 16176 rs w0 x3+p85 ; 15126 16178 al w0 (:22-8+2:)/2*3; data size(main):= 15127 16180 rs w0 x3+p86 ; size of user part(mes) 15128 16182 al w0 8 ; address code(main):= dirty 15129 16184 hs w0 x3+p92 ; 15130 16186 c. p103-1 15131 16186 al w0 0 ; 15132 16188 rs w0 x3+p91 ; 15133 16190 z. 15134 16190 jl (b101) ; return to mainproc 15135 16192 15135 16192 e. ; end of test answer message header 15136 16192 \f 15136 16192 15136 16192 ; fpa-subproc common procedures 15137 16192 ; eli, 11.2.1976 15138 16192 15138 16192 ; procedure test answer data received 15139 16192 ; 15140 16192 ; a header without a datablock, or the datablock following a header has 15141 16192 ; been received. 15142 16192 ; if stop count has been increased (answer input) it is decreased. 15143 16192 ; 15144 16192 ; if the function field of the header corresponds to a message received 15145 16192 ; (attention) return will be made to <link+2>. 15146 16192 ; 15147 16192 ; if the message table of the entry corresponding to the bufno in the 15148 16192 ; answer does not describe a message (value to small) return will be made 15149 16192 ; to <link+4>. in this case w2 will hold the content of the message table entry. 15150 16192 ; 15151 16192 ; otherwise the procedure, corresponding to the mainproc <function>- 15152 16192 ; field is activated and return made to <link>. 15153 16192 ; 15154 16192 ; call return 15155 16192 ; w0 undefined 15156 16192 ; w1 subproc unchanged 15157 16192 ; w2 undefined (see above for return to <link+4> 15158 16192 ; w3 link undefined 15159 16192 15159 16192 b. i10, j10 15160 16192 w. 15161 16192 15161 16192 u60: ; test answer data received: 15162 16192 rl w2 x1+a50 ; if function(mainproc(subproc))=attention then 15163 16194 bz w0 x2+p81 ; 15164 16196 sn w0 v58 ; 15165 16198 jl. u64. ; goto attention received. 15166 16200 ; note: link unchanged. will return to <link+2> 15167 16200 rs. w3 j0. ; save link 15168 16202 sz w0 2.1 ; if no data then 15169 16204 jl. i2. ; begin 15170 16206 jl. w3 u23. ; testlink 15171 16208 jl. u24. ; error: goto reject 15172 16210 ; end 15173 16210 i2: bz w2 x2+p88 ; mes:= even message addr(bufno(mainproc(subproc))) 15174 16212 am x2 ; 15175 16214 am x2 ; 15176 16216 rl w3 x1+p19 ; 15177 16218 la w3 g50 ; 15178 16220 sn w3 0 ; if mes=0 then 15179 16222 jl. u24. ; goto reject 15180 16224 rs w3 b18 ; current message(monitor):= mes 15181 16226 jl. w3 u18. ; test and decrease stopcount(w2=messageno) 15182 16228 rl w2 b18 ; restore message 15183 16230 jl. w3 u11. ; clear message entry 15184 16232 al w0 -1-v70 ; blocked(subproc):=false; 15185 16234 la w0 x1+p12 ; 15186 16236 rs w0 x1+p12 ; 15187 16238 sl w2 (b8+4) ; if mes<first message buffer then 15188 16240 jl. i0. ; 15189 16242 rl. w3 j0. ; goto <link+4> 15190 16244 jl x3+4 ; 15191 16246 15191 16246 ; switch to action 15192 16246 i0: rl w3 x1+a50 ; 15193 16248 bz w0 x3+p99 ; if local function(rec)= 15194 16250 se w0 3 ; rejected packet then 15195 16252 jl. i1. ; begin 15196 16254 al w0 4 ; 15197 16256 jl w3 g19 ; deliver result(4) 15198 16258 jl. u2. ; goto testmore 15199 16260 i1: ; end 15200 16260 bz w0 x3+p81 ; w0:= function(mainproc(subproc)) 15201 16262 la w0 g50 ; remove databit 15202 16264 rl. w3 j0. ; link:= saved link 15203 16266 sn w0 v51 ; if function=<answer input> then 15204 16268 jl. u61. ; goto answer input data received 15205 16270 sn w0 v53 ; if function=<answer output> then 15206 16272 jl. u62. ; goto test answer output header 15207 16274 jl. u63. ; goto test answer message data 15208 16276 15208 16276 j0: 0 ; saved link 15209 16278 15209 16278 e. ; end of test answer data received 15210 16278 \f 15210 16278 15210 16278 ; fpa-subproc common procedures 15211 16278 ; eli, 15.1.1976 15212 16278 15212 16278 ; procedure answer input data received 15213 16278 ; 15214 16278 ; called, when the datablock following a header with <function>= 15215 16278 ; <answer input (with or without data)> has been received. 15216 16278 ; 15217 16278 ; if the message is not current message, if a result- or status error 15218 16278 ; is detected or if less than wanted is input, an answer with result=1 15219 16278 ; is generated. otherwise the next block may be input. 15220 16278 ; 15221 16278 ; call return 15222 16278 ; w0 undefined 15223 16278 ; w1 subproc unchanged 15224 16278 ; w2 message unchanged 15225 16278 ; w3 link undefined 15226 16278 15226 16278 b. i10, j10 15227 16278 w. 15228 16278 15228 16278 u61: ; answer input data received: 15229 16278 rs. w3 j0. ; save link 15230 16280 se w2 (x1+p13) ; if mes=current message(subproc) then 15231 16282 jl. i1. ; begin 15232 16284 rl w3 x1+a50 ; main:= mainproc(subproc) 15233 16286 rl w0 x3+p84 ; if size(main)=expected size(mes) 15234 16288 bl w3 x3+p82 ; and 15235 16290 am (x1+a50) ; 15236 16292 wa w3 +p83 ; 15237 16294 sn w3 0 ; 15238 16296 se w0 (x2+20) ; result(main)=status(main)=0 then 15239 16298 jl. i0. ; begin 15240 16300 jl. w3 u15. ; updated first(mes):= 15241 16302 wa w0 x2+22 ; updated first(mes)+ convert to 12-bit(header size(main)) 15242 16304 rs w0 x2+22 ; 15243 16306 jl. (j0.) ; goto return 15244 16308 ; end result ok 15245 16308 15245 16308 ; after some error in current message 15246 16308 15246 16308 i0: al w0 0 ; current message(subproc):= 0 15247 16310 rs w0 x1+p13 ; end current message 15248 16312 15248 16312 ; not current message 15249 16312 ; else 15250 16312 i1: jl. w3 u7. ; prepare answer 15251 16314 rl. w3 j0. ; link:= saved link 15252 16316 jl. u5. ; goto get and deliver result 15253 16318 15253 16318 j0: 0 ; saved link 15254 16320 15254 16320 e. ; end of answer input data received 15255 16320 \f 15255 16320 ; fpa-subproc common procedures 15256 16320 ; eli, 15.1.1976 15257 16320 15257 16320 ; procedure test answer output 15258 16320 ; 15259 16320 ; test the parameters in a header corresponding to function 15260 16320 ; =answer output. 15261 16320 ; if the following conditions: 15262 16320 ; 15263 16320 ; -the corresponding message is <current message> 15264 16320 ; -the result is ok (=0) 15265 16320 ; -the status is ok (=0) 15266 16320 ; -the whole block has been output 15267 16320 ; a transfer of next part is prepared. 15268 16320 ; 15269 16320 ; otherwise an answer is generated 15270 16320 ; 15271 16320 ; call return 15272 16320 ; w0 undefined 15273 16320 ; w1 subproc unchanged 15274 16320 ; w2 message undefined 15275 16320 ; w3 link undefined 15276 16320 15276 16320 b. i10,j10 15277 16320 w. 15278 16320 u62: ; test answer output header: 15279 16320 rs. w3 j0. ; save link 15280 16322 se w2 (x1+p13) ; if mes=current message(subproc) then 15281 16324 jl. i1. ; begin 15282 16326 rl w3 x1+a50 ; main:= mainproc(subproc) 15283 16328 rl w0 x3+p84 ; if size(main)=expected size(mes) 15284 16330 bl w3 x3+p82 ; and 15285 16332 am (x1+a50) ; 15286 16334 wa w3 +p83 ; 15287 16336 c.p101 b.f1 w. ;*****test62***** 15288 16336 rs. w3 f0. ;* 15289 16338 jl. w3 f4. ;* 15290 16340 62 ;* 15291 16342 f0: 0 ;* 15292 16344 jl. f1. ;* 15293 16346 rs w0 x3 ;* 15294 16348 rs w1 x3+2 ;* 15295 16350 rs w2 x3+4 ;* 15296 16352 rl. w0 f0. ;* 15297 16354 rs w0 x3+6 ;* 15298 16356 al w0 x3 ;* 15299 16358 al w1 x3+6 ;* 15300 16360 jl. w3 f5. ;* 15301 16362 f1: ;* 15302 16362 e.z. ;*****test62***** 15303 16362 sn w3 0 ; 15304 16364 se w0 (x2+20) ; result(main)=status(main)=0 then 15305 16366 jl. i0. ; begin 15306 16368 jl. w3 u15. ; updated first(mes):= 15307 16370 wa w0 x2+22 ; updated first(mes)+convert to 12-bit(size(main) 15308 16372 rs w0 x2+22 ; 15309 16374 jl. (j0.) ; goto return 15310 16376 ; end result ok 15311 16376 15311 16376 ; after an error in current message 15312 16376 15312 16376 i0: al w3 0 ; current message(subproc):= 0 15313 16378 rs w3 x1+p13 ; end current message 15314 16380 15314 16380 ; not current message 15315 16380 i1: ; 15316 16380 c.p101 b.f1 w. ;*****test63***** 15317 16380 rs. w3 f0. ;* 15318 16382 jl. w3 f4. ;* 15319 16384 63 ;* 15320 16386 f0: 0 ;* 15321 16388 jl. f1. ;* 15322 16390 al w0 x2 ;* 15323 16392 al w1 x2+22 ;* 15324 16394 jl. w3 f5. ;* 15325 16396 f1: ;* 15326 16396 e.z. ;*****test63***** 15327 16396 15327 16396 jl. w3 u7. ; prepare answer 15328 16398 jl. w3 u5. ; get and deliver result 15329 16400 jl. (j0.) ; goto return 15330 16402 15330 16402 j0: 0 ; saved link 15331 16404 15331 16404 e. ; end of test answer output header 15332 16404 \f 15332 16404 ; fpa-subproc common procedures 15333 16404 ; eli, 15.1.1976 15334 16404 15334 16404 ; procedure answer message data received 15335 16404 ; 15336 16404 ; the datablock holding the answer of a message has been received. 15337 16404 ; 15338 16404 ; the message is returned as an answer, with result and status as 15339 16404 ; defined in the preceding header. the other fields in the answer 15340 16404 ; are taken from the datablock (if any). 15341 16404 ; 15342 16404 ; call return 15343 16404 ; w0 undefined 15344 16404 ; w1 subproc unchanged 15345 16404 ; w2 message unchanged 15346 16404 ; w3 link undefined 15347 16404 15347 16404 b. i10, j10 15348 16404 w. 15349 16404 15349 16404 u63: am (x1+a50) ; answer message data received: status(mess):= 15350 16406 rl w0 +p83 ; 15351 16408 ls w0 4 ; status(mon):= status(mes):= 15352 16410 sz. w0 (j0.) ; status(main)<12+ 15353 16412 ba. w0 1 ; if stopped bit then 1<8 15354 16414 ls w0 8 ; 15355 16416 rs w0 g20 ; 15356 16418 rs w0 x2+8 ; 15357 16420 al w0 0 ; 15358 16422 rs w0 g21 ; bytes:= chars:= 0 15359 16424 rs w0 g22 ; 15360 16426 hs w0 x2+9 ; 15361 16428 15361 16428 ; note: link unchanged 15362 16428 15362 16428 jl. u5. ; goto get and deliver result 15363 16430 15363 16430 j0: (:1<12:)<4 ; stopped bit in main status<4 15364 16432 15364 16432 e. ; end of answer message data received 15365 16432 \f 15365 16432 ; fpa-subproc common procedures 15366 16432 ; eli, 15.1.1976 15367 16432 15367 16432 ; procedure attention received 15368 16432 ; 15369 16432 ; a header with function equal to a message type (i.e. attention) has 15370 16432 ; been received. 15371 16432 ; the answer attention-flag is set and the bufferno saved in the 15372 16432 ; state field of the subproc. 15373 16432 ; 15374 16432 ; return will be made to <link+2>. 15375 16432 ; 15376 16432 ; call return 15377 16432 ; w0 undefined 15378 16432 ; w1 subproc unchanged 15379 16432 ; w2 undefined 15380 16432 ; w3 link undefined 15381 16432 15381 16432 b. i10, j10 15382 16432 w. 15383 16432 15383 16432 u64: ; attention received: 15384 16432 al w3 x3+2 ; save link+2 15385 16434 rs. w3 j0. ; 15386 16436 jl. w3 u23. ; testlink 15387 16438 jl. u24. ; error: goto reject 15388 16440 al w0 v71 ; w0:= answer attention flag+bufferno(main) 15389 16442 bz w2 x2+p88 ; 15390 16444 la w2 g53 ; keep only last 8 bits of bufno 15391 16446 lo w0 4 ; 15392 16448 lo w0 x1+p12 ; save in state(subproc) 15393 16450 rs w0 x1+p12 ; 15394 16452 jl. (j0.) ; goto link+2 15395 16454 15395 16454 j0: 0 ; saved link+2 15396 16456 15396 16456 e. ; end of attention received 15397 16456 15397 16456 ; stepping stones: 15398 16456 jl. u14. , u14=k-2 15399 16458 \f 15399 16458 15399 16458 ; fpa-subproc standard types 15400 16458 ; eli, 16.12.1975 15401 16458 15401 16458 b. q20, s10 15402 16458 w. 15403 16458 15403 16458 ; this code handles standard sequential devices with no special 15404 16458 ; actions, such as: 15405 16458 ; 15406 16458 ; paper tape reader 15407 16458 ; paper tape punch 15408 16458 ; line printer 15409 16458 ; card reader 15410 16458 ; etc. 15411 16458 15411 16458 m. 15411 16458 standard links 15412 16458 15412 16458 ; entry point table: 15413 16458 h100: ; general sequential device 15414 16458 h110: ; paper tape reader 15415 16458 h112: ; paper tape punch 15416 16458 h114: ; line printer 15417 16458 h116: ; card reader 15418 16458 h120: ; plotter: 15419 16458 15419 16458 q0 ; after send message 15420 16460 q1 ; before header transmit 15421 16462 q2 ; after header transmit 15422 16464 q3 ; after header received 15423 16466 q4 ; after data received 15424 16468 q5 ; after creation 15425 16470 15425 16470 ; no structure of private part of process description required 15426 16470 \f 15426 16470 ; fpa-subproc standard types 15427 16470 ; eli, 4.11.1975 15428 16470 15428 16470 ; after send message 15429 16470 ; 15430 16470 ; a new message has been received. check that user- or reservation 15431 16470 ; status is ok and link message to queue of subproc. 15432 16470 ; if the subproc is not busy, then link it to mainproc. 15433 16470 ; 15434 16470 ; upon entry: 15435 16470 ; w0 15436 16470 ; w1 subproc 15437 16470 ; w2 15438 16470 ; w3 15439 16470 15439 16470 b. i10, j10 15440 16470 w. 15441 16470 q0: ; after send message: 15442 16470 jl. w3 u4. ; check and link operation 15443 16472 jl. u2. ; goto testmore 15444 16474 15444 16474 e. ; end of after send message 15445 16474 \f 15445 16474 ; fpa-subproc standard types 15446 16474 ; eli, 21.8.1975 15447 16474 15447 16474 ; before header 15448 16474 ; 15449 16474 ; a header (and maybe a corresponding datablock) is to be transmitted. 15450 16474 ; find first non-processed message in queue of subproc and initialize 15451 16474 ; transmit-parameters in mainproc. 15452 16474 ; 15453 16474 ; upon entry: 15454 16474 ; w0 15455 16474 ; w1 subproc 15456 16474 ; w2 15457 16474 ; w3 15458 16474 15458 16474 b. i10, j10 15459 16474 w. 15460 16474 q1: ; before header: 15461 16474 jl. w3 u20. ; test answer attention 15462 16476 jl. w3 u12. ; w2:=mes:= first pending message 15463 16478 sn w2 0 ; if mes=0 then 15464 16480 jl. u3. ; goto no block. 15465 16482 15465 16482 ; message found. initiate transfer 15466 16482 15466 16482 jl. w3 u30. ; prepare transfer 15467 16484 jl (b101) ; goto mainproc return 15468 16486 15468 16486 e. ; end of before header 15469 16486 \f 15469 16486 ; fpa-subproc standard types 15470 16486 ; eli, 21.8.1975 15471 16486 15471 16486 ; after header and data transmitted 15472 16486 ; 15473 16486 ; entered by mainproc, when a header and a corresponding datablock 15474 16486 ; (if any) has been transmitted. 15475 16486 ; the result of the transmission is checked and if an error has 15476 16486 ; occured, the message is returned with result=4 (receiver 15477 16486 ; malfunction). 15478 16486 ; 15479 16486 ; finally the state of the subproc is checked for transmission of a 15480 16486 ; new block. 15481 16486 15481 16486 b. i10, j10 15482 16486 w. 15483 16486 15483 16486 q2: jl. w3 u40. ; after header: test header transmitted 15484 16488 jl. u2. ; error: goto testmore 15485 16490 jl. u2. ; goto testmore 15486 16492 15486 16492 e. ; end of header and data transmitted 15487 16492 \f 15487 16492 ; fpa-subproc standard types 15488 16492 ; eli, 15.1.1976 15489 16492 15489 16492 ; after header received 15490 16492 ; 15491 16492 ; a header has been received. 15492 16492 ; for this kind of subprocs (with no special actions) it can 15493 16492 ; only specify the functions <answer input with data> or 15494 16492 ; <answer message with data>. 15495 16492 ; 15496 16492 ; upon entry: 15497 16492 ; w0 15498 16492 ; w1 subproc 15499 16492 ; w2 15500 16492 ; w3 15501 16492 15501 16492 b. i10, j10 15502 16492 w. 15503 16492 15503 16492 q3: jl. w3 u50. ; after header received: test answer header 15504 16494 jl. u2. ; goto testmore 15505 16496 15505 16496 e. ; end of after header received 15506 16496 \f 15506 16496 ; fpa-subproc standard types 15507 16496 ; eli, 15.1.1976 15508 16496 15508 16496 ; after data received 15509 16496 ; 15510 16496 ; check transmission. 15511 16496 ; 15512 16496 ; upon entry: 15513 16496 ; w0 15514 16496 ; w1 subproc 15515 16496 ; w2 15516 16496 ; w3 15517 16496 15517 16496 b. i10, j10 15518 16496 w. 15519 16496 15519 16496 q4: jl. w3 u60. ; after data received: test data received 15520 16498 jl. u2. ; goto testmore 15521 16500 15521 16500 ; attention. no special action 15522 16500 15522 16500 jl. u2. ; goto testmore 15523 16502 15523 16502 e. ; end of data received 15524 16502 \f 15524 16502 ; fpa-subproc standard types 15525 16502 ; eli, 16.12.1975 15526 16502 15526 16502 ; after create 15527 16502 ; 15528 16502 ; the subproc has just been created. 15529 16502 ; no special action 15530 16502 ; 15531 16502 ; upon entry: 15532 16502 ; w0 15533 16502 ; w1 subproc 15534 16502 ; w2 15535 16502 ; w3 15536 16502 15536 16502 b. i10, j10 15537 16502 w. 15538 16502 15538 16502 q5: ; after create: 15539 16502 jl (b101) ; goto return 15540 16504 15540 16504 e. ; end of after create 15541 16504 15541 16504 e. ; end of standard types 15542 16504 \f 15542 16504 ; fpa-subproc terminals 15543 16504 ; eli, 20.1.1976 15544 16504 15544 16504 c.(:a80>12a.1:)-1 ; if terminal bit then include: 15545 16504 15545 16504 b. q20, s20 15546 16504 w. 15547 16504 15547 16504 ; this code takes care of special actions (such as <to>, <from>, 15548 16504 ; <attention> etc.) needed for terminals connected as subprocesses. 15549 16504 15549 16504 m. 15549 16504 terminal link 15550 16504 15550 16504 ; entry point table: 15551 16504 15551 16504 h108: q0 ; after send message 15552 16506 q1 ; before header transmit 15553 16508 q2 ; after header transmit 15554 16510 q3 ; before data receive 15555 16512 q4 ; after data receive 15556 16514 q5 ; after create 15557 16516 15557 16516 ; definition of local part of subproc 15558 16516 15558 16516 b. j0 15559 16516 w. 15560 16516 15560 16516 s0=p0 ; start of local area 15561 16516 j0=s0 ; save start 15562 16516 15562 16516 s5= s0 ; <special actions mask> (1 byte) 15563 16516 s6= s0+1, s0=s0+2 ; <special action selected> (1 byte) 15564 16516 s7= s0+1, s0=s0+2 ; <bufclaim> note: position fixed. required 15565 16516 ; by regretted message. 15566 16516 15566 16516 s1= s0 ; <1st word of user name> 15567 16516 s2= s0+2 ; <2nd - - - -< 15568 16516 s3= s0+4 ; <3rd - - - - > 15569 16516 s4= s0+6, s0=s0+8 ; <4th - - - - > 15570 16516 15570 16516 ; test for size of private part not exceeded 15571 16516 15571 16516 c. (:s0-j0-v1-1:) ; v1= max size allowed for private part 15572 16516 m. fpa terminal: private part too long 15573 16516 z. 15574 16516 e. ; end of definition of private part 15575 16516 15575 16516 ; maskbits in <special actions mask> 15576 16516 15576 16516 s10= 2.0001 ; output <:att:> 15577 16516 s11= 2.0010 ; input name 15578 16516 s12= 2.0100 ; output <:unknown:> 15579 16516 s13= 2.1000 ; output name 15580 16516 \f 15580 16516 ; fpa-subproc terminals 15581 16516 ; eli, 15.1.1976 15582 16516 15582 16516 ; after send message 15583 16516 ; 15584 16516 ; a new message has been received. 15585 16516 ; check accessrights and (if ok) link the message into the queue 15586 16516 ; of pending messages. if subproc is not busy, then link subproc 15587 16516 ; in queue of mainproc for later activation. 15588 16516 ; 15589 16516 ; upon entry: 15590 16516 ; w0 15591 16516 ; w1 subproc 15592 16516 ; w2 15593 16516 ; w3 15594 16516 15594 16516 b. i10, j10 15595 16516 w. 15596 16516 15596 16516 q0: ; after send message: 15597 16516 jl. w3 u4. ; check and link operation 15598 16518 jl. u2. ; goto testmore 15599 16520 15599 16520 e. ; end of after send message 15600 16520 \f 15600 16520 ; fpa-subproc terminals 15601 16520 ; eli, 15.1.1976 15602 16520 15602 16520 ; before header 15603 16520 ; 15604 16520 ; the subproc has been activated by mainproc for transmission 15605 16520 ; of a header and maybe an associated datablock 15606 16520 ; 15607 16520 ; first pending special actions such as <answer attention>, 15608 16520 ; output of user name etc. will be processed. 15609 16520 ; 15610 16520 ; then the messagequeue of the subproc is examined for a pending 15611 16520 ; message and if none is found return is made to mainproc with a 15612 16520 ; <no block>-status 15613 16520 ; 15614 16520 ; if an input- or output message is found the name of the sending 15615 16520 ; process is output first, if it is different from <user name>, 15616 16520 ; i.e. the name of the last sending process. 15617 16520 ; 15618 16520 ; otherwise standard transmission of the message is initiated. 15619 16520 ; 15620 16520 ; upon entry: 15621 16520 ; w0 15622 16520 ; w1 subproc 15623 16520 ; w2 15624 16520 ; w3 15625 16520 15625 16520 b. i30, j20 15626 16520 w. 15627 16520 15627 16520 q1: ; before header: 15628 16520 jl. w3 u20. ; test answer attention 15629 16522 15629 16522 ; no answer attention pending. 15630 16522 ; test for pending special actions 15631 16522 15631 16522 bz w0 x1+s5 ; if special actions mask(subproc)<>0 then 15632 16524 sz w0 s10+s11+s12+s13; 15633 16526 jl. q10. ; goto find special action 15634 16528 15634 16528 jl. w3 u12. ; mes:= find first message 15635 16530 sn w2 0 ; if mes=0 then 15636 16532 jl. u3. ; goto no block 15637 16534 15637 16534 ; message found. test for input or output 15638 16534 15638 16534 bz w0 x2+8 ; oper:= operation(mes) 15639 16536 se w0 3 ; if oper=input or output then 15640 16538 sn w0 5 ; 15641 16540 jl. i1. ; 15642 16542 jl. i4. ; begin 15643 16544 15643 16544 ; test username 15644 16544 15644 16544 i1: rs. w0 j0. ; save operation 15645 16546 rl w2 x2+6 ; if name(sender(mes))<>user name(subproc) then 15646 16548 dl w0 x2+a11+2 ; 15647 16550 sn w3 (x1+s1) ; 15648 16552 se w0 (x1+s2) ; 15649 16554 jl. i2. ; 15650 16556 dl w0 x2+a11+6 ; 15651 16558 sn w3 (x1+s3) ; 15652 16560 se w0 (x1+s4) ; 15653 16562 jl. i3. ; 15654 16564 jl. i4. ; begin 15655 16566 i2: ds w0 x1+s2 ; user name(subproc):= name(sender(mes)) 15656 16568 dl w0 x2+a11+6 ; 15657 16570 i3: ds w0 x1+s4 ; 15658 16572 15658 16572 ; the text <:to:> or <:from:> followed by the name of the 15659 16572 ; sender should be output before the message itself 15660 16572 15660 16572 al w0 s13 ; special action(subproc):= output name 15661 16574 hs w0 x1+s5 ; 15662 16576 al w0 v72 ; special messages(state(subproc)):= true 15663 16578 lo w0 x1+p12 ; 15664 16580 rs w0 x1+p12 ; 15665 16582 rl. w0 j0. ; goto if saved operation=output then 15666 16584 se w0 3 ; output(FROM) else 15667 16586 am i17 ; output(to) 15668 16588 jl. i14. ; end name<>user 15669 16590 ; end input or output 15670 16590 15670 16590 ; prepare normal message and (maybe) datablock 15671 16590 15671 16590 i4: rl w2 b18 ; mes:= current message(monitor) 15672 16592 jl. w3 u30. ; prepare transfer 15673 16594 jl (b101) ; goto mainproc return 15674 16596 15674 16596 j0: 0 ; saved operation 15675 16598 15675 16598 ; the following table is used to select special actions 15676 16598 ; 15677 16598 ; - the first byte holds a bit to be tested against the <special 15678 16598 ; actions mask> 15679 16598 ; - the second byte holds the relative address of the action (relative to i10) 15680 16598 ; of the action to be performed if the bit is set 15681 16598 ; 15682 16598 ; note, that the ordering of the entries is important. it describes 15683 16598 ; (as an example) that the text <:att:> should be otuput 15684 16598 ; before the name is read in 15685 16598 15685 16598 i10: h. 15686 16598 s12, i16. ; unknown 15687 16600 s10, i13. ; attention 15688 16602 s11, i19. ; input name 15689 16604 s13, i18. ; output name 15690 16606 w. 15691 16606 15691 16606 q10: ; find special action: 15692 16606 al. w3 i10. ; w0 holds special actions mask 15693 16608 jl. i12. ; 15694 16610 i11: al w3 x3+2 ; find entry with bit set in special actions mask 15695 16612 i12: bz w2 x3 ; 15696 16614 so w0 x2 ; 15697 16616 jl. i11. ; 15698 16618 15698 16618 ; w3 points to entry 15699 16618 15699 16618 hs w2 x1+s6 ; save action selected 15700 16620 ba w3 x3+1 ; 15701 16622 jl x3+1 ; goto action 15702 16624 15702 16624 ; table of special texts 15703 16624 ; first word holds length of following text in 8-bit characters 15704 16624 15704 16624 j16: i20, <:<10>att<32>:>, i20=(:k-j16-2:)/2*3 15705 16630 j17: i21, <:<10>to<32>:>, i21=(:k-j17-2:)/2*3 15706 16636 j18: i22, <:<10>from<32>:>, i22=(:k-j18-2:)/2*3 15707 16642 j19: i23, <:unknown<10>:>, i23=(:k-j19-2:)/2*3 15708 16650 15708 16650 i13: am j16-j17 ; text:= att or 15709 16652 i14: am j17-j18 ; to or 15710 16654 i15: am j18-j19 ; from or 15711 16656 i16: al. w2 j19. ; unknown 15712 16658 i17=i15-i14 15713 16658 15713 16658 ; w2 points in table above 15714 16658 15714 16658 rl w3 x1+a50 ; main:= mainproc(subproc) 15715 16660 c. p103-1 15716 16660 al w0 2 ; addresscode(main):= driver area 15717 16662 hs w0 x3+p72 ; 15718 16664 z. 15719 16664 al w0 x2+2 ; first(main):= first(text) 15720 16666 rs w0 x3+p65 ; 15721 16668 rl w0 x2 ; data size(main):= header size(main):= 15722 16670 rs w0 x3+p66 ; size(text) 15723 16672 rs w0 x3+p64 ; 15724 16674 al w0 v52+(:1<0:); function(main):= output+databit 15725 16676 hs w0 x3+p61 ; 15726 16678 la w0 g50 ; store even function in messagetable 15727 16680 15727 16680 ; set rest 15728 16680 ; 15729 16680 ; initiate standard parameters in mainproc 15730 16680 ; 15731 16680 ; upon entry: 15732 16680 ; w0 value to store in message table(subproc, bufno) 15733 16680 ; w1 subproc 15734 16680 ; w2 15735 16680 ; w3 15736 16680 15736 16680 q11: jl. w3 u9. ; set rest: message table(subproc,bufno):= w0 15737 16682 rs w0 x2 ; 15738 16684 al w0 -1 ; decrease(free buffers(subproc)) 15739 16686 ba w0 x1+p16 ; 15740 16688 hs w0 x1+p16 ; 15741 16690 jl. w3 u25. ; set linkparams 15742 16692 15742 16692 jl (b101) ; goto mainproc return 15743 16694 15743 16694 ; initiate output of user name 15744 16694 ; 15745 16694 ; note: during transmission a newline character (value=10) is 15746 16694 ; inserted as the 12th character in the user name. 15747 16694 ; it is removed again after transmission. 15748 16694 15748 16694 i18: al w0 10 ; last character(user name(subproc)):= 10 15749 16696 lo w0 x1+s4 ; 15750 16698 rs w0 x1+s4 ; 15751 16700 c. p103-1 15752 16700 rl w3 x1+a50 ; main:= main(subproc) 15753 16702 al w0 8 ; addresscode(main):= dirty 15754 16704 hs w0 x3+p72 ; 15755 16706 al w0 0 ; messagebuf(main):= 0 (no buf.) 15756 16708 rs w0 x3+p71 ; 15757 16710 z. 15758 16710 al w0 v52+(:1<0:); function:= output+databit 15759 16712 jl. i5. ; 15760 16714 15760 16714 ; initiate input of user name 15761 16714 15761 16714 i19: al w0 v70 ; blocked(subproc):= true 15762 16716 lo w0 x1+p12 ; 15763 16718 rs w0 x1+p12 ; 15764 16720 al w0 v50 ; function:= input 15765 16722 i5: ; 15766 16722 rl w3 x1+a50 ; main:= mainproc(subproc) 15767 16724 hs w0 x3+p61 ; function(main):= function selected 15768 16726 al w2 8/2*3 ; size:= size of user name 15769 16728 rs w2 x3+p64 ; header size(main):= size 15770 16730 so w0 2.1 ; if even(function) then size:= 0 15771 16732 al w2 0 ; 15772 16734 rs w2 x3+p66 ; data size(main):= size 15773 16736 al w0 x1+s1 ; first(main):= first of user name(subproc) 15774 16738 rs w0 x3+p65 ; 15775 16740 15775 16740 ; store function selected in message table as special flag 15776 16740 15776 16740 bz w0 x3+p61 ; w0:= even function(main) 15777 16742 la w0 g50 ; 15778 16744 jl. q11. ; goto set rest 15779 16746 15779 16746 e. ; end of before header 15780 16746 \f 15780 16746 ; fpa-subproc terminals 15781 16746 ; eli, 16.1.1976 15782 16746 15782 16746 ; after header and data transmitted 15783 16746 ; 15784 16746 ; a header and maybe a datablock has been transmitted 15785 16746 ; 15786 16746 ; if the <special action selected>-flag is nonzero it is used 15787 16746 ; to clear a bit in the <special actions mask>. if this thereby 15788 16746 ; becomes zero the <special messages> flag in the state-field of 15789 16746 ; the subproc is cleared 15790 16746 ; 15791 16746 ; upon entry: 15792 16746 ; w0 15793 16746 ; w1 subproc 15794 16746 ; w2 15795 16746 ; w3 15796 16746 15796 16746 b. i10, j10 15797 16746 w. 15798 16746 15798 16746 q2: ; after header: 15799 16746 jl. w3 u40. ; test header and data transmitted 15800 16748 jl. u2. ; error: goto testmore 15801 16750 al w3 -1 ; 15802 16752 bs w3 x1+s6 ; if special action selected(subproc)=0 or 15803 16754 am (x1+a50) ; transmission state(mainproc)<>0 then 15804 16756 bz w0 +p60 ; 15805 16758 se w3 -1 ; 15806 16760 se w0 0 ; 15807 16762 jl. u2. ; goto testmore 15808 16764 bz w0 x1+s5 ; remove bit in special actions mask(subproc) 15809 16766 la w0 6 ; 15810 16768 hs w0 x1+s5 ; 15811 16770 al w3 0 ; special action selected(subproc):= 0 15812 16772 hs w3 x1+s6 ; 15813 16774 al w2 (:-1:)<8 ; last char(username(subproc)):= 0 15814 16776 la w2 x1+s4 ; 15815 16778 rs w2 x1+s4 ; 15816 16780 se w0 0 ; if special actions mask(subproc)<>0 then 15817 16782 jl. u2. ; goto testmore 15818 16784 al w0 -1-v72 ; remove special message flag 15819 16786 la w0 x1+p12 ; 15820 16788 rs w0 x1+p12 ; 15821 16790 jl. u2. ; goto testmore 15822 16792 15822 16792 e. ; end of after header 15823 16792 \f 15823 16792 ; fpa-subproc terminals 15824 16792 ; eli, 15.1.1976 15825 16792 15825 16792 ; before data receive 15826 16792 ; 15827 16792 ; activated, when a header which will be followed by a datablock has been 15828 16792 ; received 15829 16792 ; 15830 16792 ; upon entry: 15831 16792 ; w0 15832 16792 ; w1 subproc 15833 16792 ; w2 15834 16792 ; w3 15835 16792 15835 16792 b. i10, j10 15836 16792 w. 15837 16792 15837 16792 q3: ; before data receive: 15838 16792 jl. w3 u50. ; test answer header 15839 16794 15839 16794 ; return to <link>: normal function 15840 16794 ; return will only be made if the datablock could not be 15841 16794 ; received (sender stopped etc.) 15842 16794 15842 16794 jl. u2. ; goto testmore 15843 16796 15843 16796 ; return to <link+2>: special function 15844 16796 ; can only be input of attention name 15845 16796 ; note: if only a single character has been received and result and 15846 16796 ; status is ok (=0) then a newline character must have been 15847 16796 ; typed alone. in that case the datablock is skipped 15848 16796 ; and the current name used. 15849 16796 15849 16796 rl w3 x1+a50 ; main:= mainproc(subproc) 15850 16798 al w0 8 ; address code(main):= dirty 15851 16800 hs w0 x3+p92 ; 15852 16802 c. p103-1 15853 16802 al w0 0 ; messagebuf(main):= 0 (no buf) 15854 16804 rs w0 x3+p91 ; 15855 16806 z. 15856 16806 al w0 x1+s1 ; first(main):= first of user name(subproc) 15857 16808 rs w0 x3+p85 ; 15858 16810 rl w0 x3+p84 ; size8:= 15859 16812 rs w0 x3+p86 ; data size(main):= header size(main) 15860 16814 bl w2 x3+p82 ; if size8<>1 or 15861 16816 ba w2 x3+p83+1 ; 15862 16818 sn w0 1 ; result(main)<>0 or status(main,0:11)<>0 then 15863 16820 se w2 0 ; 15864 16822 jl (b101) ; goto mainproc return 15865 16824 al w0 p162 ; skip(main):= true 15866 16826 hs w0 x3+p80 ; 15867 16828 jl. w3 u11. ; clear message entry 15868 16830 al w0 -1-v70 ; 15869 16832 la w0 x1+p12 ; blocked(subproc):= false 15870 16834 rs w0 x1+p12 ; 15871 16836 jl. q15. ; goto attention name ready 15872 16838 15872 16838 e. ; end of before data 15873 16838 \f 15873 16838 ; fpa-subproc terminals 15874 16838 ; eli, 15.1.1976 15875 16838 15875 16838 ; after data received 15876 16838 ; 15877 16838 ; activated, when a header without data or a datablock following a 15878 16838 ; header has been received 15879 16838 ; 15880 16838 ; upon entry: 15881 16838 ; w0 15882 16838 ; w1 subproc 15883 16838 ; w2 15884 16838 ; w3 15885 16838 15885 16838 b. i10, j10 15886 16838 w. 15887 16838 15887 16838 q4: ; after data received: 15888 16838 jl. w3 u60. ; test data received 15889 16840 15889 16840 ; return to <link>: normal function 15890 16840 15890 16840 jl. u2. ; goto testmore 15891 16842 15891 16842 ; return to <link+2>: attention 15892 16842 15892 16842 jl. q12. ; goto attention received 15893 16844 15893 16844 ; return to <link+4>: special function received 15894 16844 ; a special text (unknown, to, from, att) has been output or 15895 16844 ; an attention name has been read in. 15896 16844 15896 16844 sn w2 v50 ; goto if message entry(bufno)=input then 15897 16846 jl. q13. ; attention name received else 15898 16848 jl. u2. ; testmore 15899 16850 15899 16850 e. ; end of after data received 15900 16850 \f 15900 16850 ; fpa-subproc terminals 15901 16850 ; eli, 15.1.1976 15902 16850 15902 16850 ; attention received 15903 16850 ; 15904 16850 ; an attention message has been received. 15905 16850 ; check reserverstatus of subproc and, if not reserved initiate 15906 16850 ; input of name. 15907 16850 ; 15908 16850 15908 16850 b. i10, j10 15909 16850 w. 15910 16850 15910 16850 q12: ; attention: 15911 16850 rl w0 x1+a52 ; if reserved(subproc)<>0 then 15912 16852 sn w0 0 ; begin comment: find reserver 15913 16854 jl. i2. ; 15914 16856 rl w3 b6 ; entry:= first internal in name table 15915 16858 jl. i1. ; 15916 16860 i0: al w3 x3+2 ; while idbit(proc(entry))<>reserver(subproc) do 15917 16862 i1: rl w2 x3 ; entry:= entry+2 15918 16864 se w0 (x2+a14) ; 15919 16866 jl. i0. ; 15920 16868 jl. q14. ; goto process found 15921 16870 ; end reserved<>0 15922 16870 15922 16870 ; prepare subproc to print text <:att:> and read in name 15923 16870 15923 16870 i2: al w0 s10+s11 ; special actions mask(subproc):= output(att), 15924 16872 hs w0 x1+s5 ; input(name) 15925 16874 al w0 v72 ; special messages(subproc):= true 15926 16876 lo w0 x1+p12 ; 15927 16878 rs w0 x1+p12 ; 15928 16880 jl. u2. ; goto testmore 15929 16882 15929 16882 e. ; end of attention received 15930 16882 \f 15930 16882 ; fpa-subproc terminals 15931 16882 ; eli, 22.1.1976 15932 16882 15932 16882 ; attention name received 15933 16882 ; 15934 16882 ; any error status cause the text <:unknown:> to be output 15935 16882 ; 15936 16882 ; otherwise the terminating newline is removed and the 15937 16882 ; name searched for 15938 16882 15938 16882 b. i10, j10 15939 16882 w. 15940 16882 15940 16882 q13: ; attention name: 15941 16882 rl w3 x1+a50 ; main:= mainproc(subproc) 15942 16884 bl w2 x3+p82 ; 15943 16886 ba w2 x3+p83+1 ; 15944 16888 se w2 0 ; if status(main, 0:11)=result(main)=0 then 15945 16890 jl. i0. ; begin 15946 16892 rl w3 x3+p84 ; if size(main)=0 then 15947 16894 sn w3 0 ; goto testmore 15948 16896 jl. u2. ; mask of last received character with value=10 15949 16898 al w3 x3-1 ; 15950 16900 wd. w3 j1. ; note: w2 already zero 15951 16902 ls w3 1 ; index:= (size-1)//3*2 15952 16904 ls w2 3 ; position:= -((size-1) mod 3*8) 15953 16906 ac w2 x2 ; 15954 16908 rl. w0 j0. ; mask:= newline shift position 15955 16910 as w0 x2 ; 15956 16912 am x3 ; address:= first of user name(subproc)+index 15957 16914 al w3 x1+s1 ; 15958 16916 la w0 x3 ; 15959 16918 i1: rs w0 x3 ; 15960 16920 al w0 0 ; rest of user name(subproc):= 0 15961 16922 al w3 x3+2 ; 15962 16924 sh w3 x1+s4 ; 15963 16926 jl. i1. ; 15964 16928 15964 16928 ; now a terminating newline has been replaced by a zero 15965 16928 ; search for process 15966 16928 15966 16928 q15: ; attention name ready: 15967 16928 al w2 x1+s1 ; search name(user,entry,interval(subproc)) 15968 16930 dl w1 x1+a49 ; 15969 16932 jl w3 d71 ; 15970 16934 rl w1 b19 ; 15971 16936 sn w3 (b7) ; if entry= name table end then goto unknown 15972 16938 jl. i0. ; 15973 16940 rl w2 x3 ; if kind(entry)<>internal or pseudoproc then 15974 16942 rl w0 x2+a10 ; goto unknown 15975 16944 se w0 64 ; goto process found 15976 16946 sn w0 0 ; 15977 16948 jl. q14. ; end 15978 16950 15978 16950 ; prepare subproc to output the text <:unknown:> 15979 16950 15979 16950 i0: al w0 s12 ; special actions mask(subproc):= output(unknown) 15980 16952 hs w0 x1+s5 ; 15981 16954 al w0 v72 ; special messages(subprocstate):= true 15982 16956 lo w0 x1+p12 ; 15983 16958 rs w0 x1+p12 ; 15984 16960 jl. u2. ; goto testmore 15985 16962 15985 16962 j0: (:-1-10:)<16 ; mask to remove newline 15986 16964 j1: 3 ; division constant 15987 16966 15987 16966 e. ; end of attention name 15988 16966 \f 15988 16966 ; fpa-subproc terminals 15989 16966 ; eli, 15.1.1976 15990 16966 15990 16966 ; process found 15991 16966 ; 15992 16966 ; clear message queue and deliver attention message 15993 16966 ; 15994 16966 ; upon entry: 15995 16966 ; w0 15996 16966 ; w1 subproc 15997 16966 ; w2 15998 16966 ; w3 name table addr. of receiver of attention buffer 15999 16966 15999 16966 b. i10, j10 16000 16966 w. 16001 16966 16001 16966 q14: ; process found: 16002 16966 rs. w3 j1. ; save name table address 16003 16968 rl w2 b8+4 ; mes:= first message 16004 16970 jl. i1. ; 16005 16972 i0: al w2 x2+a6 ; while sender(mes)<>subproc do 16006 16974 sl w2 (b8+6) ; 16007 16976 jl. i2. ; 16008 16978 i1: se w1 (x2+6) ; mes:= next(mes) 16009 16980 jl. i0. ; 16010 16982 16010 16982 ; regret message found. 16011 16982 ; note: will increase buffer claim by one 16012 16982 16012 16982 jl w3 d75 ; regretted message(mes) 16013 16984 i2: rl. w3 (j1.) ; 16014 16986 rl w0 x3+a14 ; if receiver is user of hostproc(subproc) 16015 16988 am (x1+a50) ; then receiver is made user of subproc 16016 16990 la w0 +a53+p202 ; 16017 16992 lo w0 x1+a53 ; 16018 16994 la w0 g65 ; 16019 16996 rs w0 x1+a53 ; 16020 16998 rl. w3 j0. ; 16021 17000 al w0 0 ; attention message 16022 17002 ds w0 g21 ; +0 : 1<16 16023 17004 al w3 0 ; +2 : 0 16024 17006 rl. w0 j1. ; +4 : 0 16025 17008 ds w0 g23 ; +6 : proc desc(sub) 16026 17010 dl w0 x1+a11+2 ; +8 : name(sub) 16027 17012 ds w0 g40 ; +10 : - 16028 17014 dl w0 x1+a12+2 ; +12 : - 16029 17016 ds w0 g42 ; +14 : - 16030 17018 jl. i4. ; for mes:= first pending(subproc) while mes<>0 do 16031 17020 i3: jl w3 g18 ; deliver result(1,mes,intervention) 16032 17022 i4: jl. w3 u22. ; 16033 17024 se w2 0 ; 16034 17026 jl. i3. ; 16035 17028 16035 17028 ; get message and deliver it 16036 17028 16036 17028 rl. w3 j1. ; w3:= name table addr. of receiver 16037 17030 jd 1<11+16 ; send message(w1=sender, w3=name table of rec.) 16038 17032 16038 17032 ; end of attention 16039 17032 16039 17032 jl. u2. ; goto testmore 16040 17034 16040 17034 j0: 1<16 ; attention status 16041 17036 j1: 0 ; saved message or process 16042 17038 16042 17038 e. ; end of process found 16043 17038 \f 16043 17038 ; fpa-subproc terminals 16044 17038 ; eli, 16.12.1975 16045 17038 16045 17038 ; after create 16046 17038 ; 16047 17038 ; the subproc has just been created. 16048 17038 ; 16049 17038 ; upon entry: 16050 17038 ; w0 16051 17038 ; w1 subproc 16052 17038 ; w2 16053 17038 ; w3 16054 17038 16054 17038 b. i10, j10 16055 17038 w. 16056 17038 16056 17038 q5: ; after create: 16057 17038 al w0 0 ; user name(subproc,0):= 0 16058 17040 rs w0 x1+s1 ; action selected(subproc):= 16059 17042 rs w0 x1+s6 ; action mask(subproc):= 0 16060 17044 jl (b101) ; goto return 16061 17046 16061 17046 e. ; end of after create 16062 17046 16062 17046 e. ; end of terminals 16063 17046 16063 17046 z. ; 16064 17046 16064 17046 h108=h100 16065 17046 \f 16065 17046 16065 17046 ; fpa-subproc magnetic tape 16066 17046 ; eli, 4.11.1975 16067 17046 16067 17046 c.(:a80>13a.1:)-1 ; if magtape bit then include: 16068 17046 16068 17046 b. q20, s10 16069 17046 w. 16070 17046 16070 17046 ; this code takes care of special actions for magnetic tapes, 16071 17046 ; connected to rc4000 through a devicecontroler 16072 17046 16072 17046 m. 16072 17046 magnetic tape link 16073 17046 16073 17046 ; entry point table: 16074 17046 16074 17046 h118: q0 ; after send message 16075 17048 q1 ; before header transmit 16076 17050 q2 ; after header transmit 16077 17052 q3 ; after header received 16078 17054 q4 ; after data received 16079 17056 q5 ; after create 16080 17058 16080 17058 ; definition of local part of subproc 16081 17058 16081 17058 b. j0 16082 17058 w. 16083 17058 16083 17058 s0=p0 ; start of local area 16084 17058 j0=s0 ; save start 16085 17058 16085 17058 s1= s0, s0=s0+2 ; <state> 16086 17058 s2= s0, s0=s0+2 ; <file count> 16087 17058 s3= s0, s0=s0+2 ; <block count> 16088 17058 s5= s0, s0=s0+2 ; <last status> 16089 17058 s0=s0+2 ; one unused word 16090 17058 s4= s0, s0=s0+2 ; <remoter proc> 16091 17058 16091 17058 ; test for size of private part not exceeded 16092 17058 16092 17058 c.(:s0-j0-v1-1:) ; v1= max. size of private part 16093 17058 m. fpa magnetic tape: private part too long 16094 17058 z. 16095 17058 e. ; end of definition of local part 16096 17058 \f 16096 17058 ; fpa-subproc magnetic tape 16097 17058 ; eli, 12.9.1975 16098 17058 16098 17058 ; after send message 16099 17058 ; 16100 17058 ; a new message has been received. 16101 17058 ; check message and link it to queue of subproc. 16102 17058 ; if subproc is free, then link it to mainproc. 16103 17058 ; 16104 17058 ; upon entry: 16105 17058 ; w0 16106 17058 ; w1 subproc 16107 17058 ; w2 16108 17058 ; w3 16109 17058 16109 17058 b. i10, j10 16110 17058 w. 16111 17058 16111 17058 q0: jl. w3 u4. ; after send message: check and link operation 16112 17060 al w0 0 ; state(magnetic tape):= 0 16113 17062 rs w0 x1+s1 ; 16114 17064 rl w2 b18 ; 16115 17066 bz w0 x2+8 ; oper:= operation(mes) 16116 17068 sn w0 5 ; if oper<>output then 16117 17070 jl. i0. ; 16118 17072 jl. u2. ; goto testmore 16119 17074 i0: al w3 1 ; sizeminus1:= 16120 17076 wa w3 x2+12 ; last(mes)-first(mes)+1 16121 17078 ws w3 x2+10 ; if sizeminus1>=maxsize(subproc) then 16122 17080 sl w3 (x1+p18) ; 16123 17082 jl g5 ; goto result 3 16124 17084 jl. u2. ; goto testmore 16125 17086 16125 17086 e. ; end of after send message 16126 17086 \f 16126 17086 ; fpa-subproc magnetic tape 16127 17086 ; eli, 15.1.1976 16128 17086 16128 17086 ; before header 16129 17086 ; 16130 17086 ; examine the message-queue of the subproc for a pending message. 16131 17086 ; if none is found return to mainproc with <no block>-status. 16132 17086 ; 16133 17086 ; otherwise initialize the mainproc sender table for transmission 16134 17086 ; of a header and maybe a datablock. 16135 17086 ; 16136 17086 ; upon entry: 16137 17086 ; w0 16138 17086 ; w1 subproc 16139 17086 ; w2 16140 17086 ; w3 16141 17086 16141 17086 b. i10, j10 16142 17086 w. 16143 17086 16143 17086 q1: ; before header: 16144 17086 jl. w3 u20. ; test answer attention 16145 17088 jl. w3 u12. ; mes:= find first message(subproc) 16146 17090 sn w2 0 ; if mes=0 then 16147 17092 jl. u3. ; goto no block 16148 17094 bz w0 x2+8 ; 16149 17096 so w0 2.1 ; if odd operation then 16150 17098 jl. j0. ; examine sender(mess); 16151 17100 jl w3 g34 ; stopped: goto stopped; 16152 17102 jl. j1. ; ok: 16153 17104 16153 17104 j0: jl. w3 u30. ; prepare transfer 16154 17106 16154 17106 al w0 0 ; current message(subproc):= 0 16155 17108 rs w0 x1+p13 ; 16156 17110 16156 17110 ; the stop count of the sender will be increased at 16157 17110 ; this point for input messages, thus assuring that the sender has not been 16158 17110 ; stopped when the datablock arrives. 16159 17110 16159 17110 bz w0 x2+8 ; if oper(mes)<>input then 16160 17112 se w0 3 ; 16161 17114 jl (b101) ; goto mainproc return 16162 17116 jl. w3 u21. ; test and increase stop count 16163 17118 jl. u3. ; stopped: goto no block 16164 17120 jl (b101) ; ok: goto mainproc return 16165 17122 j1: rl w0 x1+s5 ; stopped: 16166 17124 rs w0 g20 ; status(mess):=saved status(sub); 16167 17126 ld w0 -100 ; 16168 17128 ds w0 g22 ; bytes, chars trf(mess):=0,0; 16169 17130 dl w0 x1+s3 ; file,block count(mess):=saved file, block count(sub); 16170 17132 ds w0 g24 ; 16171 17134 jl w3 g18 ; deliver result1; 16172 17136 jl. u3. ; goto no block; 16173 17138 16173 17138 e. ; end of before header 16174 17138 \f 16174 17138 ; fpa-subproc magnetic tape 16175 17138 ; eli, 15.1.1976 16176 17138 16176 17138 ; after header transmitted 16177 17138 ; 16178 17138 ; a header and maybe a datablock has been transmitted. 16179 17138 ; 16180 17138 ; transmission is checked 16181 17138 ; 16182 17138 ; upon entry 16183 17138 ; w0 16184 17138 ; w1 subproc 16185 17138 ; w2 16186 17138 ; w3 16187 17138 16187 17138 b. i10, j10 16188 17138 w. 16189 17138 16189 17138 q2: ; after header transmit: 16190 17138 jl. w3 u40. ; test header and data transmitted 16191 17140 jl. u2. ; error: goto testmore 16192 17142 jl. u2. ; goto testmore 16193 17144 16193 17144 e. ; end of header transmitted 16194 17144 \f 16194 17144 ; fpa-subproc magnetic tape 16195 17144 ; eli, 15.1.1976 16196 17144 16196 17144 ; after header received 16197 17144 ; 16198 17144 ; a header has been received. 16199 17144 ; the function of the header may be 16200 17144 ; 16201 17144 ; <answer input with data> or <answer message with data> 16202 17144 ; 16203 17144 ; upon entry: 16204 17144 ; w0 16205 17144 ; w1 subproc 16206 17144 ; w2 16207 17144 ; w3 16208 17144 16208 17144 b. i10, j10 16209 17144 w. 16210 17144 q3: ; before data receive: 16211 17144 jl. w3 u50. ; test answer header 16212 17146 jl. u2. ; goto testmore 16213 17148 16213 17148 e. ; end of after header received 16214 17148 \f 16214 17148 ; fpa-subproc magnetic tape 16215 17148 ; eli, 5.11.1975 16216 17148 16216 17148 ; after data received 16217 17148 ; 16218 17148 ; a datablock following a header has been received. 16219 17148 ; 16220 17148 ; first adjust the position of the tape described in <file count> 16221 17148 ; and <block count>. 16222 17148 ; 16223 17148 ; then check transmission in standard way 16224 17148 ; 16225 17148 ; upon entry 16226 17148 ; w0 16227 17148 ; w1 subproc 16228 17148 ; w2 16229 17148 ; w3 16230 17148 16230 17148 b. i10, j10 16231 17148 w. 16232 17148 16232 17148 q4: jl. w3 q10. ; after data received: adjust position 16233 17150 jl. w3 u60. ; test data received 16234 17152 jl. u2. ; goto testmore 16235 17154 16235 17154 ; <link+2>: attention received 16236 17154 ; find remoterprocess, if any 16237 17154 16237 17154 rl w0 (b3) ; remoter:= first in name table 16238 17156 rs w0 x1+s4 ; 16239 17158 jl. w3 q11. ; clear queue(state:= 2) 16240 17160 i0: rl w3 x1+s4 ; next: 16241 17162 rl w2 x3+a54 ; rem:= remoter(subproc); mes:= first mes(rem) 16242 17164 se w3 0 ; if rem=0 or empty(mes) then 16243 17166 sn w2 x3+a54 ; 16244 17168 jl. u2. ; goto testmore 16245 17170 rs w2 b18 ; current buf:= mes 16246 17172 al w0 0 ; 16247 17174 ds w1 g21 ; answer(0):= 0; answer(2):= proc 16248 17176 jl w3 g18 ; deliver result(1) 16249 17178 jl. i0. ; goto next 16250 17180 16250 17180 e. 16251 17180 \f 16251 17180 ; fpa-subproc magnetic tape 16252 17180 ; eli, 5.11.1975 16253 17180 16253 17180 ; after create 16254 17180 ; 16255 17180 ; the subproc has just been created. 16256 17180 ; no special actions needed 16257 17180 ; 16258 17180 ; upon entry 16259 17180 ; w0 16260 17180 ; w1 subproc 16261 17180 ; w2 16262 17180 ; w3 16263 17180 16263 17180 b. i10, j10 16264 17180 w. 16265 17180 q5: ; after create: 16266 17180 rl w0 (b3) ; remoter(subproc):= first in name table 16267 17182 rs w0 x1+s4 ; 16268 17184 jl (b101) ; goto return 16269 17186 16269 17186 e. ; end of after create 16270 17186 \f 16270 17186 16270 17186 ; fpa-subproc magnetic tape 16271 17186 ; eli, 14.9.1975 16272 17186 16272 17186 ; procedure adjust position 16273 17186 ; 16274 17186 ; the position of the tape as described in <file count> and <block count> 16275 17186 ; is adjusted in the following way: 16276 17186 ; 16277 17186 ; after an input- or output operation <block count> is increased by 16278 17186 ; one, unless 16279 17186 ; status bit2 (timer) is set or 16280 17186 ; the size-field of mainproc is zero. 16281 17186 ; 16282 17186 ; if status bit7 is set (tape mark), <file count> is increased by 16283 17186 ; one and <block count> is cleared. 16284 17186 ; 16285 17186 ; in case of answer message with data, the <file count> and 16286 17186 ; <block count> is given in the datablock following. 16287 17186 ; 16288 17186 ; the new values of <block count> and <file count> are stored 16289 17186 ; in the answer-variables g23 and g24, ready for sending of an 16290 17186 ; answer 16291 17186 ; 16292 17186 ; call return 16293 17186 ; w0 undefined 16294 17186 ; w1 subproc unchanged 16295 17186 ; w2 unchanged 16296 17186 ; w3 link unchanged 16297 17186 16297 17186 b. i10, j10 16298 17186 w. 16299 17186 16299 17186 q10: ds. w3 j0. ; adjust position: save link and w2 16300 17188 rl w3 x1+a50 ; main:= mainproc(subproc) 16301 17190 zl w0 x3+p83+1 ; if status(main)=intervention then 16302 17192 ls w0 12 ; shift status 16303 17194 sh w0 -1 ; 16304 17196 jl. i4. ; goto intervention 16305 17198 rs w0 x1+s5 ; last status(proc):=status(main); 16306 17200 bz w0 x3+p81 ; func:= function(main) 16307 17202 rl w2 0 ; save function in w2 16308 17204 la w0 g50 ; remove databit 16309 17206 se w0 v51 ; if func=answer input or 16310 17208 sn w0 v53 ; func=answer output then 16311 17210 jl. i0. ; goto increase 16312 17212 se w2 v55+(:1<0:); if func<>answer message with data then 16313 17214 jl. i2. ; goto set g23 and g24 16314 17216 16314 17216 ; get values from datablock of answer 16315 17216 16315 17216 am (x1+a50) ; w2:= first received address(mainproc(subproc)) 16316 17218 rl w2 +p85 ; 16317 17220 dl w0 x2+8 ; get file- and blockcount from datablock 16318 17222 ds w0 x1+s3 ; goto set g23 and g24 16319 17224 jl. i2. ; 16320 17226 16320 17226 ; after input- or output 16321 17226 ; adjust file- and blockcount as described above 16322 17226 16322 17226 i0: bz w2 x3+p83+1 ; increase: 16323 17228 rl w3 x3+p84 ; if timer(status(main))=0 and 16324 17230 so w2 1<9 ; size(main)<>0 then 16325 17232 sn w3 0 ; 16326 17234 jl. i1. ; 16327 17236 dl w0 x1+s3 ; block count(subproc):= 16328 17238 ba. w0 1 ; blockcount(subproc)+1 16329 17240 rs w0 x1+s3 ; 16330 17242 16330 17242 i1: so w2 1<4 ; if tape mark(status(main))=1 then 16331 17244 jl. i2. ; begin 16332 17246 al w3 1 ; file count(subproc):= file count(subproc)+1 16333 17248 wa w3 x1+s2 ; 16334 17250 al w0 0 ; block count(subproc):= 0 16335 17252 ds w0 x1+s3 ; end 16336 17254 16336 17254 ; set new (or saved) content in g23 and g24. 16337 17254 ; w3w0 holds value 16338 17254 16338 17254 i2: dl w0 x1+s3 ; set g23 and g24: 16339 17256 ds w0 g24 ; 16340 17258 jl. i3. ; 16341 17260 16341 17260 ; intervention status (tape has been set local) 16342 17260 16342 17260 i4: jl. w3 q12. ; clear queue(state:= 1) 16343 17262 16343 17262 ; restore w2 and w3 and return 16344 17262 16344 17262 i3: dl. w3 j0. ; 16345 17264 jl x3 ; 16346 17266 16346 17266 0 ; saved w2 16347 17268 j0: 0 ; saved link 16348 17270 16348 17270 e. ; end of procedure adjust position 16349 17270 \f 16349 17270 ; fpa-subproc magnetic tape 16350 17270 ; eli, 25.3.1976 16351 17270 16351 17270 ; procedure clear queue 16352 17270 ; 16353 17270 ; called when the tape has been set offline or online. 16354 17270 ; the name of the process is removed. an eventual reserver 16355 17270 ; is removed. filecount, blockcount are set to -1. 16356 17270 ; state is set depending on entrypoint selected. 16357 17270 ; an answer with result 4 from the device is simulated. 16358 17270 ; all pending messages are returned with result 5 (unknown). 16359 17270 ; 16360 17270 ; call return 16361 17270 ; w0 undefined 16362 17270 ; w1 subproc unchanged 16363 17270 ; w2 undefined 16364 17270 ; w3 link undefined 16365 17270 16365 17270 b. i10, j10 16366 17270 w. 16367 17270 16367 17270 ; clear queue: 16368 17270 q11: am 1 ; state:= 2 (i.e. unknown mounted) 16369 17272 q12: al w0 1 ; or state:= 1 (i.e. local) 16370 17274 rs w0 x1+s1 ; 16371 17276 rs. w3 j0. ; save link 16372 17278 al w0 0 ; reserver(subproc):= 16373 17280 rs w0 x1+a11 ; name(0):= 0 16374 17282 rs w0 x1+a52 ; 16375 17284 rs w0 x1+s5 ; last status(proc):=status(main); 16376 17286 al w0 4 ; simulated result(mainproc(subproc)):= 4 16377 17288 am (x1+a50) ; 16378 17290 hs w0 +p82 ; 16379 17292 al w0 -1 ; filecount(subproc):= 16380 17294 al w3 -1 ; blockcount(subproc):= -1 16381 17296 ds w0 x1+s3 ; 16382 17298 jl. i1. ; 16383 17300 i0: al w0 5 ; for mes:= all unprocessed messages(subproc) do 16384 17302 jl w3 g19 ; deliver result(mes, 5) 16385 17304 i1: jl. w3 (j1.) ; 16386 17306 se w2 0 ; 16387 17308 jl. i0. ; 16388 17310 16388 17310 ; return 16389 17310 16389 17310 jl. (j0.) ; 16390 17312 16390 17312 j0: 0 ; saved link 16391 17314 j1: u22 ; 16392 17316 16392 17316 e. ; end of clear queue 16393 17316 16393 17316 e. ; end of magnetic tape 16394 17316 16394 17316 z. ; 16395 17316 16395 17316 h118=h100 16396 17316 16396 17316 16396 17316 16396 17316 ; stepping stones. 16397 17316 16397 17316 jl. u2. , u2 =k-2 16398 17318 jl. u20. , u20=k-2 16399 17320 jl. u21. , u21=k-2 16400 17322 16400 17322 \f 16400 17322 16400 17322 ; fpa-subproc disc- and areatypes 16401 17322 ; eli, 14.10.1975 16402 17322 16402 17322 c.(:a80>14a.1:)-1 ; if disc bit then include: 16403 17322 16403 17322 b. q20, s10 16404 17322 w. 16405 17322 ; 16406 17322 ; a disc connected to an rc3600 is in rc4000 represented by a subproc. 16407 17322 ; 16408 17322 ; an area on the disc is represented by a normal area process having 16409 17322 ; 'document name' equal to the name of the disc-subproc (as defined 16410 17322 ; by 'create peripheral process'). 16411 17322 ; 16412 17322 ; the filestructure of the disc is defined in the normal way by a 16413 17322 ; slicetable in the monitor, provided the disc has been included in 16414 17322 ; the bs-system by a call of 'include bs'. 16415 17322 ; 16416 17322 ; messages may be sent either directly to the disc, in which case 16417 17322 ; absolute segment addressing is used, or to an areaprocess in which 16418 17322 ; case adressing relative to the start of the area is used. 16419 17322 ; 16420 17322 ; the following subproc handles both messages to discs and areas. 16421 17322 ; the only difference is the initial handling of the message just 16422 17322 ; after 'send message'. here the segment number in a message to an 16423 17322 ; areaprocess is converted to a physical (absolute) segment number. 16424 17322 ; 16425 17322 ; like other subprocesses a message may be split into a number of 16426 17322 ; messages to the device, each (exept the last) corresponding to 16427 17322 ; the maximum buffer length of the device as stated in 'create'. 16428 17322 ; but due to the file structure of a disc another level of message- 16429 17322 ; splitting is introduced (note: this level of message-splitting 16430 17322 ; is already known from the existing handling of a disc, connected 16431 17322 ; directly to an rc4000). 16432 17322 ; 16433 17322 ; a file need not correspond to a number of physically con- 16434 17322 ; secutive segments. 16435 17322 ; 16436 17322 ; therefore a message to an areaprocess is treated in the following 16437 17322 ; levels: 16438 17322 ; 16439 17322 ; 1. message level 16440 17322 ; 2. slice level: prepare a number of consecutive segments. 16441 17322 ; 3. buffer level: transfer these segments in a number 16442 17322 ; of blocks corresponding to the maximum device buffer 16443 17322 ; length. 16444 17322 ; 16445 17322 ; stage 3 is executed 1 or more times for each instance of stage 2, 16446 17322 ; and stage 2 is repeated for each group of consecutive segments 16447 17322 ; until either the file in question or the message data area suppli- 16448 17322 ; ed from the internal process is exhausted. 16449 17322 ; 16450 17322 ; in stage 2 and 3 there is no destinction between messages originally 16451 17322 ; sent to an areaprocess or to a discprocess. as there is no file- 16452 17322 ; structure for messages to the disc, stage 2 must 'automatically' 16453 17322 ; be dummy in that case. 16454 17322 ; 16455 17322 ; the subproc uses the message as storage for information making this 16456 17322 ; possible. 16457 17322 ; 16458 17322 ; originally a message to an area- or a discprocess holds the following 16459 17322 ; information: 16460 17322 ; 16461 17322 ; message+8: operation<12+mode 16462 17322 ; +10: first address 16463 17322 ; +12: last address 16464 17322 ; +14: first segment 16465 17322 ; (absolute for messages to disc, 16466 17322 ; relative to start of area otherwise) 16467 17322 ; 16468 17322 ; after 'send message' and in the following processing of the message 16469 17322 ; it is transformed in the following way: 16470 17322 ; 16471 17322 ; message+8: unchanged from above 16472 17322 ; +10: unchanged from above 16473 17322 ; +12: last address corresponding to current consecutive 16474 17322 ; segments (initially set equal to +10) 16475 17322 ; +14: first physical segment 16476 17322 ; +16: next physical segment, i.e. start segment for the 16477 17322 ; next consecutive segments 16478 17322 ; +18: original value of last address (from above) 16479 17322 ; +20: expected size 16480 17322 ; +22: updated first address 16481 17322 ; 16482 17322 ; note, that +8, +10, +12, +20 and +22 corresponds to a message as it 16483 17322 ; is normally required by the common fpa-procedures. 16484 17322 ; these procedures may then handle the splitting of the consecutive 16485 17322 ; segments depending on the buffersize of the device. only a little 16486 17322 ; extra code is required here, taking care of updating of 'first phy- 16487 17322 ; sical segment' after each transfer. 16488 17322 ; 16489 17322 ; when the consecutive segments are exhausted the next number of 16490 17322 ; consecutive segments are selected, and +12, +14 and +16 updated 16491 17322 ; correspondingly. 16492 17322 ; 16493 17322 ; for a message directly to the discprocess, +12 and +18 will be 16494 17322 ; set equal to each other, thus simulating that the last part of a 16495 17322 ; message is processed. 16496 17322 ; 16497 17322 ; when a message is sent to an areaprocess the standard 'send message' 16498 17322 ; action is entered. there the discprocess corresponding to the area 16499 17322 ; is found and if the kind of the discprocess is a subprocess, a jump 16500 17322 ; is performed through send message for subprocs to the 16501 17322 ; send message action for disc-subprocs. a flag in the 16502 17322 ; subproc description shows the area process that is the 16503 17322 ; actual receiver of the message 16504 17322 ; 16505 17322 ; a message to the discprocess itself enters here at q0. 16506 17322 \f 16506 17322 ; fpa-subproc disc- and areatypes 16507 17322 ; eli, 15.10.1975 16508 17322 16508 17322 m. 16508 17322 disc link 16509 17322 16509 17322 ; entry point table 16510 17322 16510 17322 h106: q0 ; after send message (only for disc) 16511 17324 q1 ; before header 16512 17326 q2 ; after header transmit 16513 17328 q3 ; after header receive 16514 17330 q4 ; after data receive 16515 17332 q5 ; after create 16516 17334 16516 17334 ; definition of local part of subproc 16517 17334 16517 17334 b. j0 16518 17334 w. 16519 17334 16519 17334 s0= p0 ; start of local part 16520 17334 j0= p0 ; save start 16521 17334 16521 17334 s0=s0+2 ; 1 unused word 16522 17334 s2=s0, s0=s0+2 ; <chaintable> 16523 17334 s3=s0, s0=s0+2 ; <slicelength> 16524 17334 s4=s0, s0=s0+2 ; <state> 16525 17334 16525 17334 ; test for size of private part not exceeded 16526 17334 16526 17334 c. (:s0-j0-v1-1:) 16527 17334 m. fpa subproc: disctype private part too long 16528 17334 z. 16529 17334 e. ; 16530 17334 16530 17334 q12: (:-1:)<9 ; constant to mask of to integral number 16531 17336 ; of segments 16532 17336 \f 16532 17336 ; fpa-subproc disc- and areatypes 16533 17336 ; eli, 22.1.1976 16534 17336 16534 17336 ; after send message (disc) 16535 17336 ; 16536 17336 ; set up the message, so that the procedure 'prepare consecutive 16537 17336 ; area' will be dummy when applied to this message. this is done 16538 17336 ; by setting 16539 17336 ; 16540 17336 ; saved last address(message):= first addr(mes)+ 16541 17336 ; (first addr(mes)-last addr(mes))//512*512 16542 17336 ; 16543 17336 ; upon entry: 16544 17336 ; w0 16545 17336 ; w1 subproc 16546 17336 ; w2 16547 17336 ; w3 16548 17336 16548 17336 b. i10, j10 16549 17336 w. 16550 17336 16550 17336 q0: ; after send message: 16551 17336 rl w0 x1+a56 ; if called via areaprocess then 16552 17338 sz w0 (:-1:)<1 ; 16553 17340 jl. q11. ; goto after send message(area) 16554 17342 jl. w3 u4. ; check and link operation 16555 17344 rl w2 b18 ; w2:= current message 16556 17346 bz w0 x2+8 ; if oper(mes)<>input and 16557 17348 se w0 3 ; oper(mes)<>output then 16558 17350 sn w0 5 ; 16559 17352 jl. i0. ; 16560 17354 jl. u2. ; goto testmore 16561 17356 i0: al w3 2 ; saved last(mes):= last(mes):= 16562 17358 wa w3 x2+12 ; 16563 17360 rl w0 x2+10 ; (last(mes)-first(mes)+2)//512*512 16564 17362 ws w3 0 ; 16565 17364 la. w3 q12. ; 16566 17366 wa w3 0 ; + first(mes) 16567 17368 al w3 x3-2 ; - 2 16568 17370 rs w3 x2+12 ; 16569 17372 rs w3 x2+18 ; 16570 17374 ; 16571 17374 jl. u2. ; goto testmore 16572 17376 16572 17376 e. 16573 17376 \f 16573 17376 ; fpa-subproc disc- and areatypes 16574 17376 ; eli, 22.1.1976 16575 17376 16575 17376 ; after send message (area) 16576 17376 ; 16577 17376 ; prepare message for first call of 'prepare consecutive area' 16578 17376 16578 17376 ; note, that upon entry w0 will hold the areaprocess address, 16579 17376 ; and b19 (monitor entry) will hold the mainproc 16580 17376 ; address of the areaprocess (i.e. the disc-subproc) 16581 17376 ; 16582 17376 ; upon entry: 16583 17376 ; w0 area 16584 17376 ; w1 subproc (disc) 16585 17376 ; w2 16586 17376 ; w3 16587 17376 16587 17376 b. i10, j10 16588 17376 w. 16589 17376 16589 17376 q11: ; after send message: 16590 17376 al w2 0 ; called via areaprocess:= false 16591 17378 rs w2 x1+a56 ; 16592 17380 rl w1 0 ; proc:= area 16593 17382 rl w2 b18 ; w2:= current message 16594 17384 bz w0 x2+8 ; if oper(mes)<>input and 16595 17386 se w0 3 ; oper(mes)<>output then 16596 17388 sn w0 5 ; 16597 17390 jl. i0. ; 16598 17392 jl. i1. ; goto link 16599 17394 16599 17394 ; input or output operation 16600 17394 16600 17394 i0: rl w0 x2+14 ; if first segment(mes)<0 or 16601 17396 sl w0 0 ; first segment(mes)>=segments(area) then 16602 17398 sl w0 (x1+a61) ; goto outside 16603 17400 jl. i2. ; 16604 17402 16604 17402 ; adjust addresses to correspond to an integral number of 16605 17402 ; segments 16606 17402 16606 17402 dl w0 x2+12 ; last:= last(mes) 16607 17404 rs w3 x2+22 ; updated first(mes):= first(mes) 16608 17406 al w3 x3-2 ; 16609 17408 rs w3 x2+12 ; last(mes):= first(mes)-2 16610 17410 ws w0 6 ; coresize:= (last-first(mes)+2)//512*512 16611 17412 la. w0 q12. ; 16612 17414 rl w3 x1+a61 ; areasize:= (segments(area)-first segment(mes))*512 16613 17416 ws w3 x2+14 ; 16614 17418 ls w3 9 ; 16615 17420 sh w0 (6) ; size:= min(coresize, areasize) 16616 17422 rl w3 0 ; 16617 17424 al w3 x3-2 ; 16618 17426 wa w3 x2+10 ; saved last(mes):= first(mes)+ size -2 16619 17428 rs w3 x2+18 ; 16620 17430 16620 17430 ; get start in chain table of segments 16621 17430 16621 17430 rl w0 x2+14 ; no of slices:= first segment(mes)/ 16622 17432 al w3 0 ; slicelength(mainproc(area)) 16623 17434 am (x1+a50) ; 16624 17436 wd w0 +s3 ; 16625 17438 rs w3 x2+16 ; save first segment in slice 16626 17440 16626 17440 ; normally last(mes) points to the last address for which data 16627 17440 ; has been transferred. 16628 17440 ; segments are normally transferred from the first segment in 16629 17440 ; a slice an on. this does however not hold for the first 16630 17440 ; transfer, where it starts with segment no 16631 17440 ; (first segment modulo slicelength). 16632 17440 ; this is corrected for by subtracting from last(mes) 16633 17440 ; the core occupied by the not transferred segments in the 16634 17440 ; slice. 16635 17440 ; this makes last(mes) point to a logical address (ahead of the 16636 17440 ; users buffer) where the transfer of a previous slice would have 16637 17440 ; terminated. 16638 17440 16638 17440 ls w3 9 ; last(mes):= last(mes)- 16639 17442 rx w3 x2+12 ; 16640 17444 ws w3 x2+12 ; first segm in slice*512 16641 17446 rs w3 x2+12 ; 16642 17448 rl w2 x1+a60 ; w2:= first slice(area) 16643 17450 16643 17450 ; now change to run in mainproc(area), i.e. in the subproc actually 16644 17450 ; corresponding to the disc 16645 17450 16645 17450 rl w1 x1+a50 ; proc:= mainproc(area) 16646 17452 wa w2 x1+s2 ; first slice:= first slice(area)+chaintable(proc) 16647 17454 jl w3 d74 ; follow chain(w2=first slice, w0=no of slices) 16648 17456 ws w2 x1+s2 ; next phys segm:= slice*slicelength(proc)+ 16649 17458 al w0 x2 ; 16650 17460 rl w2 b18 ; + 16651 17462 wm w0 x1+s3 ; 16652 17464 wa w0 x2+16 ; first segment in slice 16653 17466 rs w0 x2+16 ; 16654 17468 jl. w3 q10. ; prepare consecutive area 16655 17470 i1: am (b19) ; link: 16656 17472 al w1 +a54 ; w1:= addr of message queue of subproc 16657 17474 jl w3 d6 ; link(w1=head, w2=elem) 16658 17476 rl w1 b19 ; restore current subproc. 16659 17478 jl. u2. ; goto testmore 16660 17480 16660 17480 ; first segment of message is outside the area. return 16661 17480 ; status 'end of document'. 16662 17480 16662 17480 i2: rl w1 g62 ; outside: status:= bit5 16663 17482 rs w1 g20 ; 16664 17484 ld w1 -65 ; bytes:= chars:= 0 16665 17486 ds w1 g22 ; 16666 17488 jl w3 g18 ; deliver result(1) 16667 17490 jl. u2. ; goto testmore 16668 17492 16668 17492 e. ; end of after message (area) 16669 17492 \f 16669 17492 ; fpa-subproc disc- and areatypes 16670 17492 ; eli, 14.10.1975 16671 17492 16671 17492 ; before header (disc and area) 16672 17492 ; 16673 17492 ; prepare transmission of next block. 16674 17492 ; 16675 17492 ; note, that the fields <status> and <mode> are used to hold the 16676 17492 ; segment number in case of an input- or output operation. 16677 17492 ; 16678 17492 ; upon entry 16679 17492 ; w0 16680 17492 ; w1 subproc 16681 17492 ; w2 16682 17492 ; w3 16683 17492 16683 17492 b. i10, j10 16684 17492 w. 16685 17492 q1: ; before header: 16686 17492 jl. w3 u20. ; test answer attention 16687 17494 jl. w3 u12. ; w2:= find first message 16688 17496 sn w2 0 ; if w2=0 then 16689 17498 jl. u3. ; goto no block 16690 17500 16690 17500 ; test for input- or output message 16691 17500 16691 17500 jl. w3 u30. ; prepare transfer(message) 16692 17502 bz w0 x2+8 ; if oper(mes)<>input and 16693 17504 se w0 3 ; oper(mes)<>output then 16694 17506 sn w0 5 ; 16695 17508 jl. i1. ; 16696 17510 jl (b101) ; goto mainproc return 16697 17512 i1: rl w0 x2+14 ; w0:= first phys segment(mes) 16698 17514 am (x1+a50) ; state,mode(mainproc(subproc)):= w0 16699 17516 rs w0 +p63 ; 16700 17518 16700 17518 ; increase stop count at this time also for input messages, 16701 17518 ; thus ensuring that the process is still present when 16702 17518 ; the answer arrives (which does not take long time for 16703 17518 ; discs) 16704 17518 16704 17518 jl. w3 u21. ; test and increase stop count 16705 17520 jl. u3. ; stopped: goto no block 16706 17522 jl (b101) ; running: goto mainproc return 16707 17524 16707 17524 e. ; end of before header 16708 17524 \f 16708 17524 16708 17524 ; fpa-subproc disc- and areatypes 16709 17524 ; eli, 3.2.1976 16710 17524 16710 17524 ; after header transmit 16711 17524 ; 16712 17524 ; a header and maybe a corresponding datablock has been transmitted. 16713 17524 ; for messages originally sent to an areaprocess, the field 16714 17524 ; first physical segment is increased corresponding to the 16715 17524 ; size of the datablock transferred. 16716 17524 ; 16717 17524 ; upon entry: 16718 17524 ; w0 16719 17524 ; w1 subproc 16720 17524 ; w2 16721 17524 ; w3 16722 17524 16722 17524 b. i10, j10 16723 17524 w. 16724 17524 16724 17524 q2: ; after header transmit: 16725 17524 jl. w3 u8. ; mes:= message table(current bufno) 16726 17526 rs. w2 j0. ; save mes 16727 17528 jl. w3 u40. ; test header transmit 16728 17530 jl. u2. ; error: goto testmore 16729 17532 rl. w2 j0. ; restore mes; 16730 17534 se w2 0 ; if mes = 0 then 16731 17536 jl. i1. ; begin 16732 17538 rl w2 x1+p13 ; mes:= current message; 16733 17540 sn w2 0 ; if mes = 0 16734 17542 jl. u2. ; then goto testmore; 16735 17544 i1: ; end; 16736 17544 rl w3 x1+a50 ; main:= mainproc(subproc) 16737 17546 bz w0 x3+p61 ; if function(main)<>input and 16738 17548 se w0 v50 ; function(main)<>output then 16739 17550 sn w0 v52+(:1<0:); 16740 17552 jl. i0. ; 16741 17554 jl. u2. ; goto testmore 16742 17556 i0: rl w0 x3+p64 ; segments:= convert to 12(size(main))//512 16743 17558 jl. w3 u15. ; 16744 17560 ls w0 -9 ; 16745 17562 rl. w2 j0. ; restore mes 16746 17564 wa w0 x2+14 ; first phys segm(mes):= first phys segm(mes)+segments 16747 17566 rs w0 x2+14 ; 16748 17568 16748 17568 ; if the last portion of the current consecutive area has been 16749 17568 ; initialized and more is to be transferred, then prepare 16750 17568 ; next consecutive segments. 16751 17568 16751 17568 rl w3 x1+p13 ; if current message(subproc)=0 and 16752 17570 rl w0 x2+12 ; last(mes)<>saved last(mes) then 16753 17572 sn w3 0 ; begin 16754 17574 sn w0 (x2+18) ; 16755 17576 jl. u2. ; 16756 17578 rs w2 x1+p13 ; current message(subproc):= mes 16757 17580 jl. w3 q10. ; prepare consecutive area 16758 17582 ; end 16759 17582 jl. u2. ; goto testmore 16760 17584 16760 17584 j0: 0 ; saved message address 16761 17586 16761 17586 e. ; end of after header transmit 16762 17586 \f 16762 17586 ; fpa-subproc disc- and areatypes 16763 17586 ; eli, 14.10.1975 16764 17586 16764 17586 ; after header received 16765 17586 ; 16766 17586 ; a header has been received. 16767 17586 ; no special actions required 16768 17586 ; 16769 17586 ; upon entry 16770 17586 ; w0 16771 17586 ; w1 subproc 16772 17586 ; w2 16773 17586 ; w3 16774 17586 16774 17586 b. i10, j10 16775 17586 w. 16776 17586 16776 17586 q3: jl. w3 u50. ; after header receive: test header received 16777 17588 jl. u2. ; goto testmore 16778 17590 16778 17590 e. ; end of after header received 16779 17590 \f 16779 17590 ; fpa-subproc disc- and areatypes 16780 17590 ; eli, 14.10.1975 16781 17590 16781 17590 ; after data received 16782 17590 ; 16783 17590 ; a datablock following a header has been received 16784 17590 ; 16785 17590 ; status intervention or result disconnected will cause the name of the 16786 17590 ; subproc to be removed and the message returned with result 5 16787 17590 ; (receiver does not exist) 16788 17590 ; 16789 17590 ; upon entry 16790 17590 ; w0 16791 17590 ; w1 subproc 16792 17590 ; w2 16793 17590 ; w3 16794 17590 16794 17590 b. i10, j10 16795 17590 w. 16796 17590 16796 17590 q4: ; after data: 16797 17590 rl w3 x1+a50 ; main:= mainproc(subproc) 16798 17592 bl w2 x3+p82 ; if result(main)=disconnected or 16799 17594 bl w0 x3+p81+1 ; status(main)=intervention then 16800 17596 sl w0 0 ; begin comment: remove name of proces; 16801 17598 sn w2 3 ; 16802 17600 jl. +4 ; 16803 17602 jl. i1. ; 16804 17604 al w0 4 ; simulated result(main):= 4 16805 17606 hs w0 x3+p82 ; 16806 17608 al w0 0 ; name(subproc):= 16807 17610 rs w0 x1+a11 ; reserver(subproc):= 0 16808 17612 rs w0 x1+a52 ; 16809 17614 rl w3 b5 ; for area:= all area procs do 16810 17616 i0: rl w2 x3 ; 16811 17618 sn w1 (x2+a50) ; if main(area)=subpproc then 16812 17620 rs w0 x2+a50 ; main(area):= 0 16813 17622 al w3 x3+2 ; 16814 17624 se w3 (b6) ; 16815 17626 jl. i0. ; end 16816 17628 ; 16817 17628 i1: jl. w3 u60. ; test data received 16818 17630 jl. u2. ; normal: goto testmore 16819 17632 jl. u2. ; attention: goto testmore 16820 17634 16820 17634 e. ; end of data received 16821 17634 \f 16821 17634 16821 17634 ; fpa-subproc disc- and areatypes 16822 17634 ; eli, 16.12.1975 16823 17634 16823 17634 ; after create 16824 17634 ; 16825 17634 ; a disctype subproc has been created. 16826 17634 ; 16827 17634 ; the fields <chaintable> and <slice length> will later be 16828 17634 ; initialized by procfunc when an internal process executes 16829 17634 ; 'create bs'. 16830 17634 ; 16831 17634 ; upon entry 16832 17634 ; w0 16833 17634 ; w1 subproc 16834 17634 ; w2 16835 17634 ; w3 16836 17634 16836 17634 b. i10, j10 16837 17634 w. 16838 17634 16838 17634 q5: ; after create: 16839 17634 16839 17634 ; adjust maximum buffer size to an integral number of segments 16840 17634 16840 17634 rl. w0 q12. ; 16841 17636 la w0 x1+p18 ; size(subproc):= size(subproc)//512*512 16842 17638 rs w0 x1+p18 ; 16843 17640 16843 17640 jl (b101) ; goto return 16844 17642 16844 17642 e. ; end of create 16845 17642 \f 16845 17642 ; fpa-subproc disc- and areatypes 16846 17642 ; eli, 22.1.1976 16847 17642 16847 17642 ; procedure prepare consecutive area 16848 17642 ; 16849 17642 ; makes the pointers <updated first> and <last> in the 16850 17642 ; messagebuffer describe a storage area corresponding to 16851 17642 ; a number of consecutive disc segments 16852 17642 ; 16853 17642 ; call return 16854 17642 ; w0 undefined 16855 17642 ; w1 subproc(disc) unchanged 16856 17642 ; w2 message unchanged 16857 17642 ; w3 link undefined 16858 17642 16858 17642 b. i10, j10 16859 17642 w. 16860 17642 16860 17642 q10: ds. w3 j1. ; prepare consecutive area: 16861 17644 rl w0 x2+16 ; save message and link 16862 17646 rs w0 x2+14 ; first phys segm(mes):= next phys segm(mes) 16863 17648 al w3 0 ; slice:= next phys segm(mes)/slicelength(subproc)+ 16864 17650 wd w0 x1+s3 ; 16865 17652 wa w0 x1+s2 ; chaintable(subproc) 16866 17654 rl w3 x2+18 ; 16867 17656 rl w2 x1+s3 ; length:= slicelength(subproc)*512 16868 17658 ls w2 9 ; 16869 17660 ds. w3 j3. ; 16870 17662 am. (j0.) ; 16871 17664 rl w3 +12 ; 16872 17666 wa. w3 j2. ; addr:= last addr(mes)+ length 16873 17668 16873 17668 ; scan slicetable as long as a slice with content 1 is encountered 16874 17668 16874 17668 i0: bz w2 (0) ; while chaintable(slice)=1 and 16875 17670 sn w2 1 ; addr<saved last(mes) do 16876 17672 sl. w3 (j3.) ; begin 16877 17674 jl. i1. ; 16878 17676 ba. w0 1 ; slice:= slice+1 16879 17678 wa. w3 j2. ; addr:= addr+length 16880 17680 jl. i0. ; end 16881 17682 16881 17682 ; dataarea at user exhausted or nonconsecutive segments 16882 17682 16882 17682 i1: rl. w2 j0. ; restore message 16883 17684 sl. w3 (j3.) ; if addr<saved last(mes) then 16884 17686 jl. i2. ; begin nonconsecutive, more to send. 16885 17688 rs w3 x2+12 ; last(mes):= addr 16886 17690 ba w0 (0) ; next phys segm(mes):= (next slice(slice)- 16887 17692 ws w0 x1+s2 ; chaintable(subproc))*slicelength(subproc) 16888 17694 wm w0 x1+s3 ; 16889 17696 rs w0 x2+16 ; 16890 17698 jl. (j1.) ; end else 16891 17700 16891 17700 i2: rl w0 x2+18 ; last addr(mes):= saved last(mes) 16892 17702 rs w0 x2+12 ; 16893 17704 16893 17704 ; return 16894 17704 16894 17704 jl. (j1.) ; goto return 16895 17706 16895 17706 ; working locations 16896 17706 16896 17706 j0: 0 ; saved message 16897 17708 j1: 0 ; saved link 16898 17710 j2: 0 ; length (i.e. slicelength*512) 16899 17712 j3: 0 ; saved last address(mes) 16900 17714 16900 17714 e. ; end of prepare consecutive area 16901 17714 \f 16901 17714 16901 17714 16901 17714 16901 17714 e. ; end of disc- and areatypes 16902 17714 16902 17714 z. ; 16903 17714 16903 17714 h106=h100 16904 17714 \f 16904 17714 16904 17714 ; fpa-subproc discette 16905 17714 ; jr, 78.08.22 16906 17714 16906 17714 ; stepping stone: 16907 17714 jl. u3. , u3=k-2 16908 17716 jl. u12., u12=k-2 16909 17718 jl. u4. , u4=k-2 16910 17720 jl. u14. , u14=k-2 16911 17722 jl. u30. , u30=k-2 16912 17724 jl. u40. , u40=k-2 16913 17726 16913 17726 c.(:a80>15 a.1 :)-1 ; if floppy disc bit then include 16914 17726 16914 17726 16914 17726 b. q20,s10,n10 w. 16915 17726 16915 17726 ; this subdriver is used for links to discettes. it differs from the 16916 17726 ; 'standard type driver' in these ways: 16917 17726 ; - the stopcount of a sender that wants to input is raised 16918 17726 ; already in entry 1 to prevent a stopped sender when receiving in 16919 17726 ; entry 3. 16920 17726 ; - if sender is stopped (only when inputting or outputting) in entry 1, 16921 17726 ; the state of the process is set to 'stopped' which causes all messages 16922 17726 ; (except reset) to be answered immediately with status stopped. 16923 17726 16923 17726 ; note: this driver cannot handle links with more than one operation. 16924 17726 16924 17726 m. 16924 17726 flexible disc link 16925 17726 16925 17726 ; entry point table: 16926 17726 h122: ; discette: 16927 17726 16927 17726 q0 ; after send message 16928 17728 q1 ; before header transmit 16929 17730 q2 ; after header transmit 16930 17732 q3 ; after header received 16931 17734 q4 ; after data received 16932 17736 q5 ; after creation 16933 17738 16933 17738 ; definition of privat part of process description: 16934 17738 16934 17738 s0=p0 ; state 16935 17738 16935 17738 ; state : 0 running 16936 17738 ; 2 waiting for stop 16937 17738 ; 4 stopped 16938 17738 16938 17738 \f 16938 17738 16938 17738 ; fpa-subproc discette 16939 17738 ; jr, 78.08.22 16940 17738 16940 17738 ; after send message 16941 17738 ; 16942 17738 ; a new message has been received. check that user- or reservation 16943 17738 ; status is ok and link message to queue of subproc. 16944 17738 ; if state is stopped and if operation is odd then 16945 17738 ; deliver answer with status stopped. 16946 17738 ; if operation is reset then state is changed to running. 16947 17738 ; if the subproc is not busy, then link it to mainproc. 16948 17738 ; 16949 17738 ; upon entry: w1=subproc 16950 17738 16950 17738 b. i10,j10 w. 16951 17738 16951 17738 q0: ; after send message: 16952 17738 jl. w3 u4. ; check and link operation; 16953 17740 rl w3 x1+s0 ; 16954 17742 jl. x3+i0. ; goto case state of 16955 17744 i0: jl. u2. ; ( 0: testmore, 16956 17746 jl. j2. ; 2: exit0, 16957 17748 ; 4: stopped); 16958 17748 16958 17748 j0: am (b18) ; stopped: 16959 17750 sz w0 2.1 ; if operation odd 16960 17752 jl. j1. ; then deliver result : stopped 16961 17754 sn w0 2 ; else 16962 17756 jl. u2. ; 16963 17758 bz w0 +8 ; 16964 17760 se w0 2 ; if operation(mess)=reset then 16965 17762 jl. j1. ; state:=running; 16966 17764 al w0 0 ; goto testmore; 16967 17766 rs w0 x1+s0 ; 16968 17768 jl. u2. ; 16969 17770 j1: jl. w3 n0. ; deliver result(stopped); 16970 17772 j2: jl (b101) ; exit0: return; 16971 17774 16971 17774 e. ; end of after send message 16972 17774 \f 16972 17774 16972 17774 ; fpa-subproc discette 16973 17774 ; jr, 78.08.22 16974 17774 16974 17774 ; before header 16975 17774 ; 16976 17774 ; a header (and maybe a corresponding datablock) is to be transmitted. 16977 17774 ; find first non-processed message in queue of subproc and initialize 16978 17774 ; transmit-parameters in mainproc. 16979 17774 ; 16980 17774 ; upon entry: w1=subproc 16981 17774 16981 17774 b. i10,j10 w. 16982 17774 16982 17774 q1: ; before header: 16983 17774 jl. w3 u20. ; test answer attention; 16984 17776 jl. w3 u12. ; mes:= first pending message; 16985 17778 sn w2 0 ; if mes=0 then 16986 17780 jl. u3. ; goto no block; 16987 17782 16987 17782 ; message found. 16988 17782 16988 17782 bz w0 x2+8 ; 16989 17784 so w0 2.1 ; if odd operation then 16990 17786 jl. j0. ; examine sender(mess); 16991 17788 jl w3 g34 ; stopped: goto stopped; 16992 17790 jl. j1. ; ok: 16993 17792 16993 17792 j0: jl. w3 u30. ; prepare transfer; 16994 17794 bz w0 x2+8 ; 16995 17796 so w0 3 ; if operation=input then 16996 17798 jl (b101) ; 16997 17800 jl. w3 u21. ; test and increase stopcount; 16998 17802 -1 ; stopped: impossible (checked above(g34)); 16999 17804 jl (b101) ; goto mainproc return; 17000 17806 17000 17806 j1: jl. w3 n1. ; stopped: check queue; 17001 17808 jl. u3. ; queue not empty: goto no block; 17002 17810 jl. w3 n2. ; queue empty: clean mess queue; 17003 17812 jl. u3. ; end: goto no block; 17004 17814 al w0 0 ; reset: 17005 17816 rs w0 x1+s0 ; state:=running; 17006 17818 jl. j0. ; goto prepare; 17007 17820 17007 17820 e. ; end of before header 17008 17820 \f 17008 17820 ; fpa-subproc discette 17009 17820 ; jr, 78.08.22 17010 17820 17010 17820 ; after header and data transmitted 17011 17820 ; 17012 17820 ; entered by mainproc, when a header and a corresponding datablock 17013 17820 ; (if any) has been transmitted. 17014 17820 ; the result of the transmission is checked and if an error has 17015 17820 ; occured, the message is returned with result=4 (receiver 17016 17820 ; malfunction). 17017 17820 ; 17018 17820 ; finally the state of the subproc is checked for transmission of a 17019 17820 ; new block. 17020 17820 17020 17820 b. i10,j10 w. 17021 17820 17021 17820 q2: jl. w3 u40. ; after header: test header transmitted 17022 17822 jl. u2. ; error: goto testmore 17023 17824 jl. u2. ; goto testmore 17024 17826 17024 17826 e. ; end of header and data transmitted 17025 17826 \f 17025 17826 ; fpa-subproc discette 17026 17826 ; jr, 78.08.22 17027 17826 17027 17826 ; after header received 17028 17826 ; 17029 17826 ; a header has been received. 17030 17826 ; for this kind of subprocs (with no special actions) it can 17031 17826 ; only specify the functions <answer input with data> or 17032 17826 ; <answer message with data>. 17033 17826 ; 17034 17826 ; upon entry: w1=subproc 17035 17826 17035 17826 b. i10,j10 w. 17036 17826 17036 17826 q3: jl. w3 u50. ; after header received: test answer header 17037 17828 jl. u2. ; goto testmore 17038 17830 17038 17830 e. ; end of after header received 17039 17830 \f 17039 17830 ; fpa-subproc discette 17040 17830 ; jr, 78.08.22 17041 17830 17041 17830 ; after data received 17042 17830 ; 17043 17830 ; check transmission. 17044 17830 ; 17045 17830 ; upon entry: w1=subproc 17046 17830 17046 17830 b. i10,j10 w. 17047 17830 17047 17830 q4: jl. w3 u60. ; after data received: test data received 17048 17832 jl. u2. ; goto testmore 17049 17834 17049 17834 ; attention. no special action 17050 17834 17050 17834 jl. u2. ; goto testmore 17051 17836 17051 17836 e. ; end of data received 17052 17836 \f 17052 17836 ; fpa-subproc discette 17053 17836 ; jr, 78.08.22 17054 17836 17054 17836 ; after create 17055 17836 ; 17056 17836 ; the subproc has just been created. 17057 17836 ; no special action 17058 17836 ; 17059 17836 ; upon entry: w1=subproc 17060 17836 17060 17836 b. i10,j10 w. 17061 17836 17061 17836 q5: ; after create: 17062 17836 jl (b101) ; goto return 17063 17838 17063 17838 e. ; end of after create 17064 17838 \f 17064 17838 17064 17838 ; special procedures used in the discette driver. 17065 17838 17065 17838 ; procedure deliver stopped answer. 17066 17838 ; the message buffer defined in b18 is returned to the sender with 17067 17838 ; status = stopped and bytes, chars transferred = 0, 0. 17068 17838 ; call: return: 17069 17838 ; w0 destroyed 17070 17838 ; w1 proc 17071 17838 ; w2 destroyed 17072 17838 ; w3 link destroyed 17073 17838 17073 17838 b.w. 17074 17838 17074 17838 n0: al w0 1<8 ; deliver stopped answer: 17075 17840 rs w0 g20 ; status(answer):=stopped; 17076 17842 al w0 0 ; bytes trf(answer):=0; 17077 17844 rs w0 g21 ; chars trf(answer):=0; 17078 17846 rs w0 g22 ; deliver answer; 17079 17848 jl g18 ; exit: return to link; 17080 17850 e. 17081 17850 17081 17850 ; procedure check queue. 17082 17850 ; if the message entry table is empty (=> no operations under execution 17083 17850 ; in the net) the message buffers in the event queue are returned with 17084 17850 ; answer stopped until either the queue is empty or a reset operation is 17085 17850 ; met. 17086 17850 ; the procedure returnes to link+2 when the queue is emptied and a reset 17087 17850 ; operation is found, else to link. 17088 17850 ; by return the state is 17089 17850 ; 0 event queue emptied and reset found 17090 17850 ; 2 message entry table not empty 17091 17850 ; 4 event queue emptied 17092 17850 ; call: return: 17093 17850 ; w0 destroyed 17094 17850 ; w1 proc unchanged 17095 17850 ; w2 destroyed 17096 17850 ; w3 link destoyed 17097 17850 17097 17850 b.j4 w. 17098 17850 n1: al w0 0 ; check queue: 17099 17852 al w2 x1+p19 ; 17100 17854 j0: se w0 (x2) ; for entry:=first in entry table to last do 17101 17856 jl. j1. ; if entry used then 17102 17858 al w2 x2+2 ; goto not empty; 17103 17860 se w2 x1+p19+v0*2; 17104 17862 jl. j0. ; 17105 17864 am 4-2 ; empty: state:=stopped; 17106 17866 j1: al w2 2 ; not empty: state:=waiting for stop; 17107 17868 rs w2 x1+s0 ; 17108 17870 am x2-2 ; 17109 17872 jl x3 ; exit: return to link+state-2; 17110 17874 e. 17111 17874 17111 17874 ; procedure clean mess queue. 17112 17874 17112 17874 b.i6,j6 w. 17113 17874 n2: rs. w3 i0. ; clean mess queue: 17114 17876 j0: jl. w3 u12. ; for mess:=first in mess queue until last do 17115 17878 sn w2 0 ; if operation(mess)=reset then 17116 17880 jl. (i0.) ; return to link+2; 17117 17882 bz w0 x2+8 ; 17118 17884 sn w0 2 ; 17119 17886 jl. j1. ; 17120 17888 jl. w3 n0. ; 17121 17890 jl. j0. ; 17122 17892 j1: am. (i0.) ; 17123 17894 jl +2 ; 17124 17896 i0: 0 ; 17125 17898 e. 17126 17898 17126 17898 17126 17898 e. ; end of discette driver. 17127 17898 17127 17898 z. ; 17128 17898 17128 17898 h122=h100 17129 17898 \f 17129 17898 ; fpa-subproc character level i/o 17130 17898 ; ncj, 02.01.1980 17131 17898 17131 17898 17131 17898 b. q20, s10 17132 17898 w. 17133 17898 17133 17898 ; this code handles fpa i/o on character level and is used by fpa 17134 17898 ; test programs. 17135 17898 17135 17898 ; messages received must have the following format: 17136 17898 ; 17137 17898 ; +8: operation<12 + mode 17138 17898 ; +10: first 17139 17898 ; +12: last 17140 17898 ; +14: characters 17141 17898 ; 17142 17898 17142 17898 m. 17142 17898 character level i/o link 17143 17898 17143 17898 ; entry point table: 17144 17898 h124: 17145 17898 q0 ; after send message 17146 17900 q1 ; before header transmit 17147 17902 q2 ; after header transmit 17148 17904 q3 ; after header received 17149 17906 q4 ; after data received 17150 17908 q5 ; after creation 17151 17910 17151 17910 ; no structure of private part of process description required 17152 17910 \f 17152 17910 ; fpa-subproc character level i/o 17153 17910 ; ncj, 2.01.1980 17154 17910 17154 17910 ; after send message 17155 17910 ; 17156 17910 ; a new message has been received. check that user- or reservation 17157 17910 ; status is ok and link message to queue of subproc. 17158 17910 ; if the subproc is not busy, then link it to mainproc. 17159 17910 ; 17160 17910 ; upon entry: 17161 17910 ; w0 17162 17910 ; w1 subproc 17163 17910 ; w2 17164 17910 ; w3 17165 17910 17165 17910 b. i10, j10 17166 17910 w. 17167 17910 q0: ; after send message: 17168 17910 jl. w3 u4. ; check and link operation 17169 17912 rl w2 b18 ; mes:= current message; 17170 17914 al w0 2 ; size:= 17171 17916 wa w0 x2+12 ; last(mes) - first(mes) + 2; 17172 17918 ws w0 x2+10 ; 17173 17920 jl. w3 u14. ; convert to 8bit(size); 17174 17922 ws w0 x2+14 ; rem:= size - chars(mes); 17175 17924 sl w0 0 ; if rem < 0 or 17176 17926 sl w0 3 ; rem > 2 17177 17928 jl. j0. ; then deliver result 3; 17178 17930 bz w0 x2+8 ; oper:= operation(mes); 17179 17932 se w0 3 ; if oper = input or 17180 17934 sn w0 5 ; oper = output 17181 17936 jl. u2. ; then goto testmore 17182 17938 j0: al w0 3 ; else deliver result 3; 17183 17940 jl w3 g19 ; 17184 17942 jl. u2. ; goto testmore; 17185 17944 17185 17944 e. ; end of after send message 17186 17944 \f 17186 17944 ; fpa-subproc character level i/o 17187 17944 ; ncj, 2.01.1980 17188 17944 17188 17944 ; before header 17189 17944 ; 17190 17944 ; a header (and maybe a corresponding datablock) is to be transmitted. 17191 17944 ; find first non-processed message in queue of subproc and initialize 17192 17944 ; transmit-parameters in mainproc. 17193 17944 ; 17194 17944 ; upon entry: 17195 17944 ; w0 17196 17944 ; w1 subproc 17197 17944 ; w2 17198 17944 ; w3 17199 17944 17199 17944 b. i10, j10 17200 17944 w. 17201 17944 q1: ; before header: 17202 17944 jl. w3 u20. ; test answer attention 17203 17946 jl. w3 u12. ; w2:=mes:= first pending message 17204 17948 sn w2 0 ; if mes=0 then 17205 17950 jl. u3. ; goto no block. 17206 17952 17206 17952 ; message found. initiate transfer 17207 17952 17207 17952 jl. w3 u30. ; prepare transfer 17208 17954 rl w3 x1+a50 ; main:= main(subproc); 17209 17956 rl w0 x2+14 ; chars:= chars(mess); 17210 17958 sl w0 (x3+p64) ; if chars < header size(main) then 17211 17960 jl (b101) ; 17212 17962 rs w0 x3+p64 ; header size(main):= chars; 17213 17964 rs w0 x2+20 ; expected size(mes):= chars; 17214 17966 bz w1 x2+8 ; oper:= operation(mes); 17215 17968 sn w1 5 ; if oper = output 17216 17970 rs w0 x3+p66 ; then data size(main):= chars; 17217 17972 jl (b101) ; 17218 17974 17218 17974 e. ; end of before header 17219 17974 \f 17219 17974 ; fpa-subproc character level i/o 17220 17974 ; ncj, 2.01.1980 17221 17974 17221 17974 ; after header and data transmitted 17222 17974 ; 17223 17974 ; entered by mainproc, when a header and a corresponding datablock 17224 17974 ; (if any) has been transmitted. 17225 17974 ; the result of the transmission is checked and if an error has 17226 17974 ; occured, the message is returned with result=4 (receiver 17227 17974 ; malfunction). 17228 17974 ; 17229 17974 ; finally the state of the subproc is checked for transmission of a 17230 17974 ; new block. 17231 17974 17231 17974 b. i10, j10 17232 17974 w. 17233 17974 17233 17974 q2: jl. w3 u40. ; after header: test header transmitted 17234 17976 jl. u2. ; error: goto testmore 17235 17978 jl. u2. ; goto testmore 17236 17980 17236 17980 e. ; end of header and data transmitted 17237 17980 \f 17237 17980 ; fpa-subproc character level i/o 17238 17980 ; ncj, 2.01.1980 17239 17980 17239 17980 ; after header received 17240 17980 ; 17241 17980 ; a header has been received. 17242 17980 ; for this kind of subprocs (with no special actions) it can 17243 17980 ; only specify the functions <answer input with data> or 17244 17980 ; <answer message with data>. 17245 17980 ; 17246 17980 ; upon entry: 17247 17980 ; w0 17248 17980 ; w1 subproc 17249 17980 ; w2 17250 17980 ; w3 17251 17980 17251 17980 b. i10, j10 17252 17980 w. 17253 17980 17253 17980 q3: jl. w3 u50. ; after header received: test answer header 17254 17982 jl. u2. ; goto testmore 17255 17984 17255 17984 e. ; end of after header received 17256 17984 \f 17256 17984 ; fpa-subproc character level i/o 17257 17984 ; ncj, 2.01.1980 17258 17984 17258 17984 ; after data received 17259 17984 ; 17260 17984 ; check transmission. 17261 17984 ; 17262 17984 ; upon entry: 17263 17984 ; w0 17264 17984 ; w1 subproc 17265 17984 ; w2 17266 17984 ; w3 17267 17984 17267 17984 b. i10, j10 17268 17984 w. 17269 17984 17269 17984 q4: jl. w3 u60. ; after data received: test data received 17270 17986 jl. u2. ; goto testmore 17271 17988 17271 17988 ; attention. no special action 17272 17988 17272 17988 jl. u2. ; goto testmore 17273 17990 17273 17990 e. ; end of data received 17274 17990 \f 17274 17990 ; fpa-subproc character level i/o 17275 17990 ; ncj, 2.01.1980 17276 17990 17276 17990 ; after create 17277 17990 ; 17278 17990 ; the subproc has just been created. 17279 17990 ; no special action 17280 17990 ; 17281 17990 ; upon entry: 17282 17990 ; w0 17283 17990 ; w1 subproc 17284 17990 ; w2 17285 17990 ; w3 17286 17990 17286 17990 b. i10, j10 17287 17990 w. 17288 17990 17288 17990 q5: ; after create: 17289 17990 jl (b101) ; goto return 17290 17992 17290 17992 e. ; end of after create 17291 17992 17291 17992 e. ; end of character level i/o 17292 17992 17292 17992 17292 17992 17292 17992 ; end of subprocess-code 17293 17992 ;*********************** 17294 17992 17294 17992 e. 17295 17992 17295 17992 ; end of fpa-driver code 17296 17992 ;*********************** 17297 17992 17297 17992 e. 17298 17992 \f 17298 17992 17298 17992 \f 17298 17992 ▶EOF◀