PNOTICE_i3270.alm 10/30/83 0909.7r w 10/30/83 0909.7 2853 dec 1 "version 1 structure dec 1 "no. of pnotices dec 3 "no. of STIs dec 100 "lgth of all pnotices + no. of pnotices acc "Copyright (c) 1972 by Massachusetts Institute of Technology and Honeywell Information Systems, Inc." aci "W1IBMM0A2000" aci "W2IBMM0A2000" aci "W3IBMM0A2000" end  ibm3270_tables.map355 04/18/84 1000.8rew 04/18/84 0938.0 150669 * *********************************************************** * * * * * Copyright, (C) Honeywell Information Systems Inc., 1982 * * * * * * Copyright (c) 1972 by Massachusetts Institute of * * * Technology and Honeywell Information Systems, Inc. * * * * * *********************************************************** lbl ,ibm3270_tables ttl ibm3270_tables -- tables for ibm 3270 terminals editp on pcc off pmc off detail off rem i3270 null rem start i3270,,c3ibmm0b0000 rem rem symdef st3270 rem symref bsctst bisync test state handler symref bscwt bisync write routine symref bscwtr bisync write routine with rcv mode set symref bscrd bisync read routine symref bsccki bisync check input message routine symref bsccko bisync check output message routine symref bscswa bisync ack switching routine symref bshang when line hangs up symref bscbad for reporting bad blocks symref cvaddr convert tib ext address symref setbpt rem pmc save,on csbits tconst tib meters buffer bscdat pmc restore rem rem epad bool 377 esyn bool 062 rem rem rem /* input scan control strings */ rem inenq chstr (rescan,match,enq) ineot chstr (rescan,match,tibeot) inack chstr (rescan,match,dle,ignore,match,tiback) innak chstr (rescan,match,tibnak) indisc chstr (rescan,match,dle,ignore,match,tibeot) inwack chstr (rescan,match,dle,ignore,match,wack) inrvi chstr (rescan,match,dle,ignore,match,rvi) rem rem /* output bldmsg control strings */ rem otack chstr (dle,tiback,seteom) otnak chstr (tibnak,seteom) otenq chstr (enq,seteom) oteot chstr (tibeot,seteom) otdisc chstr (dle,tibeot,seteom) otwack chstr (dle,wack,seteom) otttd chstr (stx,enq,seteom) otrvi chstr (dle,rvi,seteom) otpoll equ otenq otetpd chstr (tibeot,epad,esyn,esyn,esyn,esyn) rem ttls 3270 polling and input ************************************************************************ * * enter here for ibm 3270 terminal operation * ************************************************************************ rem st3270 clrlcf exflg1,naksw+nakksw+wacksw+ttdsw+ntrsw+rvisw+needrv clrlcf exflg1,ctlmsg clrlcf exflg2,pollok+polpnd setlcl testrt,testst /* so bisync uses my test state handler */ rem ************************************************************************ * * wait for something to do * ************************************************************************ rem idle tstwrt gosel /* data to write, we can do a select */ tstlcf exflg2,polpnd,gopoll /* previoulsy asked to poll */ setlcf exflg2,pollok /* can accept a poll req now */ wait 0,idle,bsctst /* if output comes in, check for rvi */ status 0,dsr,bshang /* if we lose the line, all bets are off */ rem ************************************************************************ * * asked to start polling operation * ************************************************************************ rem gopoll unwind /* in case subr interrupted */ clrlcf exflg1,rvisw+nakksw clrlcf exflg2,pollok+polpnd+selop /* cant take poll req now */ setchr tiback,ack0 setlcl nakcnt,0 /* initialize nak counter */ setlcl bidcnt,0 /* initialize bid timeout counter */ sndpol bldmsg otpoll,gopunt /* get enq for poll message */ calasm bldpol,polad1 /* add in device selection stuff */ bldmsg otetpd,gopunt setlcf exflg2,pollsw /* remember current message is poll */ sndmsg holdot calsub bscwtr /* write poll */ dmpout pollwt setime 5 /* time limit for response */ calsub bscrd tstlcf exflg2,timout,pollto /* timed out */ tstlcf exflg1,naksw,nakpol /* got bad reply */ calasm bsccki /* check input message */ tstlcl result,reseot,poleot /* eot, end of pool seq */ tstlcl result,resack,pollgd /* got good reply */ tstlcl result,resenq,enqpol /* got enq, so repeat prevous response */ goto nakpol rem ************************************************************************ * * got eot in response to poll * ************************************************************************ rem poleot tstwrt polend /* if data to write, stop polling */ tstlcf exflg2,autopl,conpol /* continue polling if autopoll */ polend sendin /* tell multics we stopped polling */ goto idle conpol dumpin /* thrwo away eot */ setime 1 wait gopoll,idle,bsctst /* tetry poll in 1 second */ status 0,dsr,bshang rem ************************************************************************ * * got a good response in reply to a poll * ************************************************************************ rem pollgd meterm 0 /* meter input */ sendin /* ship it */ calsub bscswa /* switch acks */ sndack bldmsg otack,gopunt /* and acknowledge it */ setlcl nakcnt,0 /* start counting over */ clrlcf exflg1,nakksw /* previous msg not nak */ clrlcf exflg2,pollsw+autopl /* previous msg not poll */ rem /* also, good msg stops auto polling */ goto sndmsg /* go send the ack just built */ rem ************************************************************************ * * got bad reply to poll, send nak * ************************************************************************ rem nakpol meter2 m.cnt1,1 dumpin /* throw away bad msg */ addlcl nakcnt,1 /* dont do this too often */ tstlcl nakcnt,10,manynk sndnak bldmsg otnak,gopunt /* nak bad reply */ setlcf exflg1,nakksw /* last message was nak */ clrlcf exflg2,pollsw /* last message not poll */ goto sndmsg /* go send the nak */ manynk meter2 m.cnt4,1 setlcl ctlop,lstnak /* report error to multics */ calsub sndsta /* report status */ goto eotidl /* send an eot and idle */ rem ************************************************************************ * * got enq reply, so repeat out last response */ * ************************************************************************ rem enqpol dumpin tstlcf exflg1,nakksw,sndnak tstlcf exflg2,pollsw,sndpol goto sndack rem ************************************************************************ * * come here to send an eot to the 3270, and go back to the idle state * ************************************************************************ rem eotidl bldmsg oteot,gopunt holdot calsub bscwt dmpout goto idle ttls 3270 device selection and output rem ************************************************************************ * * come here when output arrives * ************************************************************************ rem gosel setchr tiback,ack0 /* initialize ack */ clrlcf exflg2,pollok /* can't do polls now */ setlcf exflg2,selop /* mark it as select operation */ setlcl nakcnt,0 setlcl bidcnt,0 sndsel bldmsg otpoll,gopunt calasm bldpol,selad1 /* build select msg (looks like poll msg) */ bldmsg otetpd,gopunt holdot calsub bscwtr /* write/read subr in bsc_tables */ dmpout rem selwt setime 5 calsub bscrd /* use bsc_tables subr to get response */ tstlcf exflg2,timout,pollto /* timeout, try again */ rem ************************************************************************ * * look at response to select * ************************************************************************ rem inscan inrvi,tstwck goto gotrvi /* reverse interrupt */ tstwck inscan inwack,tstack goto selwck /* wack */ tstack inscan inack,pollto /* if not ack, unrecognizable */ rem ************************************************************************ * * got an ack for the select, do some writing * ************************************************************************ rem calsub bscswa /* start with ack 1 */ dumpin /* don't need the ack */ goto chkout /* look at output message */ rem ************************************************************************ * * reverse interrupt on select, we should poll now * ************************************************************************ rem gotrvi dumpin calsub dmpall /* get rid of all of output message */ setlcl ctlop,lstrvi /* report rvi back */ calsub sndsta goto eotidl /* wait for poll order */ rem ************************************************************************ * * wack in response to select, send eot, wait and try again * ************************************************************************ rem selwck meter2 m.cnt5,1 dumpin calsub dmpall setlcl ctlop,lstwck calsub sndsta goto eotidl /* go wait for next order */ rem ************************************************************************ * * examine current output message before sending it * ************************************************************************ rem chkout calasm bsccko /* bsc_tables output-message checking rtn */ tstlcl result,resack,sendit /* normal message */ tstlcl result,resinc,getmor /* incomplete message, get the rest of it */ tstlcl result,resnul,outwt /* nothing there at all */ dmpout /* it's no good, remove it */ tstlcl result,reseot,endout /* normal termination, send eot */ calsub bscbad /* anything else is invalid */ goto outwt /* wait for more */ getmor signal sndout /* ask for more */ outwt setimv ttdtim wait sndttd,chkout,bsctst /* arrival of output will stir us */ status 0,dsr,bshang /* so, alas, will lack of dsr */ endout setlcl ctlop,lstwrc /* report write complete */ calsub sndsta goto eotidl rem ************************************************************************ * * ready to send complete output message * ************************************************************************ rem sendit meterm 1 /* count output message */ holdot /* hang on to it until sent */ signal sndout /* ask for next one */ setlcl nakcnt,0 /* initialize counts */ setlcl ttdcnt,0 setlcl enqcnt,0 clrlcf exflg1,ttdsw rem sndagn calsub bscwtr /* write and read response */ sent setime 3 /* which should come within 3 seconds */ calsub bscrd /* go get it */ tstlcf exflg2,timout,ask /* didn't come, check up on it */ rem ************************************************************************ * * have a response, let's examine it * ************************************************************************ rem inscan innak,gotrs1 goto gotnak /* nak, they didn't like it */ gotrs1 inscan inack,gotrs2 goto gudout /* it was accepted */ gotrs2 inscan ineot,gotrs3 goto repeot /* they said eot, something is messed up */ gotrs3 inscan inwack,ask /* if not wack, what is it? */ rem ************************************************************************ * * wack in response to output message * ************************************************************************ rem dumpin /* throw away wack */ calsub dmpall meter2 m.cnt5,1 setlcl ctlop,lstwkm /* report wack to msg */ calsub sndsta goto eotidl rem ************************************************************************ * * good message acknowledged, send next one * ************************************************************************ rem gudout dumpin /* who needs ack? */ calsub bscswa /* switch acks */ dmpout goto chkout /* look at next message */ rem ************************************************************************ * * output hasn't come yet, use ttd to let him know we're still here * ************************************************************************ rem sndttd tstlcv ttdcnt,ttdlmt,fakeot /* have we waited too long? */ addlcl ttdcnt,1 bldmsg otttd,gopunt /* send ttd message */ holdot calsub bscwtr dmpout setlcf exflg1,ttdsw /* so we'll understand nak */ goto sent /* wait for nak */ rem * come here when we get the nak rem ttdnak clrlcf exflg1,ttdsw /* not ttd now */ goto chkout rem ************************************************************************ * * our message got nak'ed * ************************************************************************ rem gotnak dumpin tstlcf exflg1,ttdsw,ttdnak /* if we were doing ttd, that's ok */ meter2 m.cnt2,1 tstlcl nakcnt,3,nakerr /* drop it if too many */ addlcl nakcnt,1 /* count this one */ goto sndagn /* try again */ nakerr calsub dmpall meter2 m.cnt6,1 setlcl ctlop,lstnko calsub sndsta goto eotidl rem ************************************************************************ * * got an eot response, something's wrong * report it so he can try poll to get status * ************************************************************************ rem repeot dumpin calsub dmpall /* not likely to want output again */ setlcl ctlop,lsteot calsub sndsta goto idle rem ************************************************************************ * * last response didn't come or was unrecognizable * send enq to get it repeated * ************************************************************************ rem ask meter2 m.cnt7,1 dumpin tstlcl enqcnt,enqlmt,fakeot /* too many of these */ addlcl enqcnt,1 bldmsg otenq,gopunt /* set up an enq */ holdot calsub bscwtr dmpout goto sent /* wait for response to repeat */ rem ************************************************************************ * * time to send eot message, either because we can't send any more * output, or because it's done * ************************************************************************ rem fakeot setlcl ctlop,lstabo /* this is abnormal one */ dmpout calsub sndsta goto eotidl rem ************************************************************************ * * subroutine to dump all pending output up to and including eot message * ************************************************************************ rem dmpall dmpout tstwrt dmpchk /* next message already here? */ wait 0,dmpchk,bsctst /* no, wait for it to arrive */ status 0,dsr,bshang /* die if phone goes */ rem dmpchk outscn ineot,dmpall /* is it eot message? */ dmpout /* yes, throw it away and we're done */ retsub ttls unsuccessful poll or select rem ************************************************************************ * * time out waiting for poll /select reply */ * ************************************************************************ rem pollto meter2 m.cnt3,1 dumpin bldmsg oteot,gopunt /* reset 3270 */ holdot calsub bscwtr dmpout tstlcl bidlmt,0,pollt1 /* unmlimited retries */ addlcl bidcnt,1 tstlcv bidcnt,bidlmt,badpol pollt1 tstlcf exflg2,selop,sndsel /* send select again */ goto sndpol /* send poll again */ badpol tstlcl exflg2,selop,badsel setlcl ctlop,lstbdf /* report poll failure */ calsub sndsta goto idle badsel calsub dmpall setlcl ctlop,lstslf /* report select error */ calsub sndsta goto idle rem ************************************************************************ * * routine to report line status and stop polling * ************************************************************************ rem sndsta clrlcf exflg2,autopl+polpnd linsta ctlop retsub ttls assembler language subroutines ************************************************************************ * * routine to build a poll req by editing the poll address * into the current output buffer before the enq it * already has in it. * ************************************************************************ rem bldpol subr blp ldx3 0,3 get addr of arg tsy a.a001-*,* =cvaddr, cvt to real address cx3a ora l.a001-* turn into char address cax3 ldq 0,3,b.0 pick up count iacx3 0,b.1 skip over count lda t.ocp,1 current buffer tsy a.a002-*,* setbpt cax2 cqa get count into a asa bf.tly,2 update tally with length of address cx2a iaa bf.dta address of data in buffer ora l.a001-* make into character address cax2 lda 0,2,b.0 pick up enq sta blpsv1-* save for a while iaq 0 to test the q blp020 tze blp010-* no chars left in addr to copy lda 0,3,b.0 pick up addr char sta 0,2,b.0 copy into buffer iacx2 0,b.1 iacx3 0,b.1 iaq -1 tra blp020-* loop thru address blp010 lda blpsv1-* retrieve the saved enq sta 0,2,b.0 add to end of address ldx2 l.a002-* =0, means inline return return bldpol rem blpsv1 bss 1 rem a.a001 ind cvaddr a.a002 ind setbpt rem l.a001 ind 0,b.0 l.a002 oct 0 ttls test_state handler ************************************************************************ * * test state handler. most things are left to bsc handler * ************************************************************************ rem testst tstlcl ctlop,lctpol,rqpoll /* poll request handled here */ tstlcl ctlop,lctsta,stpaut /* stop auto polling */ waitm rqpoll clrlcf exflg2,autopl /* assume not auto-polling */ tstlcl ctlvl1,0,rqpol2 /* it isnt */ setlcf exflg2,autopl /* it is */ rqpol2 tstlcf exflg2,pollok,gopoll /* go start poll if ok now */ setlcf exflg2,polpnd /* otherwise, save for later */ waitm stpaut clrlcf exflg2,autopl /* auto polling will stop soon */ waitm rem gopunt punt 0 rem * * limit for number of enq's we will send in succession * enqlmt equ 3 rem end bull_copyright_notice.txt 08/30/05 1008.4r 08/30/05 1007.3 00020025 ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group Bull including Bull HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell Bull Inc., Groupe Bull and Bull HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato.Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, Bull or Bull HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by Bull HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved