" " Begin include file ...... nextline.incl.alm " Modified 6/9/76 by Noel I. Morris " Last modified by Sherman D. Sprague 02/11/81 for DPS8 support. " " tsx2 nextline to fill line with next input line " from tty, cards, or macro file nextline: stx0 nlx save xrs stx1 nlx+1 stx2 nlx+2 nlagain: lda com|inputsw read from tty, cards, or macro file arl 18-6 tra *+1,au tra nltty tra nlcd tra nlma nltty: tsx2 readtty read from tty tra nlsw null line tra nlscan good line, scan it nlcd: tsx2 readcd read a card tra nlsw end of deck tra nlpt good read, print it nxtlinea: stx0 nlx here to scan line already read in stx1 nlx+1 stx2 nlx+2 tra nlscan check for 'tty', etc. " nlma: szn com|macroloc are we still tze nlsw lxl0 com|macroloc reading from macro file anx0 =o7777,du mask offset eax1 0 word count in line mlr (),(),fill(20) clear line image desc6a *,0 desc6a line,84 tsx2 nlget get next word from file cmpa =-1 if fence, runcom is finished tze nlswma .. ana =o777777,du mask length of this line sta nllen .. nlloop: cmpx1 nllen test for completion of copy tpl nlmae .. tsx2 nlget get next word from file sta line,1 place in line eax1 1,1 step to next tra nlloop and loop nlmae: eaa 0,0 buffer index in AU arl 18 move to AL stca com|macroloc,03 save buffer index szn nlraw expand args? tnz nlpt if not, just print expanded line mlr (),(),fill(20) blank out expanded line desc6a *,0 nlbufdesc:desc6a nlbuf,84 ldq 84,dl Q contains remaining output length eax0 0 X0 is output offset eax5 84 X5 contains remaining input length eax6 0 X6 is input offset nlxloop: scm (x6,rl),(du) search for "&" desc6a line,x5 bci "&" arg nllen tsx2 nlxpand copy everything up to "&" mlr (x6,rl,id),(x0,rl) desc6a line,x7 ttn nlmpt if no "&", we're finished adx6 nlno bump input offset eax6 1,6 plus one for "&" sbx5 nlno decrement remaining characters eax5 -1,5 .. tmoz nlmpt if empty, we're finished mrl (x6),(),fill(0) extract next character desc6a line,1 desc6a nlno,6 lxl1 nlno should be single digit cmpx1 10,du test for digit tmi *+2 if not, eax1 0 make it zero lda com|macroargs,1 get appropriate arg descriptor sta nlxdesc save it ana =o7777,dl mask the length sta nllen and save tsx2 nlxpand copy arg into line mlr (pr,id),(x0,rl) nlxdesc: bss ,1 eax6 1,6 step over digit eax5 -1,5 .. tpnz nlxloop if characters left, loop nlmpt: szn com|skipsw skipping lines? tze nlmpr if not, just print line and execute tsx2 erpt print out expanded line acc "^g ^G" arg =h!!?!!? arg nlbufdesc tsx2 readtty read a line from console tra nlagain if null, ignore this line tsx2 scan parse input lda arg get first parameter cmpa =h x x? tze nlmx execute this line but remain in skip mode cmpa =h c c? tnz nlmpt turn off skip mode and proceed stz com|skipsw turn off skip mode tra nlmpx copy and expand line nlmpr: szn com|quietsw quiet mode? tnz nlmpx if so, skip printing tsx2 type write out line to be executed zero nlbuf,14 nlmpx: mlr (),(),fill(20) copy expanded line desc6a nlbuf,84 desc6a line,84 tra nlscan parse input " nlmx: ldq arg+1 look at next arg cmpq =-1 fence? tze nlmpx execute line, but stay in skip mode ldq earg+1 get descriptor to rest of line qrl 15 character offset in QL anq =o7,dl .. stq nlno save it ldq earg+1 descriptor in Q again sblq line,du get offset from beginning qrl 18 in QL mpy 6,dl in characters adq nlno plus character offset stq nlno save offset lda 84,dl line length in A sba nlno minus offset mlr (rl,ql),(),fill(20) copy rest of line desc6a line,al desc6a line,84 tra nlscan now scan new command line " nlget: stx2 nlgx2 subr to get one word from runcom file cmpx0 64,du does buffer need reloaded tmi nlnoload lda com|macroloc reload buffer ada =o10000,dl sta com|macroloc bump addr ana =o777777770000 ora =1,dl tsx2 rdsec nop com|macrobuf dis * eax0 0 nlnoload: lda com|macrobuf,0 copy word eax0 1,0 nlgx2: eax2 * restore X2 tra 0,2 and return with word in A nlxpand: cmpq nllen enough room left in line? tpl *+2 if not, stq nllen use as much space as remains lxl7 nllen length in X7 tze 2,2 return if zero lenth xec 0,2 mlr arg 1,2 desc6a nlbuf,x7 stx7 nlno store length in upper adx0 nlno bump offset sbq nllen decrement length tmoz nlmpt if full, all finished tra 2,2 return to caller " nlpt: szn com|quietsw if quiet tnz nlscan then don't print tsx2 type zero line,14 nlscan: tsx2 scan scan line into args szn nlraw if quiet and tty commands are to be skipped tnz nlnocard used by do lda arg cmpa =-1 if no args (blank line) tze nlagain cmpa =h quiet tnz nlnr lda arg+1 if quiet command check on/off era =h off sta com|quietsw tra nlagain nlnr: cmpa =h ready tnz nlnp lda arg+1 if ready command check on/off era =h on sta com|readysw tra nlagain nlnp: cmpa =hprompt tnz nlnq lda arg+1 if prompt command check on/off era =h on sta com|ttypmtsw tra nlagain nlnq: cmpa =h tty tnz nlnotty lda com|inputsw stack inputsw arl 6 sta com|inputsw read now from tty tra nlagain nlnotty: cmpa =h cards tnz nlnocard lda com|inputsw start reading from cards arl 6 ora =o010000,du sta com|inputsw lda arg+1 see if channel # supplied tmi nlagain als 18 sta com|rdrchanno tra nlagain nlnocard: nlx: eax0 * eax1 * tra * nlswma: stz com|macroloc we are no longer using macro file stz com|skipsw nlsw: lda com|inputsw unstack inputsw als 6 sta com|inputsw szn nlraw tnz nlx tra nlagain " nlraw: oct 0 nllen: bss ,1 nlno: bss ,1 nlbuf: bss ,14 " End of include file ...... nextline.incl.alm " " " ----------------------------------------------------------- " " " " 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 " "