" *********************************************************** " * * " * Copyright, (C) Honeywell Information Systems Inc., 1982 * " * * " *********************************************************** " IF command for BOS. " Modified 10/7/76 by Noel I. Morris " ****************************************************** " * * " * * " * Copyright (c) 1972 by Massachusetts Institute of * " * Technology and Honeywell Information Systems, Inc. * " * * " * * " ****************************************************** name if " Usage (in BOS): " IF key COMMAND ARG1 ... ARGn " " Recognized keys are: " FDUMP (fdump state) " SHUT (shutdown state) " SWITCH mask (processor switches) " FLAG flag_number (flag bits) " SSENB (Multics storage system enabled) " RTB (reason for BOS entry) include bosequ " stx2 x2_save tsx2 init_io " initialize things tsx2 cvinit ldx2 x2_save ldx1 mem|0,2 test_arg: lda mem|1,1 " first arg eax7 0 " initialize for search rpt ntable/2,2,tze " search table cmpa table,7 ttn unrecognized_operand xec -1,7 " execute table entry tra check_number " and test result table: bci " not" tra if_not bci " shut" tra check_shutdown_state bci " fdump" lda com|fdump_state bci "switch" tra if_switch bci " flag" tra check_flag bci " ssenb" tra if_ssenb bci " rtb" tra if_rtb equ ntable,*-table if_not: stz eqsw " complement EQ switch eax1 1,1 " step to next parameter tra test_arg " check_shutdown_state: tsx2 find_root " Get devt word for root. tra root_err sta root_devt lda LABEL_ADDR,dl " Get record address of disk label. tsx2 mulbos " Convert to BOS sector address. arg root_devt tra root_err ana =o777777770000 " Leave only the sector address. adla =v24/label.root/64,12/1 tsx2 rdev " Read root volume label. arg root_devt nop label_buffer tra root_err lda label_buffer+label.root-label.root/64*64 " See if it's really the root. tpl root_err " If not, error. lda label_buffer+label.shutdown_state-label.shutdown_state/64*64 tra check_number " Get shutdown state. check_flag: lda =o400000,du " get high-order bit eax1 1,1 " step arg index ldq mem|arglen+1+1,1 " get bit position arl -1,ql " shift bit to position ana fgb|fgbx.flags " mask the flagbox tra check_number " and test the result if_switch: rsw 0 " read switches eax1 1,1 " step parameter index ana mem|1,1 " mask the switches tra check_number if_ssenb: lda fgb|fgbx.rtb " check ssenb bit ana fgbx.ssenb,du tra check_number " if_rtb: eax1 1,1 " step parameter index lda mem|1,1 " get RTB keyword eax7 0 " search table of keywords rpt nrtbtbl/3,3,tze cmpa rtbtbl,7 ttn unrecognized_operand lda fgb|fgbx.rtb " get RTB flags ldq 0,dl " clar Q lrl 6 " transmogrify the bos_entry code qls 1 " 0 => 1,: 1 => 2,: 2 => 4 tnz *+2 orq =1b23,du lls 6 " transmogrified code back in A era -2,7 " test bits ana -1,7 tze *+2 lca 1,dl era =-1 tra check_number rtbtbl: bci "manual" " (bos_entry ^= 1) vfd 18/0 vfd 18/0,18/2 bci " crash" " ^call & (bos_entry ^= 0) vfd 18/fgbx.call_bos vfd 18/fgbx.call_bos,18/1 bci " shut" " shut & (bos_entry = 1) vfd 18/fgbx.shut vfd 18/fgbx.shut,18/5 bci " call" " call_bos & (bos_entry = 1) vfd 18/fgbx.call_bos vfd 18/fgbx.call_bos,18/5 equ nrtbtbl,*-rtbtbl " check_number: sta unknown lda mem|2,1 " can be either EQ or NEQ ldq mem|3,1 " number to compare to cmpa =h eq tze cmp_eq cmpa =h neq tze cmp_neq ldq 0,dl " neither EQ nor NEQ eax1 -2,1 " Step index backwards. cmp_neq: lca 1,dl " NEQ -- complement sense of test ersa eqsw cmp_eq: erq unknown " compare against unknown tze *+2 lcq 1,dl erq eqsw " set sense of compare tnz ifso " nonzero => true tra ifnot " zero -> false " " Set up for chaining to next command. ifso: lca 1,dl cmpa mem|4,1 tze not_enough_args ldx2 x2_save lxl0 mem|0,2 " get location of command line stx0 lineloc " save it orsx0 linedesc " place address in descriptor ldq mem|2*(arglen+1)+4,1" get descriptor for command anq =o077777,du " remove segment tag sblq lineloc " compute offset in line qrl 18 " in QL mpy 6,dl " get character offset stq off " and save lda mem|2*(arglen+1)+4,1" get command descriptor again sta desc " save descriptor arl 15 " character position in AL ana =o7,dl " mask it adla off " compute character offset neg 0 " negate adla 84,dl " compute characters remaining in line stca desc,03 " insert length in descriptor mlr (pr,id),(pr,id),fill(20) " move the line down arg desc arg linedesc ldx2 x2_save lda 0,dl " indicate command line to be rescanned tra mem|1,2 ifnot: lca 1,dl ldx2 x2_save tra mem|1,2 " unrecognized_operand: cmpa =-1 tze not_enough_args sta geword tsx2 erpt acc "unrecognized keyword ^g" arg geword tra ifnot not_enough_args: tsx2 erpt acc "not enough arguments" tra ifnot root_err: tsx2 erpt acc "unable to locate root volume." tra ifnot ttyrequest: tra ifnot " we can never get here, I hope eqsw: dec -1 x2_save: zero linedesc: desc6a mem|0,84 lineloc: zero off: zero desc: zero unknown: zero geword: zero root_devt:bss ,1 sixtyfour label_buffer: bss ,64 " include fgbx include disk_pack include fs_vol_label include bos_tv include bos_common end " " " ----------------------------------------------------------- " " " " 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 " "