03/03/89 alm Syntax as a command: alm path {-control_args} Function: translates program containing text of an assembly language program into a Multics standard object segment. Arguments: path is pathname of ALM source program; alm suffix need not be given. The archive component pathname convention is allowed. Control arguments: -list, -ls produces an assembly listing segment. (Default is no listing) -no_symbols, -nsb suppresses listing of cross-reference table produced by default with -list control argument. -brief, -bf does not print errors on terminal. -arguments, -ag Arguments following -arguments are accessible to macros as "&An", and may be tested for with the "ifarg" and "inarg" pseudo-ops. Treatment of errors-- These flags appear in the ALM listing, and on the terminal. Some may be accompanied by an explanatory message from ALM, describing the problem in more detail. Fatal and nonfatal errors differ only in their generation of the "Translation failed" message; an object segment is always generated, though if fatal errors have occurred, it is probably useless. List of error flags: B mnemonic used belongs to obsolete (Honeywell Model 645) processor instruction set. D error in macro definition or macro expansion- more detailed diagnostic for specific error given in listing. (Fatal) E malformed expression in arithmetic field. (Fatal) F error in formation of pseudo-operation operand field. (Nonfatal) M reference to a multiply defined symbol. (Fatal) N unimplemented or obsolete pseudo-operation. (Nonfatal) O unrecognized opcode. (Nonfatal) P phase error; location counter at this statement has changed between passes. (Fatal) R expression has invalid relocatability. (Nonfatal) S error in the definition of a symbol. (Nonfatal) T undefined modifier in tag field. (Nonfatal) U reference to an undefined symbol. (Fatal) 7 digit 8 or 9 appears in an octal field. (Nonfatal) List of alm pseudo-ops: acc /string/,expression -- 9 bit length, 9 bit string aci /string/,expression -- 9 bit string ac4 /string/,expression -- 4 bit string arg operand -- operand in upper halfword bci /string/,expression -- 6 bit string bfs name,expression -- reserve a block of words -- name is the first word after the reserved block block {name} -- start of symbol table definitions for runtime block. bool name,expression (octal) -- define a symbol bss {name},expression -- reserve a named block of words call routine(arglist) -- generate ALM full call, calling routine with specified arglist. dec number1{,number2,...numberN} -- define N decimal numbers dec_unal number1{,number2,...numberN} -- define N unaligned decimal numbers. desc4a address{(offset)},length -- EIS alpha descriptor desc6a address{(offset)},length -- EIS alpha descriptor desc9a address{(offset)},length -- EIS alpha descriptor desc4fl address{(offset)},length{,scale} -- EIS numeric descriptor desc4ns address{(offset)},length{,scale} -- EIS numeric descriptor desc4ns address{(offset)},length{,scale} -- EIS numeric descriptor desc4ts address{(offset)},length{,scale} -- EIS numeric descriptor descb address{(offset)},length -- EIS bit descriptor dup expression -- duplicate code until dupend, as many times as specified by expression. dupend -- terminate a "dup" block end_block -- end of symbol table definitions for runtime block. end_enum -- end of symbol table definition of enumeration set. end_source -- end of symbol table definitions from source program. end_structure -- end of symbol table definition of structure. end_union -- end of symbol table definition of union. enum name -- start of symbol table definition of enumeration set. eight -- align on eight word boundary, pad with NOP entry name1{,name2,...,nameN} -- Make entry sequences for names equ name,expression -- define a symbol error -- cause fatal error and print "Translation failed." message. even -- align on doubleword boundary, pad with NOP ext_entry elabel{,{stacksize}{,{clabel}{,{dlabel}{,function}}}} -- make a probe-able entry sequence for 'elabel' with stackframe size of 'stacksize' and with descriptors at 'dlabel'. 'clabel' will be assigned the address of the code sequence associated with the entrypoint. 'function' indicates that the entrypoint is a function. firstref extexpression1(extexpression2) -- call extexpression1 with arg pointer extexpression2 each time this object segment is made known. getlp -- set PR4 and PR5 (with segdef, simulates effect of entry). PR6 & PR7 must be set properly. PR2, X0, and X7 are changed. include segmentname -- include segmentname.incl.alm inhibit on|off -- start/stop generating instructions with the inhibit bits set. init_link name, extexpression -- associates name as the location of the initialization data for the link mentioned in extexpression. itp prno,offset{,tag} -- generate an ITP doubleword. its segno,offset{,tag} -- generate an ITS doubleword. Should already be doubleword aligned, or labels will be incorrect. join /text/name1{,...}/link/name2{,...}/static/name3{,...} /definition/name1{,...} -- appends location counters (names) to the specified (text/link/static/definition) sections; names must have been defined with a "use" statement. link name,extexpression -- define a link, ref'd with pr4|name,* maclist off|on|object|restore{,save} -- set the state of listing in a macro, optionally saving it for restoration via "restore" macro name -- begin a macro -- terminate with &end mod expression -- align to boundary, pad with NOP name objectname -- define the name of the object segment null -- ignored. oct number1{,number2,...numberN} -- define N octal constants oct_unal number1{,number2,...numberN} -- define N unaligned octal constants. org expression -- set the location counter to expression perprocess_static -- set the perprocess_static switch push {expression} -- generate code to push a stack frame of expression words; if omitted, enough words for all temp pseudo-ops are allocated. rem -- ignored. return -- generate full ALM return segdef name1{,name2,...,nameN} -- define external symbols segref segname,name1{,...,nameN} -- define external references in segname, with implicit pr4 reference. set name,expression -- define a redefinable symbol shortcall routine -- generate ALM short call shortreturn -- generate ALM short call sixtyfour -- align on 64 word boundary, pad with NOP source path -- start of symbol definitions for source program. statement num1,num2,num3{,num4} -- define symbol table entry for source statement that starts at character offset num1, has length num2, is source line number num3 and is statement num4 on the line. structure name -- start of symbol table definitions of structure name. symbol name,type_desc{,expression} -- define symbol name, of type described by type_desc, at location expression. union name -- start of symbol table definitions of union name. temp name1{(n1)}{,name2{(n2)}....} -- define named single word stack temporaries. N1, etc. allocate multiple words per name. tempd name1{(n1)}{,name2{(n2)}....} -- doubleword stack temporaries temp8 name1{(n1)}{,name2{(n2)}....} -- eight word stack temporaries use name -- start using name as a location counter (see join) vfd T1L1/expr1{,T2L2/expr2...} -- generate data. Ln are bit lengths, Tn is "" (decimal), "o" (octal), "a" (ascii). zero {expr1}{,expr2} -- generate expr1 in DU, expr2 in DL, or zero Expressions-- Most pseudo-ops require a decimal dexpression, involving decimal numbers, symbols and the arithmetic operators "+", "-", "*", and "/". Parentheses may also be used. An asterisk in an expression, when not used as an operator, has the value of the current location counter. All symbols in an expression must be absolute, or refer to the same location counter. Relocatable expressions may not be multiplied or divided. Logical expressions are made of octal numbers, symbols, and logical operators: "+" (OR), "-" (XOR), "*" (AND), "^" (NOT). Parentheses may also be used. Logical expressions are used by the bool and vfd pseudo-ops. List of macro constructs: && expands to "&" &# arguments to macro -- # is number &end terminate a macro &A# arguments to alm -ag -- # is number &Fn macro arguments n through last &FQn macro arguments n through last, quoted in parens, for use as arguments to other macros. &u generates a label which is unique within this assembly, of the form .._00000. &p previous &u expansion &n next &u expression &U unique within macro expansion &Rm,n iterate over macro args m through n &(n begin iteration, for "n" times, repeatedly expanding the construct until the &). &) end iteration &i current element of iteration set &x relative position in iteration set &k number of elements in iteration set &K number of arguments to macro &fn iteration set elements n through last &fqn iteration set elements n through last, quoted in parens &[ begin a selection group, at most one component of which will be expanded. &] end a selection group &; separate elements of a selection group &sn select element n of following selection group &=c1,c2 if c1 = c2, expand next selection group. The comparison is a standard ASCII string compare. &^=c1,c2 if c1 ^= c2, expand next selection group &>c1,c2 if c1 > c2 (numeric), expand next selection group &=c1,c2 if c1 >= c2 (numeric), expand next selection group &<=c1,c2 if c1 <= c2 (numeric), expand next selection group List of macro pseudo-ops: warn (message) -- print message on terminal ife arg1,arg2 -- assemble until ifend if arg1 = arg2. No if/ifend pseudo-ops may be nested. ine arg1,arg2 -- assemble until ifend if arg1 ^= arg2 ifarg arg -- assemble until ifend if arg specified after alm -ag inarg arg -- assemble until ifend if arg specified not after alm -ag ifint arg -- assemble until ifend if arg is an integer inint arg -- assemble until ifend if arg is not an integer ifend -- end a conditional assembly block ifend_exit -- end conditional assembly, stop macro expansion. May only be used within a macro. Repeat instruction coding format-- The RPT, RPL, and RPD instructions are coded as follows: rpt tally,delta,term1{,term2 ...} rpl tally,delta,term1{,term2 ...} rpd tally,delta,term1{,term2 ...} These alternate forms are used to indicate that the termination conditions and tally are in X0: rptx ,delta rpdx ,delta The tally and delta must be absolute arithmetic expressions. The rpda, rpdax, rpdb, rpdbx, rpdab, and rpdabx opcodes are used to generate RPD instructions with the A and B bits set. The A bit causes the index register referenced by the even instruction modifier to be incremented in each repeat, and the B bit causes this to be done for the odd instruction. There is no way to set the "ignore overflow" bit. List of repeat termination conditions-- trc terminate on carry tnc terminate on no carry tmi terminate on negative tpl terminate on not negative tze terminate on zero tnz terminate on non-zero ----------------------------------------------------------- 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