DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦a73c762e5⟧ TextFile

    Length: 172032 (0x2a000)
    Types: TextFile
    Names: »listtrans01«

Derivation

└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
    └─⟦b2ec5d50f⟧ 
        └─⟦this⟧ »listtrans01« 

TextFile


t290xasm d.810630.1455
  0     1 begin
  1     2   message version 790505;
  1     3 algol copy.tcgproclib;
tcgproclib d.800929.1732
  1     3 procedure init_long_array(arr,init);
  1     4 <***********************************>
  1     5 value init; integer init;
  1     6 long array arr;
  1     7 begin
  2     8 <* intialize an array of type long with the value of init *>
  2     9 integer upper_bound,lower_bound;
  2    10 long array field laf1,laf2;
  2    11 lower_bound := system(3,upper_bound,arr);
  2    12 laf1:= 4 * lower_bound; laf2 := laf1 - 4;
  2    13 arr.laf2(1) := extend init;
  2    14 tofrom(arr.laf1,arr.laf2,(upper_bound - lower_bound) * 4);
  2    15 end init_long_table;
  1    16 procedure std_table(table);
  1    17 <*************************>
  1    18 integer array table;
  1    19 begin integer i;
  2    20 for i:=0 step 1 until 127 do
  2    21 table(i):= case i+1 of
  2    22   ( 0,7,7,7,7,7,7,7,7,7,8,7,8,0,7,7,
  2    23     7,7,7,7,7,7,7,7,7,8,7,7,7,7,7,7,
  2    24     7,7,7,7,7,7,7,5,7,7,7,3,7,3,4,7,
  2    25     2,2,2,2,2,2,2,2,2,2,7,7,7,7,7,7,
  2    26     7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
  2    27     6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,
  2    28     7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
  2    29     6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0) shift 12 + i;
  2    30 end std_table;
  1    31 \f

  1    31 
  1    31 
  1    31 
  1    31 message cg proc lib 800408                             page xx;
  1    32 integer procedure get_bool_string(search_string,result);
  1    33 <*******************************************************>
  1    34 string search_string; boolean result;
  1    35 begin
  2    36 long array search_name(1:2);
  2    37 real array field raf;
  2    38 raf := 0;
  2    39 movestring(search_name.raf,1,search_string);
  2    40 get_bool_string := get_bool_arg(search_name,result);
  2    41 end get_bool_string;
  1    42 
  1    42 boolean procedure bool_arg_string(search_string);
  1    43 <************************************************>
  1    44 string search_string;
  1    45 begin
  2    46 boolean result;
  2    47 long array search_name(1:2);
  2    48 real array field raf;
  2    49 raf := 0;
  2    50 movestring(search_name.raf,1,search_string);
  2    51 get_bool_arg(search_name,result);
  2    52 bool_arg_string := result;
  2    53 end bool_arg_string;
  1    54 
  1    54 
  1    54 
  1    54 integer procedure get_bool_arg(search_name,result);
  1    55 <**************************************************>
  1    56 long array search_name;
  1    57 boolean result;
  1    58 begin
  2    59 long array param_name,match_name(1:2);
  2    60 integer sep_and_length,item_no;
  2    61 boolean default;
  2    62 real array field raf;
  2    63 raf := 0;
  2    64 result := default := false;
  2    65  
  2    65 if search_param_name(search_name,item_no) = 0 then
  2    66   begin
  3    67   get_bool_arg := 0;
  3    68   item_no := item_no + 1;
  3    69   
  3    69   if system(4,item_no,param_name) extract 12 = 10 then
  3    70     begin
  4    71     if param_name(1) = long <:yes:> or
  4    72        param_name(1) = long <:ja:> then
  4    73        result := true
  4    74      else
  4    75     if param_name(1) = long <:no:> or
  4    76        param_name(1) = long <:nej:> then
  4    77        result := false
  4    78      else
  4    79        get_bool_arg := 4;
  4    80      end
  3    81     else
  3    82     get_bool_arg :=4;
  3    83    end
  2    84  else
  2    85   get_bool_arg := 2;
  2    86 end get_bool_arg;
  1    87 message cg proc lib 800707;
  1    88 integer procedure get_text_string(search_string,return_name);
  1    89 string search_string; long array return_name;
  1    90 begin
  2    91 long array search_name(1:2);
  2    92 real array field raf;
  2    93 raf := 0;
  2    94 movestring(search_name.raf,1,search_string);
  2    95 get_text_string := get_text_arg(search_name,return_name);
  2    96 end get_text_string;
  1    97 
  1    97 integer procedure get_text_arg(search_name,return_name);
  1    98 <*******************************************************>
  1    99 long array search_name,return_name;
  1   100 begin
  2   101 integer item_no,sep_and_length;
  2   102 real array field raf;
  2   103 raf := 0;
  2   104 if search_param_name(search_name,item_no) = 0 then
  2   105   begin
  3   106   item_no := item_no + 1;
  3   107   sep_and_length := system(4,item_no,return_name.raf);
  3   108   if sep_and_length extract 12 = 10 then
  3   109     get_text_arg := 0
  3   110   else
  3   111     get_text_arg := 4;
  3   112   end
  2   113  else get_text_arg := 2;
  2   114 end get_text_arg;
  1   115 message cg proc lib 800707;
  1   116 integer procedure get_int_string(search_string,return);
  1   117 <*****************************************************>
  1   118 string search_string; integer return;
  1   119 begin
  2   120 long array search_name(1:2);
  2   121 real array field raf;
  2   122 raf := 0;
  2   123 movestring(search_name.raf,1,search_string);
  2   124 get_int_string := get_int_arg(search_name,return);
  2   125 end get_int_string;
  1   126 
  1   126 
  1   126 integer procedure get_int_arg(search_name,return);
  1   127 <************************************************>
  1   128 long array search_name;
  1   129 integer return;
  1   130 begin
  2   131 integer sep_and_length,item_no;
  2   132 long array param_name(1:2);
  2   133 real array field raf;
  2   134 raf := 0;
  2   135 if search_param_name(search_name,item_no) = 0 then
  2   136   begin
  3   137   item_no := item_no + 1;
  3   138   sep_and_length := system(4,item_no,param_name.raf);
  3   139   if system(4,item_no,param_name.raf) extract 12 = 4 then
  3   140     begin
  4   141     return := param_name.raf(1);
  4   142     get_int_arg := 0;
  4   143     end
  3   144    else
  3   145     get_int_arg := 4;
  3   146   end
  2   147  else
  2   148   get_int_arg := 2;
  2   149 end get_int_arg;
  1   150 
  1   150 integer procedure get_int_set_arg(search_name,return_set,no_in_set);
  1   151 <******************************************************************>
  1   152 long array search_name;
  1   153 long array return_set;
  1   154 integer no_in_set;
  1   155 begin
  2   156 integer sep_and_length,
  2   157         item_no,
  2   158         set_index,
  2   159         low_set,
  2   160         high_set;
  2   161 long array param_name(1:2);
  2   162 real array field raf;
  2   163 raf := 0;
  2   164 low_set := system(3,high_set,return_set);
  2   165 set_index := low_set;
  2   166 
  2   166 no_in_set := 0;
  2   167 if search_param_name(search_name,item_no) = 0 then
  2   168   begin
  3   169   for item_no := item_no + 1 while
  3   170       set_index <= high_set
  3   171       and
  3   172        system(4,item_no,param_name.raf) = 8 shift 12 + 4 do
  3   173     begin
  4   174     return_set(set_index) := param_name.raf(1);
  4   175     set_index := set_index + 1;
  4   176     end;
  3   177 
  3   177   no_in_set := set_index - low_set;
  3   178   get_int_set_arg := if low_set = set_index then 4 else 0;
  3   179   end
  2   180  else get_int_set_arg := 2;
  2   181 end get_int_set_arg;
  1   182 
  1   182 integer procedure get_int_set_string(search_string,return_set,no_in_set);
  1   183 string search_string;
  1   184 long array return_set;
  1   185 integer no_in_set;
  1   186 begin
  2   187 long array search_name(1:2);
  2   188 real array field raf;
  2   189 raf := 0;
  2   190 movestring(search_name.raf,1,search_string);
  2   191 get_int_set_string := get_int_set_arg(search_name,return_set,no_in_set);
  2   192 end get_int_set_string;
  1   193 
  1   193 
  1   193 message cg proc lib 800707;
  1   194 
  1   194 
  1   194 integer procedure search_param_name(search_name,item_no);
  1   195 <*******************************************************>
  1   196 long array search_name;            
  1   197 integer item_no;
  1   198 begin
  2   199 integer search_no,sep_and_length;
  2   200 long array param_name(1:2);
  2   201 boolean found;
  2   202 real array field raf;
  2   203 raf := 0;
  2   204 found := false;
  2   205 search_no := if get_left_side(param_name) = 0 then 2 else 1;
  2   206 search_param_name := 2;
  2   207 if search_name(1) extract 8 = 0 then search_name(2) := 0;
  2   208 for sep_and_length := system(4,search_no,param_name.raf) while
  2   209     sep_and_length  <> 0 and -, found do
  2   210     begin
  3   211 
  3   211     if param_name(1) = search_name(1) and
  3   212        param_name(2) = search_name(2) then
  3   213        begin
  4   214        item_no := search_no;
  4   215        found := true;
  4   216        search_param_name := 0;
  4   217        end
  3   218      else search_no := search_no + 1;
  3   219 
  3   219      end;
  2   220 end search_param_name;
  1   221 
  1   221 integer procedure get_left_side(param_name);
  1   222 <******************************************>
  1   223 long array param_name;
  1   224 begin
  2   225 integer sep_and_length;
  2   226 real array field raf;
  2   227 raf := 0;
  2   228 
  2   228 get_left_side := 2;
  2   229 if system(4,1,param_name.raf) = 6 shift 12 + 10 
  2   230    <* fp left side *> then
  2   231   begin
  3   232   get_left_side :=0;
  3   233   sep_and_length := system(4,0,param_name.raf);
  3   234   end;
  2   235 end get_left_side;
  1   236 
  1   236 integer procedure get_next_free_text(param_name);
  1   237 <***********************************************>
  1   238 long array param_name;
  1   239 begin own integer no;
  2   240 get_next_free_text := get_free_text(no+1,param_name);
  2   241 no := no + 1;
  2   242 end get_next_free_text;
  1   243 
  1   243 integer procedure get_free_text(no,param_name);
  1   244 <**********************************************>
  1   245 value no;
  1   246 integer no;
  1   247 long array param_name;
  1   248 begin
  2   249 real array look_ahead_param(1:2);
  2   250 real array field raf;
  2   251 integer start_index,sep_and_length,no_found;
  2   252 raf:=0;               
  2   253 no_found := 0;
  2   254 if get_left_side(param_name) = 0 then
  2   255  start_index := 2 else start_index := 1;
  2   256 repeat
  2   257   sep_and_length := system(4,start_index,param_name.raf);
  2   258   if sep_and_length  = 4 shift 12 + 10 then
  2   259     begin
  3   260     sep_and_length :=system(4,start_index + 1,look_ahead_param);                 
  3   261     if sep_and_length shift (-12) < 6 then
  3   262        no_found := no_found + 1;
  3   263      end;
  2   264   start_index := start_index+1;
  2   265  until sep_and_length = 0 or no_found = no;
  2   266  if no = no_found then
  2   267    get_free_text := 0
  2   268   else
  2   269    get_free_text := 2;
  2   270 end get_free_text;
  1   271 message cg proc lib 800707 < connect zone >                     page XX;
  1   272 
  1   272 
  1   272 integer procedure connect_file_in(param_name);
  1   273 <***************************************>
  1   274 long array param_name;
  1   275 begin
  2   276 own boolean called_before;
  2   277 integer result;
  2   278 long array empty_param_name(1:1);
  2   279 empty_param_name(1) := 0;
  2   280 result := get_next_free_text(param_name);
  2   281 if result <> 0 and -, called_before then
  2   282   begin
  3   283   get_connected_name(in,param_name);
  3   284   connect_file_in := 0;
  3   285   end
  2   286  else
  2   287 if result <> 0 and called_before then
  2   288   begin
  3   289   connect_file_in := 2;
  3   290   end
  2   291  else
  2   292 if result = 0 then
  2   293   begin
  3   294   stack_and_connect_in(empty_param_name);
  3   295   connect_file_in := stack_and_connect_in(param_name);
  3   296   end;
  2   297 called_before := true;
  2   298 end connect_file_in;
  1   299 
  1   299 
  1   299 procedure get_connected_name(z,param_name);
  1   300 <*****************************************>
  1   301 zone z;
  1   302 long array param_name;
  1   303 begin
  2   304 integer array tail(1:20);
  2   305 getzone6(z,tail);
  2   306 
  2   306 param_name(1) := extend tail(2) shift 24 + tail (3);
  2   307 param_name(2) := extend tail(4) shift 24 + tail(5);
  2   308 end get_connected_name;
  1   309 
  1   309 integer procedure stack_and_connect_in(doc_name);
  1   310 <**********************************************>
  1   311 long array doc_name;
  1   312 begin
  2   313 <* stack current zone in if docname(1) <> 0 and
  2   314    connect current zone in to docname.
  2   315    if docname = 0 and in is previous stacked
  2   316    then current zone in is unstacked *>
  2   317 own integer stacked;  
  2   318 integer result;
  2   319 
  2   319 if doc_name(1) <> 0 then
  2   320   begin
  3   321   fp_proc(29) stack current in :(0,in,0);
  3   322   fp_proc(27) connect current in:(result,in,doc_name);
  3   323   if result <> 0 then
  3   324     begin
  4   325     fp_proc(30) unstack current in:(0,in,0);
  4   326     stack_and_connect_in := 4
  4   327     end
  3   328    else
  3   329     begin
  4   330     stacked := stacked + 1;
  4   331     stack_and_connect_in := 0
  4   332     end;
  3   333   end
  2   334  else
  2   335   if doc_name(1) = 0 then
  2   336     begin
  3   337     if stacked > 0 then
  3   338       begin
  4   339       fp_proc(30) unstack current in:(0,in,0);
  4   340       stacked := stacked -1;
  4   341       end;
  3   342     stack_and_connect_in := 0;
  3   343     end docname empty;
  2   344 
  2   344 end stack_and_connect_in;
  1   345 integer procedure connect_out_to_left_side(allways,drum);
  1   346 <*******************************************************>
  1   347 value allways,drum; boolean allways,drum;
  1   348 <* if all ways then a area is created on 1 segm 
  1   349    if the file is not existent then a area is created 
  1   350    on 1 segm. if drum the area is created on prefearable drum *>
  1   351 begin
  2   352 own integer connected;
  2   353 integer result, create_mask;
  2   354 long array docname(1:2);
  2   355 result := 0;
  2   356 if  connected = 0 then
  2   357   begin
  3   358   if get_left_side(doc_name)  = 0 then
  3   359      begin
  4   360      create_mask := if allways then ( 1 shift 2 ) else 0;
  4   361      create_mask := if drum then create_mask add 1 else create_mask;
  4   362      result := stack_and_connect_out(doc_name,create_mask);
  4   363      if result = 0 then connected := 2 else connected := 6;
  4   364       end
  3   365      else
  3   366      connected := 4;
  3   367   end
  2   368  else
  2   369 if connected = 2 then
  2   370   begin
  3   371   fp_proc(34) close up:(0,out,25);
  3   372   fp_proc(79) terminate zone :(0,out,0);
  3   373   doc_name(1) :=0;
  3   374   result := stack_and_connect_out(doc_name,create_mask);
  3   375   connected := 6;
  3   376   end;
  2   377 connect_out_to_left_side := result;
  2   378 end connect_out_to_left_side;
  1   379 integer procedure stack_and_connect_out(doc_name,create_mask);
  1   380 <**********************************************************>
  1   381 value create_mask; integer create_mask; long array doc_name;
  1   382 begin
  2   383 own integer stacked_out;
  2   384 own long stack_chain_1,stack_chain_2;
  2   385 integer result;
  2   386 long array stack_chain_address(1:2);
  2   387 
  2   387 if doc_name(1) = 0 and stacked_out > 0 then
  2   388   begin
  3   389   stack_chain_address(1) := stack_chain_1;
  3   390   stack_chain_address(2) := stack_chain_2;
  3   391   fp_proc(30,0,out,stack_chain_address);
  3   392   stacked_out := stacked_out -1;
  3   393   stack_and_connect_out := 1;
  3   394   end
  2   395  else
  2   396 if doc_name(1) <> 0 then
  2   397   begin
  3   398   stacked_out := stacked_out + 1;
  3   399   fp_proc(29,0,out,stack_chain_address);
  3   400   stack_chain_1 := stack_chain_address(1);
  3   401   stack_chain_2 := stack_chain_address(2);
  3   402   result := create_mask;
  3   403   fp_proc(28) connect out:(result,out,doc_name);
  3   404   if result = 0 then
  3   405     stack_and_connect_out := 0 else
  3   406     stack_and_connect_out := result;
  3   407    end
  2   408   else stack_and_connect_out := 4;
  2   409 end stack_and_connect_out;
  1   410 message cg proc lib 800724 < print file and help >     page xx;
  1   411 procedure get_doc_spec(z,mode,kind,name);
  1   412 <***************************************>
  1   413 zone z; integer mode,kind; long array name;
  1   414 begin
  2   415 integer array zone_description(1:20);
  2   416 get_zone6(z,zone_description);
  2   417 mode := zone_description(1) shift (-12);
  2   418 kind := zone_description(1) extract 12;
  2   419 name(1) := extend(zone_description(2)) shift 24
  2   420            add zone_description(3);
  2   421 name(2) := extend(zone_description(4)) shift 24
  2   422            add zone_description(5);
  2   423 end get_doc_spec;
  1   424 
  1   424 
  1   424 procedure help_string(file_name_string);
  1   425 <**************************************>
  1   426 string file_name_string;
  1   427 begin
  2   428 long array file_name(1:2);
  2   429 real array field raf;
  2   430 raf:=0;
  2   431 movestring(file_name.raf,1,file_name_string);
  2   432 help(out,file_name);
  2   433 end help_string;
  1   434 
  1   434 procedure help(out,file_name);
  1   435 <************************>
  1   436 zone out; long array file_name;
  1   437 begin
  2   438 <*  prints the contents of the file <file_name> on current out.
  2   439     if current out is a terminal the file is printed 22 lines at 
  2   440     in blocks of 22 lines, after which a continuation char is
  2   441     asked for.
  2   442     if current out is anything else the whole file is printed.
  2   443 *>
  2   444 
  2   444 zone help_file(128,1,stderror);
  2   445 integer array line(0:132); <* line of 0 contain no of last element *>
  2   446 integer nextchar,linelimit,block_line_limit,
  2   447         continuation_char,line_length_limit,line_no,
  2   448         last_char, mode, kind;
  2   449 long array out_doc_name(1:2);
  2   450 boolean terminal;
  2   451 
  2   451 integer procedure read_line;
  2   452 begin
  3   453 integer char;
  3   454 nextchar := 1;
  3   455 repeat
  3   456   read_char(help_file,char);
  3   457   line(next_char) := char;
  3   458   next_char := next_char + 1;
  3   459 until char = 'nl' or char = 'em' or next_char >= line_length_limit;
  3   460 read_line := char;
  3   461 line(0) := nextchar -1;
  3   462 
  3   462 end;
  2   463 
  2   463 procedure write_line;
  2   464 begin
  3   465 integer char;
  3   466 for index := 1 step 1 until line(0) do
  3   467   outchar(out,line(index));
  3   468 end;
  2   469 line_limit := 22;
  2   470 line_length_limit := 79;
  2   471 
  2   471 open(help_file,4,file_name,0);
  2   472 get_doc_spec(out,mode,kind,out_doc_name);
  2   473 terminal := if kind = 8 then true else false;
  2   474 
  2   474 repeat
  2   475   line_no := 0;
  2   476   for line_no := line_no + 1 while last_char <> 'em' and 
  2   477                                    line_no <= line_limit do
  2   478     begin
  3   479     last_char := read_line;
  3   480     write_line;
  3   481     end;
  2   482  if last_char <> 'em' and terminal then
  2   483   begin
  3   484   write(out,<:<10>>>> MORE HELP? type 'c' otherwise 'e' :>);
  3   485   setposition(out,0,0);
  3   486   repeat
  3   487   read_char(in,continuation_char);
  3   488  until continuation_char>32;
  3   489   end;
  2   490 until continuation_char <> 'c' or last_char = 'em' ;
  2   491 
  2   491  
  2   491 close(help_file,true);
  2   492 setposition(out,0,0);
  2   493  
  2   493 fp_proc(7) finis program:(0,0,0);
  2   494 
  2   494 end help;
  1   495 

t290xasm
  1   495 
  1   495   integer elements_pr_line,                   
  1   496   length_of_code,
  1   497   half_words_pr_instr,no_of_bits_in_code,                  
  1   498   HEAP_length,
  1   499   search_table_length,
  1   500   no_of_errors,
  1   501   name_table_length,index,           
  1   502   code_kind,start_addrs;
  1   503 
  1   503   integer field refference_first_free,refference_last_free;
  1   504   integer comma_class,illegal_class,star_class,left_par_class,
  1   505   right_par_class,period_class,plus_class,minus_class,
  1   506   colon_class,semi_colon_class,equal_class,delim_class,
  1   507   apost_class, <* apostrof used as address identf. in micro code *>
  1   508   quote_class, <* same as above *>
  1   509   double_quote_class,
  1   510   slash_class, <* indicate special print for label def *>
  1   511   text_class,long_text_class,number_class,
  1   512   illegal_number_class,
  1   513   unknown_name_class,stop_line_class,eof_class,
  1   514    class,type,
  1   515    class1,type1,
  1   516    class2,type2,
  1   517    nil, <* end off refference chain *>
  1   518   label_type, <* a generel type *>
  1   519   mask_type, <* type value used by type definitions  value 101 *>
  1   520   not_used; <* a general value used for indicating
  1   521                dummy, nil and not used conditioning 
  1   522                initialized to max negative integer +  10 *>
  1   523 
  1   523   long array
  1   524        param_name, <* used for gettting abitrary parameters *>
  1   525       find_name, <* to find and list lines with specific contents *>
  1   526       current_out_name(1:2);
  1   527   integer current_out_mode_and_kind;
  1   528   integer array tail(1:20);    <* used to change the entry of 
  1   529                                     the object code *>
  1   530 
  1   530   boolean test,
  1   531           test_label_ref,
  1   532           test_label_bit,
  1   533           find,        <* list mode is only to special lines *>
  1   534           found,       <* if a special line is found 
  1   535                           ( detected in get next element) *>
  1   536           list,        <* a listing of relewant lines *>
  1   537           line_num,     <* if listning is wanted then
  1   538                            is line numbers wanted default is yes *>
  1   539           dec_code,     <* if listning then is code numbers in
  1   540                            decimal wanted , default is yes *>
  1   541           octal_code,   <* if listning thenis code numbers wnted in
  1   542                            octal ( basis 8) wanted, defaulst is yes,
  1   543                            the parameter can be set to octal.only,
  1   544                            which will set line_num and dec_code to false *>
  1   545           entry_list_wanted, <* list all entryes marked with slash *>
  1   546           return_from_skip, <* the return to the main loop is from
  1   547                                some skip logic *>
  1   548           list_all,    <* a listing of all lines , also
  1   549                           lines which is skipped *>
  1   550           help_wanted; <* used with parameter check *>
  1   551 
  1   551 
  1   551 
  1   551 
  1   551 
  1   551   boolean procedure lookup_name(name_table,short_name,index);
  1   552   <**********************************************************>
  1   553   value short_name; long array name_table; long short_name,index; 
  1   554   begin
  2   555     integer table_length,hash_index,prim_index;
  2   556     table_length := nametable(0,0);
  2   557     hash_index := (short_name extract 12) +
  2   558     ( short_name shift (-12) extract 12) +
  2   559     (short_name shift (-24) extract 12) +
  2   560     (short_name shift (-36) extract 12);
  2   561     prim_index:=hash_index mod table_length +1;
  2   562     if false then
  2   563     write(out,<:<10>***look::>,<<_dddd>,tablelength,<:index: :>,
  2   564     hashindex,<:prim: :>,primindex,<:name: :>,string shortname);
  2   565 
  2   565     for hash_index := hash_index mod table_length +1 while
  2   566     nametable(hash_index,0) > - 1 and
  2   567     name_table(hash_index,1) <> short_name and
  2   568     hash_index+1 <> prim_index do;
  2   569 
  2   569 
  2   569     index:=hash_index;
  2   570     lookup_name := if name_table(hash_index,1) = short_name
  2   571                        then true else false;
  2   572     if false then
  2   573     write(out,<: index::>,<<_dddd>,hash_index,
  2   574     name_table(hashindex,0),<: :>,string nametable(hash_index,1));
  2   575   end look_up_name;
  1   576   
  1   576   long present_code, <* the object code handled now *>
  1   577        name,number,name1,
  1   578        number1,name2,number2; <* variables for lookup in
  1   579                             tables , and reading from source *>
  1   580 
  1   580 
  1   580   procedure present(func_value,func_mask);
  1   581   <**************************************>
  1   582   value func_value,func_mask; long func_value,func_mask;
  1   583   begin
  2   584   present_code := mask_in(present_code,func_value,func_mask);
  2   585   end present;
  1   586 
  1   586 
  1   586 
  1   586 
  1   586 
  1   586   long procedure mask_in(code,func_value,func_mask);
  1   587   <*************************************************>
  1   588   value  code,func_value,func_mask; 
  1   589   long func_value,func_mask, code;
  1   590   begin
  2   591     integer init_shift,func_bit,mask_bit;
  2   592     long instr,long_one,long_all;
  2   593     init_shift := 0;
  2   594     long_one := 1; long_all := -1;
  2   595 
  2   595     for mask_bit := func_mask extract 1 while func_mask <> 0 do
  2   596     begin
  3   597       if mask_bit = 1 then
  3   598       begin
  4   599         if func_value extract 1 = 1 then
  4   600         code := logor(code,long_one shift init_shift)
  4   601         else
  4   602         code := logand(code,exor(long_all,long_one shift init_shift));
  4   603         func_value := func_value shift (-1);
  4   604       end;
  3   605       func_mask := func_mask shift (-1);
  3   606       init_shift := init_shift +1;
  3   607     end;
  2   608     mask_in := code;
  2   609   end mask_in;
  1   610 
  1   610 
  1   610 
  1   610 
  1   610   long procedure octal(number);
  1   611   value number; long number;
  1   612   begin
  2   613     integer index,tal;
  2   614     tal:=0;
  2   615     for index:=1,index*10 while number <> 0 do
  2   616     begin
  3   617       tal := tal + (index*(number extract 3 ));
  3   618       number := number shift (-3);
  3   619     end;
  2   620     octal := tal;
  2   621   end octal;
  1   622 
  1   622 
  1   622   integer array read_table(0:383);
  1   623 
  1   623   <* init of read classes *>
  1   624   illegal_class := 10;
  1   625   star_class := 11;
  1   626   comma_class := 12;
  1   627   <* ille_gal_class_2 := 13; *>
  1   628   left_par_class := 14;
  1   629   right_par_class :=15;
  1   630   period_class := 16;
  1   631   minus_class := 17;
  1   632   colon_class := 18;
  1   633   semi_colon_class := 19;
  1   634   equal_class := 20;
  1   635   plus_class := 21;
  1   636 quote_class := apost_class := 23;
  1   637 slash_class := 24;
  1   638 double_quote_class := 25;
  1   639   delim_class := 7; <* space and / is resent delim*>
  1   640   text_class := 6;
  1   641   long_text_class := 5;
  1   642   number_class := 2;
  1   643   illegal_number_class := 1;
  1   644   unknown_name_class := 9 ; <* short or long name *>
  1   645   stop_line_class := 8;
  1   646   eof_class := 22; <* this is not in read_table but is calc. 
  1   647                       in get_next_element *>     
  1   648   not_used := -8388598 ;
  1   649 
  1   649   iso_table(read_table);
  1   650   <* 0  - 127 is modified std_table *>
  1   651   <* 128- 255 is 
  1   652   comment shift table 
  1   653           256 - 383 is comment text table *>
  1   654           
  1   654 for index := 128 step 1 until 255 do
  1   655           read_table(index) := 1 shift 12 + 256;
  1   656   semi_colon_class := 19;
  1   657   read_table(128+59):=semi_colon_class shift 12 + 59;
  1   658   for index:= 256 step 1 until 383 do
  1   659   read_table(index):= 6 shift 12 + (index-256);
  1   660   read_table(256+0) := 0 shift 12 + 0;
  1   661   read_table(256+10) := 1 shift 12 + 0;
  1   662   read_table(256+12) := 1 shift 12 + 0;
  1   663   read_table(256+13) := 0 shift 12 + 0;
  1   664   read_table(256+25) := 1 shift 12 + 0;
  1   665   read_table(256+127) := 0 shift 12 + 127;
  1   666 
  1   666 
  1   666   for index := 33 step 1 until 39 do
  1   667   read_table(index):= illegal_class shift 12 + index;
  1   668   read_table(39) := apost_class shift 12 + 39;
  1   669   read_table('"'):=double_quote_class shift 12 + '"';
  1   670 
  1   670   read_table(40):= left_par_class shift 12 + 40;
  1   671   read_table(41) := right_par_class shift 12 + 41;
  1   672   read_table(42) := star_class shift 12 + 42;
  1   673   read_table(44):= comma_class shift 12 + 44;
  1   674   read_table(46):= period_class shift 12 + 46;
  1   675   read_table(47):=slash_class shift 12 + 47;
  1   676   read_table(43):= plus_class shift 12 + 43;
  1   677   read_table(45):= minus_class shift 12 + 45;
  1   678   read_table(58):=colon_class shift 12 + 58;
  1   679   read_table(59) := 1 shift 12 + 128; <* semicolon shift table *>
  1   680   for index := 60 step 1 until 64 do
  1   681   read_table(index) := 10 shift 12 + index;
  1   682   read_table(61) := equal_class shift 12 + 61;
  1   683   for index:= 94 step 1 until 96,126 do
  1   684   read_table(index):= 10 shift 12 + index;
  1   685   intable(read_table);
  1   686 
  1   686 
  1   686 
  1   686 
  1   686 
  1   686 
  1   686   test := false;
  1   687 
  1   687 
  1   687 
  1   687 
  1   687 
  1   687 
  1   687   no_of_bits_in_code := 40;
  1   688   length_of_code := 1024;
  1   689   search_table_length := 253;
  1   690   name_table_length := 511;
  1   691   HEAP_length := 5000;
  1   692   nil := -8388608; <* min integer *>
  1   693   label_type := 97;
  1   694   mask_type := 101;
  1   695    
  1   695   <* search for the parameter help.yes *>
  1   696   get_bool_string(<:help:>,help_wanted);
  1   697   if help_wanted then help_string(<:micasmhelp:>);
  1   698 
  1   698 
  1   698 
  1   698 
  1   698 
  1   698 
  1   698   begin
  2   699     integer instr_index,
  2   700             last_instr_index, 
  2   701             line_no,line_no1,line_pointer,line_pointer_1,
  2   702     line_pointer_2,line_pointer_3,char_value,char_value_1,char_value_2,
  2   703     char_class,char_class_1,element_no,            
  2   704     no_of_elements,
  2   705     reg_op_type,alu_function_type,jump_addrs_type,
  2   706     jump_sekvens_type,load_counter_type,special_type,
  2   707     condition_type,                      
  2   708     condition_type_min,condition_type_max,
  2   709     special_min,special_max;
  2   710 
  2   710 
  2   710     boolean code_generated,eof,eol,alu_function_performed,
  2   711     jump_addrs_performed,jump_sekvens_performed,
  2   712     shift_condition_performed,addrs_performed,
  2   713     print_code,object_file,
  2   714     list_error_lines,
  2   715     message_list,
  2   716     list_bit_lines,
  2   717     line_listed,
  2   718     help_wanted,
  2   719     error_in_this_line;         
  2   720     integer array format(0:no_of_bits_in_code);
  2   721     long array read_value(1:80);
  2   722     integer array read_kind(1:80);
  2   723      integer array search_table(0:search_table_length - 1);
  2   724     long array name_table(0:name_table_length,0:4);
  2   725     integer array HEAP(1:HEAP_length);
  2   726     long array field name_record;
  2   727     long field name_name,
  2   728                name_mask;
  2   729     integer field name_value,
  2   730                name_type,
  2   731                name_chain;
  2   732     integer name_record_length;
  2   733 
  2   733     long array field error_record;
  2   734     long field error_record_text;
  2   735     integer field error_record_line_no;
  2   736     integer field error_record_element_pos;
  2   737     integer field error_record_instr_index;
  2   738     integer field error_record_chain;
  2   739     integer error_record_length;
  2   740     long array field error_record_chain_head;
  2   741     long array field l_d_record, l_d_record_chain_head;
  2   742     long       field l_d_name;
  2   743     integer    spec_class,map_spec,vector_spec; <* and nil *>
  2   744     integer    field l_d_spec, l_d_spec_class;
  2   745     integer    field l_d_index;
  2   746     integer    field l_d_line_no;
  2   747     integer    field l_d_chain;
  2   748     integer l_d_record_length;
  2   749 
  2   749 
  2   749     long array field l_r_record;
  2   750     integer field l_r_chain;
  2   751     long    field l_r_name;
  2   752     integer field l_r_index;
  2   753     integer field l_r_line_no;
  2   754     integer field l_r_element_no;
  2   755     integer l_r_record_length,l_r_record_chain_head;
  2   756     long array op_code(0:length_of_code-1);
  2   757     long array object_file_name(1:2);
  2   758 
  2   758 
  2   758 
  2   758 
  2   758     <* error text variables *>
  2   759     long plus_label_dec,declaration,operand_type,minus_delim,missing_operand,
  2   760     label_dec,illegal_type,plus_name_dec,name_unknown,directive,
  2   761     unknown,name_length,delimiter,undec_label,multiple_function,
  2   762     plus_addrs_def,minus_addrs_def,operand,
  2   763     special_def_type,illegal_source,illegal_dest,
  2   764     illegal_dest_and_source,save_file_name,load_file_name,
  2   765     termination;
  2   766   algol copy.1   <* schould be taken from m290xdec *>;
t2901dec d.801114.1501
  2   766 
  2   767 
  2   767 
  2   767 
  2   767     long
  2   768     parity_mask,
  2   769 
  2   769     sekvens_mask,
  2   770 
  2   770     condition_enable_mask,
  2   771 
  2   771     condition_select_mask,
  2   772 
  2   772     condition_pol_mask,
  2   773 
  2   773     status_reg_enable_mask,
  2   774 
  2   774     interupt_enable_mask,
  2   775 
  2   775     spare_1_mask,
  2   776 
  2   776     control_enable_mask,
  2   777 
  2   777     control_code_mask,
  2   778 
  2   778     dest_extern_mask,
  2   779 
  2   779     source_extern_mask,
  2   780 
  2   780     carry_mask,
  2   781 
  2   781     alu_dest_mask,
  2   782 
  2   782     alu_source_mask,
  2   783 
  2   783     alu_func_mask,
  2   784 
  2   784     short_dest_mask,
  2   785 
  2   785     short_source_mask,
  2   786 
  2   786     addrs_mask,
  2   787 
  2   787     dest_mask,
  2   788 
  2   788     source_mask,
  2   789 
  2   789     alu_addrs_mode_mask,
  2   790 
  2   790     alu_full_length_mask,
  2   791 
  2   791     control_full_mask,
  2   792     special_source_mask;
  2   793 
  2   793     <* fixed  code values *>
  2   794     long 
  2   795     <* alu source operand control *>
  2   796     a_and_q,a_and_b,z_and_q,z_and_b,z_and_a,d_and_a,d_and_q,d_and_z,
  2   797     <* alu destination control *>
  2   798     q_reg,nop,no_load,rama,ramf,ramqd,ramd,ramqu,ramu,
  2   799     <* alu function control *>
  2   800     alu_add,alu_subr,alu_subs,alu_or,alu_and,alu_notrs,alu_exor,
  2   801     alu_exnor,
  2   802     <* value of nonadressable q register *>
  2   803     q_regs_value;
  2   804 

t290xasm
  2   804 
  2   804 
  2   804 
  2   804     <* fixed bit long values *>
  2   805     long array bits(0:48);
  2   806   long   prom_code, <* the value not to destroy the used prom *>
  2   807          nop_code; <* the code which will perform nothing abd continue
  2   808                    with the next micro instr.*>
  2   809 
  2   809 
  2   809     procedure init_HEAP;
  2   810     <******************************>
  2   811     begin
  3   812     integer index;
  3   813     refference_first_free := 2*2;
  3   814     for index := 2 step 2 until HEAP_length do
  3   815       begin
  4   816       HEAP(index-1) := index*2-4; <* points to previus element *>
  4   817       HEAP(index)   := index*2+4; <* point to next element *>
  4   818       refference_last_free := index*2;
  4   819       end;
  3   820     end init_HEAP;
  2   821 
  2   821     integer procedure allocate(no_of_halfwords);
  2   822     <******************************************>
  2   823     value no_of_halfwords; integer no_of_halfwords;
  2   824     begin
  3   825     allocate := refference_first_free - 4;
  3   826     if ( no_of_halfwords mod 4) <> 0 then
  3   827       no_of_halfwords := no_of_half_words + (4 -(no_of_halfwords mod 4));
  3   828     refference_first_free := refference_first_free + no_of_half_words;
  3   829     if refference_first_free > refference_last_free then
  3   830       fatal_error(<:REFFERENCE TABLE LENGTH EXEEDED:>);
  3   831     end allocate;
  2   832 
  2   832     procedure fatal_error(error_text);
  2   833     <********************************>
  2   834     string error_text;
  2   835     begin
  3   836     print_error_table;
  3   837     write(out,"nl",1,"*",5,"sp",1,error_text,"nl",1,
  3   838               "sp",7,<:RUN ABORT:>);
  3   839     fp_proc(7,0,0,0);
  3   840     end fatal_error;
  2   841 
  2   841     procedure error(error_text,line_no,element_pos);
  2   842     <**********************************************>
  2   843     value error_text,line_no,element_pos;
  2   844     long error_text;
  2   845     integer line_no,element_pos;
  2   846     begin
  3   847     error_in_this_line := true;
  3   848     no_of_errors := no_of_errors + 1;
  3   849     error_record := allocate(error_record_length);
  3   850     HEAP.error_record.error_record_chain := error_record_chain_head;
  3   851     error_record_chain_head := error_record;
  3   852     HEAP.error_record.error_record_text := error_text;
  3   853     HEAP.error_record.error_record_line_no := line_no;
  3   854     HEAP.error_record.error_record_element_pos := element_pos;
  3   855     HEAP.error_record.error_record_instr_index := instr_index;
  3   856     end error;
  2   857 
  2   857      
  2   857      
  2   857      boolean procedure new_lookup_name(name,name_record_index,name_type);
  2   858      value name; long name;
  2   859      integer name_record_index,name_type;
  2   860      begin
  3   861      long array field look_name_record; 
  3   862      boolean found;
  3   863      found := false;
  3   864      name_record_index := calculate_hash_key(name);
  3   865      look_name_record := search_table(name_record_index);
  3   866      while look_name_record <> nil and -,found do
  3   867        begin
  4   868        if name = HEAP.look_name_record.name_name then
  4   869          found := true
  4   870         else
  4   871          look_name_record := HEAP.look_name_record.name_name;
  4   872         end;
  3   873      name_record_index := look_name_record;
  3   874      new_lookup_name := found;
  3   875      end new_lookup_name;
  2   876 
  2   876     integer procedure new_insert_name(name,reff_index,type,record_length);
  2   877     value name,type,record_length;
  2   878     long name;
  2   879     integer reff_index,type,record_length;
  2   880     begin
  3   881     integer array field insert_name_record;
  3   882     integer hash_key;
  3   883     hash_key := calculate_hash_key(name);
  3   884     insert_name_record := allocate(record_length);
  3   885     new_insert_name := insert_name_record;
  3   886     reff_index := insert_name_record;
  3   887     HEAP.insert_name_record.name_name := name;
  3   888     HEAP.insert_name_record.name_type := type;
  3   889     HEAP.insert_name_record.name_chain := search_table(hash_key);
  3   890     search_table(hash_key) := insert_name_record;
  3   891     end new_insert_name;
  2   892 
  2   892     integer procedure calculate_hash_key(name);
  2   893     value name; long name;
  2   894     begin
  3   895     calculate_hash_key := (( name extract 12) +
  3   896                           ( name shift (-12) extract 12) +
  3   897                           ( name shift (-24) extract 12) +
  3   898                           ( name shift (-36) extract 12) +
  3   899                           ( name shift (-40) extract 8) +
  3   900                           ( name shift (-32) extract 8) +
  3   901                           ( name shift (-24) extract 12) 
  3   902                          )
  3   903                           mod search_table_length;
  3   904     end calculate_hash_key;
  2   905 
  2   905     integer procedure insert_name_table(index,name,type,reff);
  2   906     value index,name,type,reff; long index,name;          
  2   907     integer type,reff;
  2   908     begin
  3   909     name_table(index,1) := name;
  3   910     name_table(index,0) := type;
  3   911     name_table(index,4) := reff;
  3   912     end insert_name_table;
  2   913 
  2   913 
  2   913 
  2   913     integer procedure addrs_ref(name,instr_index,line_no,element_no);
  2   914 
  2   914     value name,instr_index,line_no,element_no;
  2   915     long name;
  2   916     integer instr_index,line_no,element_no;
  2   917     begin
  3   918     l_r_record := allocate(l_r_record_length);
  3   919     HEAP.l_r_record.l_r_chain := l_r_record_chain_head;
  3   920     l_r_record_chain_head := l_r_record;
  3   921     HEAP.l_r_record.l_r_name := name;
  3   922     HEAP.l_r_record.l_r_index := instr_index;
  3   923     HEAP.l_r_record.l_r_line_no := line_no;
  3   924     HEAP.l_r_record.l_r_element_no := element_no;
  3   925     addrs_ref := l_r_record;
  3   926     end addrs_ref;
  2   927 
  2   927     integer procedure new_insert_label_def(name,index,instr_index,line_no,spec,spec_class);
  2   928     value name,index,instr_index,spec,line_no,spec_class;
  2   929     long name,index;
  2   930     integer instr_index,spec,line_no,spec_class;
  2   931     begin
  3   932     l_d_record := allocate(l_d_record_length);
  3   933     insert_name_table(index,name,label_type,l_d_record);
  3   934     HEAP.l_d_record.l_d_chain := l_d_record_chain_head;      
  3   935     l_d_record_chain_head := index;
  3   936     HEAP.l_d_record.l_d_index := instr_index;
  3   937     HEAP.l_d_record.l_d_line_no := line_no;
  3   938     HEAP.l_d_record.l_d_spec := spec;
  3   939     HEAP.l_d_record.l_d_spec_class := spec_class;
  3   940     new_insert_label_def := index;
  3   941     end new_insert_label_def;
  2   942 
  2   942     procedure resolve_labels;
  2   943     begin
  3   944     integer op_code_index;
  3   945     long name_table_index;
  3   946     long array wr_name(1:2); <* used for writing of a name *>
  3   947     wr_name(2):=0;
  3   948 
  3   948     l_r_record := l_r_record_chain_head;
  3   949      while l_r_record >-1 do
  3   950        begin
  4   951        if -, lookup_name(name_table,HEAP.l_r_record.l_r_name,
  4   952                     name_table_index) then
  4   953          begin
  5   954          instr_index := HEAP.l_r_record.l_r_index;
  5   955          error(undec_label,HEAP.l_r_record.l_r_line_no,
  5   956                            HEAP.l_r_record.l_r_element_no);
  5   957          end
  4   958         else
  4   959          begin
  5   960          l_d_record := name_table(name_table_index,4);
  5   961          op_code_index := HEAP.l_r_record.l_r_index;
  5   962          op_code(opcode_index) := mask_in(op_code(op_code_index),
  5   963            extend HEAP.l_d_record.l_d_index,
  5   964            addrs_mask);
  5   965          
  5   965 
  5   965          if test_label_bit or test_label_ref then
  5   966            begin
  6   967            wr_name(1) := HEAP.l_d_record.l_d_name;
  6   968            write(out,"nl",1,"sp",5,<<zddd>,
  6   969                  octal(extend HEAP.l_r_record.l_r_index),
  6   970                  <: label reff to: :>,
  6   971                  octal(extend HEAP.l_d_record.l_d_index),
  6   972                  <: name: :>,wr_name);
  6   973            end;
  5   974          
  5   974          if test_label_bit then
  5   975            begin
  6   976            write(out,"nl",1,"sp",11);
  6   977            print_formated(op_code(op_code_index));
  6   978            end;
  5   979 
  5   979          end;
  4   980        l_r_record := HEAP.l_r_record.l_r_chain;
  4   981        end scan loop;
  3   982     end resolve_labels;
  2   983 
  2   983     procedure label_list(only_spec_wanted);
  2   984     value only_spec_wanted; boolean only_spec_wanted;
  2   985     begin
  3   986     integer no_of_spec,max_spec,max_index;
  3   987     long array wr_name(1:2),hex_number(1:2);
  3   988     integer index;
  3   989     no_of_spec := 0;
  3   990     wr_name(2) := 0;
  3   991     
  3   991     for index := 1 step 1 until name_table_length do
  3   992       begin
  4   993       if name_table(index,0) = label_type then
  4   994         begin
  5   995         l_d_record := name_table(index,4);
  5   996         if HEAP.l_d_record.l_d_spec <> nil or
  5   997            -, only_spec_wanted then
  5   998            begin
  6   999            wr_name(1) := name_table(index,1);
  6  1000            write(out,"sp",15 - write(out,"nl",1,wr_name),
  6  1001                  "cr",1,"sp",7,<: reff. to address:>,
  6  1002                  <<_zddd>,HEAP.l_d_record.l_d_index,
  6  1003                   octal(extend HEAP.l_d_record.l_d_index),
  6  1004                   if HEAP.l_d_record.l_d_spec = nil then <::> else
  6  1005                   if HEAP.l_d_record.l_d_spec < 0 then
  6  1006                   <:_line_no_:> else <:_spec.____:>,
  6  1007                    if HEAP.l_d_record.l_d_spec <> nil then <<__dddd> else <<b>,
  6  1008                   if HEAP.l_d_record.l_d_spec = nil then
  6  1009                   0 else
  6  1010                    abs HEAP.l_d_record.l_d_spec);
  6  1011           no_of_spec := no_of_spec + 1;
  6  1012           end;
  5  1013        end;
  4  1014       end for loop;
  3  1015      if only_spec_wanted then
  3  1016          begin
  4  1017          for spec_class := nil,map_spec ,vector_spec  do
  4  1018          begin
  5  1019          if no_of_spec > 0 then
  5  1020          write(out,"nl",4,
  5  1021                if spec_class = map_spec then <: MAP ENTRIES :>
  5  1022                else if spec_class = vector_spec then <: VECTOR ENTIES :>
  5  1023                else <::>,"nl",1,
  5  1024                <:_name_____________spec.____instr.___octal____:>);
  5  1025          repeat
  5  1026            begin
  6  1027            max_spec := nil;
  6  1028            for index := 1 step 1 until name_table_length do
  6  1029              begin
  7  1030              if name_table(index,0) = label_type then
  7  1031                begin
  8  1032                l_d_record := name_table(index,4);
  8  1033                if HEAP.l_d_record.l_d_spec > max_spec and
  8  1034                   HEAP.l_d_record.l_d_spec <> nil   and
  8  1035                   HEAP.l_d_record.l_d_spec_class = spec_class  then
  8  1036                   begin
  9  1037                   max_spec := HEAP.l_d_record.l_d_spec;
  9  1038                   max_index := index;
  9  1039                   end;
  8  1040                end;
  7  1041              end loop name_table;
  6  1042           <* write spec *>
  6  1043           if max_spec <> nil then
  6  1044             begin
  7  1045             wr_name(1) := name_table(max_index,1);
  7  1046             l_d_record := name_table(max_index,4);
  7  1047           write(out,"sp",15-write(out,"nl",1,wr_name),
  7  1048                 <<____dddd>,HEAP.l_d_record.l_d_spec,
  7  1049                 HEAP.l_d_record.l_d_index,
  7  1050                 octal(extend HEAP.l_d_record.l_d_index),
  7  1051                 HEAP.l_d_record.l_d_index shift (-8),         
  7  1052                 HEAP.l_d_record.l_d_index extract 8);
  7  1053 
  7  1053           <* delete label entry in name table *>
  7  1054           name_table(max_index,0) := nil;
  7  1055           no_of_spec := no_of_spec-1;
  7  1056           end;
  6  1057          end;           
  5  1058        until max_spec = nil;
  5  1059        end spec_class_loo;
  4  1060        end only_spec_loop;
  3  1061     end label_list;
  2  1062 
  2  1062     boolean procedure print_error_table;
  2  1063     begin
  3  1064     long array field previus,this,min_line;
  3  1065     integer min_line_no;
  3  1066 
  3  1066     if error_record_chain_head = nil then
  3  1067       print_error_table := true
  3  1068     else
  3  1069       begin
  4  1070       print_error_table := false;
  4  1071       while error_record_chain_head <> nil do
  4  1072         begin
  5  1073         min_line_no := 8388606;
  5  1074         this := error_record_chain_head;
  5  1075         previus := nil;
  5  1076         while this <> nil do
  5  1077           begin
  6  1078           if HEAP.this.error_record_line_no <= min_line_no then
  6  1079             begin
  7  1080             min_line_no := HEAP.this.error_record_line_no;
  7  1081             min_line:= previus;
  7  1082             end;
  6  1083           previus := this;
  6  1084           this := HEAP.this.error_record_chain;
  6  1085           end;
  5  1086 
  5  1086         <* remove record from list *>
  5  1087         if min_line = nil then                    
  5  1088           begin
  6  1089           this := error_record_chain_head;
  6  1090           error_record_chain_head := HEAP.this.error_record_chain;
  6  1091           end
  5  1092         else
  5  1093           begin
  6  1094           previus := min_line;
  6  1095           this := HEAP.previus.error_record_chain;
  6  1096          HEAP.previus.error_record_chain :=
  6  1097           HEAP.this.error_record_chain;
  6  1098           end;
  5  1099         write(out,"nl",1,<<_dddd>,
  5  1100               HEAP.this.error_record_line_no,
  5  1101               HEAP.this.error_record_instr_index,
  5  1102               octal(extend HEAP.this.error_record_instr_index),
  5  1103               HEAP.this.error_record_element_pos,
  5  1104               "sp",2,string HEAP.this.error_record_text);
  5  1105         end;
  4  1106        end;
  3  1107      end print_error_table;
  2  1108 
  2  1108 
  2  1108 
  2  1108     procedure print_formated(opcode);
  2  1109     <********************************>
  2  1110     value opcode; long opcode;
  2  1111     begin
  3  1112       integer from,to,number,index;
  3  1113         from := 0;
  3  1114         for index :=-47 step 1 until 0 do
  3  1115         begin
  4  1116           outchar(out,if opcode shift index extract 1 = 1 then
  4  1117           49 else 46);
  4  1118           if format(from) extract 12 = 47 + index then
  4  1119           begin
  5  1120             outchar(out,32);
  5  1121             from:=from+1;
  5  1122           end;
  4  1123         end for loop;
  3  1124     <* for improving readability write an extra newline *>
  3  1125     outchar(out,10);
  3  1126 
  3  1126     end  print_format;
  2  1127 
  2  1127 
  2  1127   algol copy.2  <* source should be m290xproc *>;
t2901proc d.810804.1412
  2  1127 
  2  1128 
  2  1128 
  2  1128 
  2  1128 
  2  1128 
  2  1128 
  2  1128     procedure jump_addrs;
  2  1129     <*******************>
  2  1130     begin
  3  1131       if alu_function_performed or jump_sekvens_performed or
  3  1132       jump_addrs_performed then 
  3  1133       error(multiple_function,line_no,element_no);
  3  1134       present(name_table(number,2),
  3  1135       sekvens_mask);
  3  1136       present(name_table(number,3),
  3  1137       condition_enable_mask);
  3  1138       next;
  3  1139       if class = left_par_class then
  3  1140       begin
  4  1141         scan_addrs_operands;
  4  1142       end;
  3  1143       jump_addrs_performed := true; code_generated:=true;
  3  1144     end jump_addrs;
  2  1145 
  2  1145 
  2  1145     procedure jump_sekvens;
  2  1146     <*********************>
  2  1147     begin
  3  1148       if jump_addrs_performed or jump_sekvens_performed then
  3  1149       error(multiple_function,line_no,element_no);
  3  1150       present(name_table(number,2),
  3  1151       sekvens_mask);
  3  1152       present(name_table(number,3),
  3  1153       condition_enable_mask);
  3  1154       next;
  3  1155       if class=left_par_class then
  3  1156       begin
  4  1157            scan_condition_operands;
  4  1158       end;
  3  1159 
  3  1159       jump_sekvens_performed := true; code_generated:=true;
  3  1160 
  3  1160     end jump_sekevens;
  2  1161 
  2  1161     procedure load_counter;
  2  1162     <**********************>
  2  1163     begin
  3  1164       jump_addrs;
  3  1165     end load_counter;
  2  1166 
  2  1166 
  2  1166     procedure special;
  2  1167     <****************>
  2  1168     begin
  3  1169       long spec_number;
  3  1170       integer op_value1,op_value2,index,
  3  1171               kind_1,kind_2;
  3  1172 
  3  1172       if name_table(number,3) < special_min or
  3  1173       name_table(number,3) > special_max then
  3  1174       error(special_def_type,line_no,element_no)
  3  1175       else
  3  1176       case name_table(number,3) of
  3  1177       begin
  4  1178         begin
  5  1179         <* case 1 is
  5  1180            value by name_table(number,2)
  5  1181            mask by a mask entry given by
  5  1182            nametable(nametable(number,4),2) *>
  5  1183         present(name_table(number,2),
  5  1184                 name_table(name_table(number,4),2));
  5  1185         end of case 1;
  4  1186         begin
  5  1187                 <* case 2 is no parameters and mask
  5  1188           Is pointed out by name_table(name,4),
  5  1189           among the fixed mask values,
  5  1190           from left to rigth in the format
  5  1191           *>
  5  1192 
  5  1192           present(
  5  1193           name_table(number,2),
  5  1194           std_mask(name_table(number,4)));
  5  1195         end of case 2;
  4  1196         begin
  5  1197           <* case 3.
  5  1198           set or clear depending on value,
  5  1199           the bits taken from argument 1 to 
  5  1200           argument 2 *>
  5  1201           spec_number:=number;
  5  1202           next1;
  5  1203           if class1 <> left_par_class then
  5  1204           error(delimiter,line_no,element_no)
  5  1205           else
  5  1206           begin
  6  1207             if name_table(spec_number,4) = 2 then
  6  1208             get_2_reg_operands(op_value_1,op_value_2)
  6  1209             else
  6  1210             begin
  7  1211               get_a_reg_operand(op_value_1,kind_1);
  7  1212               op_value_2 := op_value_1;
  7  1213             end;
  6  1214             for index:= op_value_1 step 1 until op_value_2 do
  6  1215             present(name_table(spec_number,2),
  6  1216             (extend 1 ) shift (47 - index));
  6  1217             next;
  6  1218             if class <> right_par_class then
  6  1219             error(delimiter,line_no,element_no)
  6  1220           end;
  5  1221         end case 3;
  4  1222 
  4  1222         begin <* case 4.
  5  1223                  1 bit is cleared or set depending of nametable
  5  1224                  nametable(index,4) specifi the number. *>
  5  1225               <* only last bit of nametable(number,2) is used *>
  5  1226         present(
  5  1227                         extend( name_table(number,2) extract 1),
  5  1228                         extend 1 shift (47 - name_table(number,4)));
  5  1229       end case 4;
  4  1230 
  4  1230       end of all cases;
  3  1231       code_generated:=true;
  3  1232       next;
  3  1233       if class = comma_class then 
  3  1234       next;
  3  1235     end special;
  2  1236 
  2  1236 
  2  1236 
  2  1236 
  2  1236     procedure scan_sekvens_operands(addrs_performed);
  2  1237     <************************************************>
  2  1238     boolean addrs_performed;
  2  1239     begin
  3  1240       integer type;
  3  1241       next;
  3  1242       for class := class while class <> right_par_class 
  3  1243       and class <> stop_line_class do
  3  1244       begin
  4  1245         if class = text_class  and name_table(number,0) = condition_type then
  4  1246         begin
  5  1247           <* condition *>
  5  1248           type:= name_table(number,0);
  5  1249           if type <> condition_type then
  5  1250           error(illegal_type,line_no,element_no)
  5  1251           else
  5  1252           present(name_table(number,2),
  5  1253           name_table(name_table(number,4),2));
  5  1254       <*  write(out,<:<10>test mask  :>,<<-d>,
  5  1255                     name_table(number,2),
  5  1256                     name_table(number,4),
  5  1257                     name_table(name_table(number,4),2) shift (-24),
  5  1258                     name_table(name_table(number,4),2) extract 24,"nl",1);
  5  1259       *>
  5  1260         end
  4  1261         else
  4  1262         if class = unknown_name_class or class = number_class or
  4  1263            class = apost_class or
  4  1264            ( class = text_class and  name_table(number,0) =label_type) then
  4  1265 
  4  1265         begin
  5  1266           <* addrs. ref. *>
  5  1267           if class = apost_class then
  5  1268              next;
  5  1269           if look_ahead_class = right_par_class then
  5  1270           begin
  6  1271             if addrs_performed then error(plus_addrs_def,line_no,element_no);
  6  1272             if class = unknown_name_class or class = text_class then
  6  1273             addrs_ref(name,instr_index,line_no,element_no)
  6  1274             else
  6  1275             present(number,addrs_mask);
  6  1276             addrs_performed := true;
  6  1277           end else
  5  1278           error(operand,line_no,element_no);
  5  1279         end
  4  1280         else
  4  1281         begin
  5  1282           error(missing_operand,line_no,element_no);
  5  1283         end;
  4  1284         next;
  4  1285         if class = comma_class then next;
  4  1286       end;
  3  1287       if class = right_par_class then next;
  3  1288       if -, addrs_performed then error(minus_addrs_def,line_no,element_no);
  3  1289     end scan_sekvens_operands;
  2  1290 
  2  1290 
  2  1290     procedure scan_addrs_operands;
  2  1291     <****************************>
  2  1292     begin
  3  1293       scan_sekvens_operands(false);
  3  1294     end scan_addrs_operands;
  2  1295 
  2  1295     procedure scan_condition_operands;
  2  1296     <*********************************>
  2  1297     begin
  3  1298       scan_sekvens_operands(true);
  3  1299     end scan_condition_operands;
  2  1300 
  2  1300 
  2  1300 
  2  1300 
  2  1300     procedure alufunction;
  2  1301     <********************>
  2  1302     begin
  3  1303       integer type_of_operands;
  3  1304       if alu_function_performed or jump_addrs_performed then
  3  1305       error(multiple_function,line_no,element_no);
  3  1306       present(name_table(number,2),
  3  1307       alu_func_mask);
  3  1308       type_of_operands := name_table(number,3);
  3  1309     case type_of_operands of
  3  1310         begin
  4  1311           internal_operands(0);
  4  1312           internal_operands(1);
  4  1313           internal_and_external(0);
  4  1314           internal_and_external(1);
  4  1315           zero_one_operand(0);
  4  1316           one_operand(0);
  4  1317           one_operand(1);
  4  1318         end;  
  3  1319       next;
  3  1320     code_generated:=true; alu_function_performed:=true;
  3  1321   end alu_function;
  2  1322 
  2  1322   integer procedure set_alu_dest(op_value);
  2  1323   <********************************>
  2  1324   value op_value; integer op_value;
  2  1325   begin
  3  1326   <* result  0 = ok
  3  1327             -1 = operand error
  3  1328             -3 = impossiple *>
  3  1329   integer dest_value;
  3  1330   set_alu_dest := 0;
  3  1331   dest_value := noload;
  3  1332   if op_value >  15 then
  3  1333     dest_value := no_load
  3  1334    else
  3  1335   if op_value =  q_regs_value then
  3  1336     dest_value :=  q_reg
  3  1337    else
  3  1338   if op_value  < 16 and op_value  >= 0 then
  3  1339     dest_value := ramf
  3  1340    else
  3  1341   set_alu_dest := 3;
  3  1342 
  3  1342   present(extend dest_value,alu_dest_mask);
  3  1343   end  set alu_dest;
  2  1344 
  2  1344 
  2  1344   integer procedure set_alu_source(op_value_1,op_value_2);
  2  1345   <******************************************************>
  2  1346   value op_value_1,op_value_2; integer op_value_1,op_value_2;
  2  1347   begin
  3  1348   integer source_value;
  3  1349   set_alu_source := 0; <* for o.k. *>
  3  1350   <* -1 for 1. operand error
  3  1351      -2 for 2. operand  error
  3  1352      -3 for  impossible error *>
  3  1353   
  3  1353   if op_value_1 = not_used or op_value_2 = not_used then
  3  1354     begin
  4  1355     if op_value_1 = not_used then op_value_1 := op_value_2;
  4  1356     if op_value_1 =  q_regs_value then
  4  1357      source_value := z_and_q
  4  1358      else
  4  1359     if op_value_1 > 15 then
  4  1360       source_value  :=  d_and_z
  4  1361      else
  4  1362     if op_value_1 <15 and op_value_1 >= 0 then
  4  1363       begin
  5  1364       if op_value_2 = not_used then
  5  1365         source_value := z_and_b
  5  1366        else
  5  1367         source_value := z_and_a;
  5  1368       end 
  4  1369      else
  4  1370       set_alu_source := if op_value_2 = not_used then -1 else -2;
  4  1371     end
  3  1372    else
  3  1373   if op_value_1 = q_regs_value or op_value_2 = q_regs_value then
  3  1374     begin
  4  1375     if op_value_1 = q_regs_value then op_value_1 := op_value_2;  
  4  1376     if op_value_1 > 15 then
  4  1377       source_value := d_and_q
  4  1378      else
  4  1379     if  op_value_1 >= 0 and op_value_1 <= 15 then
  4  1380       source_value  := a_and_q
  4  1381      else
  4  1382        begin
  5  1383        set_alu_source := if op_value_2 = q_regs_value then -1 else -2;
  5  1384        end
  4  1385     end
  3  1386    else
  3  1387   if op_value_1 > 15 or op_value_2 > 15 then
  3  1388     begin
  4  1389     source_value := d_and_a;
  4  1390     end
  3  1391    else
  3  1392   if op_value_1 >= 0 and op_value_2 >= 0  then
  3  1393     begin
  4  1394     source_value := a_and_b;
  4  1395     end
  3  1396    else
  3  1397     set_alu_source := -3 ; <* schould be impossiple *>
  3  1398   present(extend source_value,alu_source_mask);
  3  1399   end set_alu_source;
  2  1400 
  2  1400 
  2  1400 
  2  1400 
  2  1400   procedure internal_operands(carry);
  2  1401   <*********************************>
  2  1402   value carry; integer carry; 
  2  1403   begin
  3  1404     integer op_value_1,op_value_2,op_value_3,
  3  1405             kind_1,kind_2,kind_3,no_of_op,set_result,
  3  1406             dest_value,source_value;
  3  1407     no_of_op := get_all_reg_operands(op_value_1,kind_1,
  3  1408                                      op_value_2,kind_2,
  3  1409                                      op_value_3,kind_3);
  3  1410     case no_of_op + 1 of
  3  1411       begin
  4  1412       
  4  1412       begin <* case 0 operands *>
  5  1413       end;
  4  1414 
  4  1414       begin <* case 1 operands *>
  5  1415       set_result := set_alu_dest(op_value_1);           
  5  1416       set_result := set_alu_source(op_value_1,not_used);
  5  1417       source_value := dest_value := op_value_1;
  5  1418       end;
  4  1419 
  4  1419       begin  <* case  2 operands  *>
  5  1420       set_result := set_alu_dest(op_value_1);
  5  1421       set_result := set_alu_source(op_value_1,op_value_2);
  5  1422       dest_value :=  op_value_1;
  5  1423       source_value  := if op_value_2 = q_regs_value 
  5  1424                       then op_value_1 else op_value_2;
  5  1425       end;
  4  1426 
  4  1426       begin <* case 3 operands *>
  5  1427       set_result := set_alu_dest(op_value_1);
  5  1428       set_result := set_alu_source(op_value_2,opvalue_3);
  5  1429       if op_value_1 = q_regs_value then
  5  1430         begin
  6  1431         dest_value := if op_value_2 > 15 then op_value_3 else op_value_2;
  6  1432         source_value := if op_value_2 > 15 then op_value_2 else op_value_3;
  6  1433         end
  5  1434        else
  5  1435       if op_value_2 = q_regs_value or op_value_3 = q_regs_value then
  5  1436         begin
  6  1437         dest_value := op_value_1;
  6  1438         source_value := if op_value_2 = q_regs_value then op_value_3 else
  6  1439                           opvalue_2;
  6  1440         end
  5  1441       end;
  4  1442       end all case;
  3  1443  if dest_value <> q_regs_value then
  3  1444     present( extend dest_value,dest_mask);
  3  1445  if  source_value <> q_regs_value  then
  3  1446     present(extend source_value,source_mask);
  3  1447     present(extend( if source_value > 15 then 1 else 0) ,
  3  1448                             special_source_mask);
  3  1449     present(extend( if source_value  > 15 then 1 else 0),
  3  1450             control_enable_mask);
  3  1451     present(extend carry,carry_mask);
  3  1452   end  internal operands;
  2  1453 
  2  1453   procedure internal_and_external(carry);
  2  1454   <**************************************>
  2  1455   value carry; integer carry; 
  2  1456   begin
  3  1457 
  3  1457   integer op_value_1,op_value_2,op_value_3,
  3  1458           kind_1,kind_2,kind_3,no_of_op,set_result;
  3  1459   no_of_op := get_all_reg_operands(op_value_1,kind_1,opvalue_2,kind_2,
  3  1460                                    op_value_3,kind_3);
  3  1461   if no_of_op = 2 then
  3  1462     begin
  4  1463     if op_value_1 <> q_regs_value  then
  4  1464       present(extend op_value_1,dest_mask);
  4  1465     if op_value_2 <> q_regs_value then
  4  1466       present(extend op_value_2,source_mask);
  4  1467    if op_value_2 > 15 then
  4  1468       begin
  5  1469       present(extend 1,special_source_mask);
  5  1470       present(extend 1,control_enable_mask);
  5  1471       end;
  4  1472       set_alu_dest(op_value_1);
  4  1473       set_alu_source(not_used,op_value_2);
  4  1474       end else
  3  1475      error(illegal_dest_and_source,line_no,element_no);
  3  1476     present(extend carry,carry_mask);
  3  1477   end  internal_and_external;
  2  1478 
  2  1478   procedure zero_one_operand(carry);
  2  1479   <*******************************>
  2  1480   value carry; integer carry; 
  2  1481   begin
  3  1482 
  3  1482   integer op_value,kind,op_value_1,kind_1,op_value_2,kind_2,
  3  1483           op_value_3,kind_3,no_of_op,set_result;
  3  1484   no_of_op := get_all_reg_operands(op_value,kind,op_value_2,kind_2,
  3  1485               op_value_3,kind_3);
  3  1486    if op_value <> q_regs_value then
  3  1487 
  3  1487     present(extend op_value,dest_mask);
  3  1488     present(z_and_q,alu_source_mask);
  3  1489     if op_value > 15 then
  3  1490     present(no_load,alu_dest_mask)
  3  1491     else
  3  1492     if op_value = q_regs_value then
  3  1493     present(q_reg,alu_dest_mask)
  3  1494     else
  3  1495     present(ramf,alu_dest_mask);
  3  1496     present(extend carry, carry_mask);
  3  1497   end zero_one_operand;
  2  1498   procedure one_operand(carry);
  2  1499   <***************************>
  2  1500   value carry; integer carry;
  2  1501   begin
  3  1502 
  3  1502   integer op_value,kind,op_value_1,kind_1,op_value_2,kind_2,
  3  1503           op_value_3,kind_3,no_of_op,set_result;
  3  1504   no_of_op := get_all_reg_operands(op_value,kind,op_value_2,kind_2,
  3  1505               op_value_3,kind_3);
  3  1506 
  3  1506     if op_value>15 then
  3  1507     error(operand_type,line_no,element_no - 2);
  3  1508     present(extend op_value,short_dest_mask);
  3  1509     present(extend op_value,short_source_mask);
  3  1510     if op_value = q_regs_value then
  3  1511     begin
  4  1512         present(q_reg,alu_dest_mask);
  4  1513       present(z_and_q,alu_source_mask);
  4  1514     end
  3  1515     else
  3  1516     begin
  4  1517       present(ramf,alu_dest_mask);
  4  1518       present(z_and_b,alu_source_mask);
  4  1519     end;
  3  1520 
  3  1520     present(extend carry,carry_mask);
  3  1521   end one_operand;
  2  1522 
  2  1522 
  2  1522 
  2  1522   long  procedure  std_mask(mask_no);
  2  1523   <*******************************>
  2  1524   value mask_no; long mask_no;
  2  1525   begin
  3  1526     <* uses mask_no to select among the standard
  3  1527     hc2901 mask *>
  3  1528     std_mask := case mask_no of
  3  1529     (
  3  1530     parity_mask,
  3  1531     sekvens_mask,
  3  1532     condition_enable_mask,
  3  1533     condition_select_mask,
  3  1534     condition_pol_mask,
  3  1535     status_reg_enable_mask,
  3  1536     interupt_enable_mask,
  3  1537     spare_1_mask,
  3  1538     control_enable_mask,
  3  1539     control_code_mask,
  3  1540     dest_extern_mask,
  3  1541     source_extern_mask,
  3  1542     carry_mask,
  3  1543     alu_dest_mask,
  3  1544     alu_source_mask,
  3  1545     alu_func_mask,
  3  1546     short_dest_mask,
  3  1547     short_source_mask,
  3  1548     addrs_mask,
  3  1549     dest_mask,
  3  1550     source_mask,
  3  1551     alu_addrs_mode_mask,
  3  1552     alu_full_length_mask,
  3  1553     control_full_mask
  3  1554     );
  3  1555   end std_mask;
  2  1556 

t290xasm
  2  1556 
  2  1556 
  2  1556 
  2  1556 
  2  1556 
  2  1556 
  2  1556 
  2  1556 
  2  1556 
  2  1556   integer procedure 
  2  1557     get_all_reg_operands(op_1,kind_1,op_2,kind_2,op_3,kind_3);
  2  1558   <**********************************************************>
  2  1559   integer op_1,kind_1,op_2,kind_2,op_3,kind_3;
  2  1560   begin
  3  1561   integer no_of_op;
  3  1562   no_of_op := 0;
  3  1563   op_1 := op_2 := op_3 := kind_1 := kind_2 := kind_3 := not_used;
  3  1564   class := look_ahead_class;
  3  1565   if class = left_par_class then
  3  1566     begin
  4  1567     next;
  4  1568     get_a_reg_operand(op_1,kind_1);
  4  1569     no_of_op := 1;
  4  1570    if look_ahead_class = comma_class then
  4  1571       begin
  5  1572       next;
  5  1573       get_a_reg_operand(op_2,kind_2);
  5  1574       no_of_op := 2;
  5  1575       if look_ahead_class = comma_class then
  5  1576          begin
  6  1577          next;
  6  1578          get_a_reg_operand(op_3,kind_3);
  6  1579          no_of_op := 3;
  6  1580          end;
  5  1581      end;
  4  1582    next;
  4  1583   if class <> right_par_class then
  4  1584      error(termination,line_no,element_no);
  4  1585   end else error(missing_operand,line_no,element_no);
  3  1586 get_all_reg_operands := no_of_op;
  3  1587 end  get_all_reg_operands;
  2  1588 <*
  2  1589 
  2  1589 procedure check_unknown_operands(op_kind_1,op_kind_2,op_kind_3,op_kind_4);
  2  1590 value op_kind_1,op_kind_2,op_kind_3,op_kind_4;
  2  1591 integer op_kind_1,op_kind_2,op_kind_3,op_kind_4;
  2  1592 begin
  2  1593 integer no_of_op;
  2  1594 no_of_op := if op_kind_1 = not_used then 0 else
  2  1595             if op_kind_2 = not_used then 1 else
  2  1596             if op_kind_3 = not_used then 2 else
  2  1597             if op_kind_4 = not_used then 3 else 4;
  2  1598  if op_kind_1 = unknown_name_class then
  2  1599   error(operand,line_no,element_no - 1 -(2*(no_of_op-1)));
  2  1600  if op_kind_2 = unknown_name_class then
  2  1601   error(operand,line_no,element_no -1-(2*(no_of_op-2)));
  2  1602  if op_kind_3 = unknown_name_class then
  2  1603   error(operand,line_no,element_no - 1 - 2*(no_of_op-3));
  2  1604  if op_kind_4 = unknown_name_class then
  2  1605   error(operand,line_no,element_no -1);
  2  1606 end check_unkown_operands; *>
  2  1607 
  2  1607 
  2  1607 
  2  1607 
  2  1607 
  2  1607 
  2  1607   procedure get_a_reg_operand(op_value,kind);
  2  1608   <*****************************************>
  2  1609   integer op_value,kind;
  2  1610   begin
  3  1611   long lookup_index;
  3  1612     next;
  3  1613     if class = number_class then
  3  1614    begin
  4  1615    kind := number_class;
  4  1616    op_value := number
  4  1617   end
  3  1618     else
  3  1619     if class = apost_class then
  3  1620       begin
  4  1621       next;
  4  1622       kind := 0;
  4  1623       op_value := 0;
  4  1624       if class = unknown_name_class or
  4  1625          (class = text_class and type = label_type) then
  4  1626          begin
  5  1627          addrs_ref(name,instr_index,line_no,element_no);
  5  1628          kind := number_class;
  5  1629          end
  4  1630        else
  4  1631          error(operand_type,line_no,element_no);
  4  1632     end
  3  1633     else
  3  1634    if class = text_class then
  3  1635     begin
  4  1636       if name_table(number,0) <> reg_op_type then
  4  1637       begin
  5  1638       kind := 0;
  5  1639       error(operand_type,line_no,element_no)
  5  1640       end
  4  1641       else
  4  1642       begin
  5  1643       op_value := name_table(number,2);
  5  1644       kind := text_class;
  5  1645       end;
  4  1646     end
  3  1647    else
  3  1648      begin
  4  1649      kind := unknown_name_class;
  4  1650      error(operand,line_no,element_no);
  4  1651      end;
  3  1652   end of get_a_reg_operand;
  2  1653 
  2  1653 
  2  1653 
  2  1653 
  2  1653   procedure  get_2_reg_operands(op_value_1,op_value_2);
  2  1654   integer op_value_1,op_value_2;
  2  1655   begin
  3  1656   integer kind_1,kind_2;
  3  1657     get_a_reg_operand(op_value_1,kind_1);
  3  1658     next;
  3  1659     if class <> comma_class then error(delimiter,line_no,element_no);
  3  1660     get_a_reg_operand(op_value_2,kind_2);
  3  1661   end of get_2_reg_operands;
  2  1662 
  2  1662 
  2  1662 
  2  1662 
  2  1662 
  2  1662 
  2  1662 
  2  1662 
  2  1662   integer procedure look_ahead_class;
  2  1663   begin
  3  1664     integer to; long name,number;
  3  1665     look_ahead_class := get_element(name,number,line_pointer,to);
  3  1666   end look_ahead_class;
  2  1667 
  2  1667 
  2  1667 
  2  1667   procedure skip_until_delim_class;
  2  1668   begin
  3  1669     for class:=read_kind(line_pointer) while class <> delim_class  
  3  1670     and class <> eof_class 
  3  1671     and class <> stop_line_class do
  3  1672     line_pointer:=line_pointer + 1;
  3  1673   end skip_until_delim_class;
  2  1674 
  2  1674 
  2  1674 
  2  1674 
  2  1674   integer procedure get_long_name(long_name);
  2  1675   long array long_name;
  2  1676   begin
  3  1677     integer class,to;
  3  1678     long name,number;
  3  1679     class := get_element(name,number,line_pointer,to);
  3  1680     if class = unknown_name_class or class = text_class then
  3  1681     begin
  4  1682       get_long_name := 1;
  4  1683       long_name(1) := name;
  4  1684       long_name(2) := 0;
  4  1685     end
  3  1686     else
  3  1687     if class = long_text_class then
  3  1688     begin
  4  1689       long_name(1) := read_value(line_pointer);
  4  1690       long_name(2) := read_value(line_pointer + 2);
  4  1691       get_long_name :=  if read_kind(line_pointer + 3 ) = text_class 
  4  1692       then -2 else 2;
  4  1693     end
  3  1694     else
  3  1695     get_long_name := 0;
  3  1696   end get_long_name;
  2  1697 
  2  1697   <* the following procedures uses getnext element
  2  1698      to get next element into 
  2  1699      class,name,number,type
  2  1700      class1,name1,number1,type2
  2  1701      class2,name2,number2,type2 *>
  2  1702 
  2  1702   integer procedure next;
  2  1703   begin
  3  1704   next := class := get_next_element(name,number);
  3  1705   type := if class = text_class then name_table(number,0) else class;
  3  1706   end next;
  2  1707 
  2  1707   integer procedure next1;
  2  1708   begin
  3  1709   next1 := class1 := get_next_element(name1,number1);
  3  1710   type1 := if class1 = text_class  then name_table(number,0) else class1;
  3  1711   end next1;
  2  1712 
  2  1712   integer procedure next2;
  2  1713   begin
  3  1714   next2:=class2:=get_next_element(name2,number2);
  3  1715   type2 := if class2 = text_class then name_table(number,0) else class2;
  3  1716   end next2;
  2  1717 
  2  1717   integer procedure skip_next;
  2  1718   begin
  3  1719   long dummyname,dummynumber;
  3  1720   skip_next:=get_next_element(dummyname,dummynumber);
  3  1721   end skip_next;
  2  1722 
  2  1722   integer procedure look;
  2  1723   begin
  3  1724   look := class := look_ahead_class;
  3  1725   end look;
  2  1726 
  2  1726   integer procedure look1;
  2  1727   begin
  3  1728   look1 := class1 := look_ahead_class;
  3  1729   end look1;
  2  1730 
  2  1730   integer procedure look2;
  2  1731   begin
  3  1732   look2:= class2 := look_ahead_class;
  3  1733   end look2;
  2  1734 
  2  1734 
  2  1734 
  2  1734 
  2  1734 
  2  1734 
  2  1734 
  2  1734   integer procedure get_next_element(name,number);
  2  1735   long name,number;
  2  1736   begin
  3  1737     integer to,testclass;;
  3  1738     get_next_element := testclass := get_element(name,number,line_pointer,to);
  3  1739     element_no:=element_no+1;
  3  1740     line_pointer := if line_pointer = no_of_elements then line_pointer else to;
  3  1741   end get_next_element;
  2  1742 
  2  1742 
  2  1742 
  2  1742   integer procedure get_element(name,number,from,to);
  2  1743   value from; integer from,to; long name,number;
  2  1744   begin
  3  1745     integer class;
  3  1746     for class:=read_kind(from) while class = delim_class do
  3  1747     from := from + 1;
  3  1748 
  3  1748     if class = text_class then
  3  1749     begin
  4  1750       if read_kind(from+1) <> text_class or
  4  1751       ( read_kind(from+1) = text_class and read_value(from+1) = 0) then
  4  1752       begin
  5  1753         <* short text *>
  5  1754         name := read_value(from);
  5  1755         if name = find_name(1) then found := true;
  5  1756         get_element := if look_up_name(name_table,name,number) then
  5  1757          text_class else  unknown_name_class;
  5  1758       end
  4  1759      else get_element := unknown_name_class;;
  4  1760       <* skip to 1. not text element *>
  4  1761       for from := from+1 while read_kind(from) = text_class do;
  4  1762       to := from;
  4  1763     end
  3  1764     else
  3  1765     if class = plus_class then
  3  1766     begin
  4  1767       if get_integer(number,from+1,to) then get_element := 2
  4  1768 
  4  1768       else get_element := 1;
  4  1769     end
  3  1770     else
  3  1771     if class = minus_class then
  3  1772     begin
  4  1773       if get_integer(number,from+1,to) then get_element:=2
  4  1774       else get_element:=1;
  4  1775       number:= number*(-1);
  4  1776     end else
  3  1777     if class = 2 then
  3  1778     begin
  4  1779       if get_integer(number,from,to) then get_element:=2
  4  1780       else get_element := 1;
  4  1781     end
  3  1782     else
  3  1783     if class = stop_line_class then
  3  1784     begin
  4  1785       number := read_value(from);
  4  1786       if number extract 24 = 25 <* eof value *> then
  4  1787       get_element := eof_class
  4  1788       else
  4  1789       get_element :=class;
  4  1790       to :=from+1;
  4  1791     end else
  3  1792     begin
  4  1793       number:=read_value(from);
  4  1794       to := from+1;
  4  1795       get_element := class;
  4  1796     end;
  3  1797   end get_element;
  2  1798 
  2  1798 
  2  1798   boolean procedure get_integer(number,from,to);
  2  1799   value from; integer from,to; long number;
  2  1800   begin
  3  1801     long base;
  3  1802     if read_kind(from)<> 2 then get_integer:=false
  3  1803     else
  3  1804     begin
  4  1805       if read_kind(from+1) = period_class then
  4  1806       begin
  5  1807         base:=read_value(from);
  5  1808         from:=from+2;
  5  1809         if read_kind(from) <> 2 then
  5  1810         begin
  6  1811           get_integer := false;
  6  1812           to := from-1;
  6  1813         end else
  5  1814         begin
  6  1815           number:=read_value(from);
  6  1816           get_integer:=base_convert(base,number);
  6  1817          to := from + 1;
  6  1818         end;
  5  1819       end else
  4  1820       begin
  5  1821         number:=read_value(from);
  5  1822         get_integer := true;
  5  1823         to := from + 1;
  5  1824       end;
  4  1825     end;
  3  1826   end get_integer;
  2  1827 
  2  1827 
  2  1827   boolean procedure base_convert(base,number);
  2  1828   long base,number;
  2  1829   begin
  3  1830     integer shift_index; long number1,number2;
  3  1831     number2:=0; shift_index :=0;
  3  1832     base_convert := true;
  3  1833     if base = 8 then 
  3  1834     begin
  4  1835       for number1 := number mod 10 while number <> 0 do
  4  1836       begin
  5  1837         number := number // 10;
  5  1838         if number1>7 or number1 < 0 then base_convert := false;
  5  1839         number2:=number2 + number1 shift shift_index;
  5  1840         shift_index := shift_index+3;
  5  1841       end;
  4  1842       number := number2;
  4  1843     end else base_convert:=false;
  3  1844   end base_convert;
  2  1845   boolean procedure read_and_set_bits(operand);
  2  1846   <******************************************>
  2  1847   long array operand;
  2  1848   begin
  3  1849   boolean error;
  3  1850   error := false;
  3  1851   
  3  1851   repeat
  3  1852     begin
  4  1853     next;
  4  1854     if class = left_par_class then
  4  1855       begin
  5  1856       if next1 <> number_class then
  5  1857         error := true
  5  1858        else
  5  1859       if next<> colon_class then
  5  1860         error := true
  5  1861         else
  5  1862       if next2 <> number_class then
  5  1863         error := true
  5  1864        else
  5  1865       if next <> right_par_class then
  5  1866        error := true;
  5  1867         if number_1 <= number_2 and
  5  1868            number_1 >= 0 and
  5  1869            number_2 <= no_of_bits_in_code and
  5  1870            -, error then
  5  1871            error := -, set_bits(operand,number1 extract 24,
  5  1872                     number2 extract 24)
  5  1873          else error := true;
  5  1874        next;
  5  1875 
  5  1875        end else
  4  1876     if class = number_class then
  4  1877      begin
  5  1878      if number >= 0 and  number <= no_of_bits_in_code then
  5  1879      error := -, set_bits(operand,number extract 24,
  5  1880               number extract 24)
  5  1881       else error := true;
  5  1882       next;
  5  1883 
  5  1883       end;
  4  1884     end;
  3  1885   until class <> comma_class or error;
  3  1886   read_and_set_bits := -, error;
  3  1887 
  3  1887   end read_and_set_bits;
  2  1888 
  2  1888   boolean procedure set_bits(operand,bit_low,bit_high);
  2  1889   <****************************************************>
  2  1890   value bit_low,bit_high; integer bit_low,bit_high;
  2  1891   long array operand;
  2  1892   begin
  3  1893   integer 
  3  1894     index_low,
  3  1895     index_high,
  3  1896     bit_high_in_word,
  3  1897     bit_low_in_word,
  3  1898     word_index;
  3  1899 
  3  1899   if bit_high < bit_low then
  3  1900     set_bits := false
  3  1901    else
  3  1902     begin
  4  1903     index_low := case ( bit_low//48) + 1 of
  4  1904                  (1,2,3,4,5,6,7,8);
  4  1905     index_high := case (bit_high//48) + 1 of
  4  1906                  (1,2,3,4,5,6,7,8);
  4  1907     bit_low_in_word := bit_low mod 48;
  4  1908     bit_high_in_word := bit_high mod 48;
  4  1909     if index_low = index_high then
  4  1910       begin
  5  1911       operand(index_low) := log_or(operand(index_low),
  5  1912         extend(-1) shift ((-48)+(bit_high_in_word+1-bit_low_in_word))
  5  1913         shift (47 - bit_high_in_word));
  5  1914       end
  4  1915      else
  4  1916        begin
  5  1917        operand(index_low) := log_or(operand(index_low),
  5  1918          extend (-1) shift ( - bit_low_in_word));
  5  1919        operand(index_high) := log_or(operand(index_high),
  5  1920          extend(-1) shift (47 - bit_high_in_word));
  5  1921        for word_index := index_low+1 step 1 until index_low  - 1 do
  5  1922          operand(word_index) := -1;
  5  1923         end;
  4  1924       set_bits := true;
  4  1925     end;
  3  1926 
  3  1926   end set_bits;
  2  1927 
  2  1927 
  2  1927 
  2  1927   long procedure init_mask(operand,from,to);
  2  1928   <******************************************>
  2  1929   value from,to,operand; long operand; integer from,to;
  2  1930   init_mask:=mask_in(operand,extend (-1),
  2  1931   extend (-1) shift ((-48)+(to+1-from))  shift (47-to));
  2  1932 
  2  1932 
  2  1932   <* *************************************************
  2  1933      directive procedures section
  2  1934      ************************************************* *>
  2  1935 
  2  1935   procedure directive_skip_until;
  2  1936   begin
  3  1937   boolean until_condition_met;
  3  1938 
  3  1938   long skip_end_name;
  3  1939   next1;
  3  1940 
  3  1940   if class1 = text_class or class1 = unknown_name_class then
  3  1941     begin
  4  1942     skip_end_name := name1;
  4  1943     repeat
  4  1944      if list_all then list_line;
  4  1945      read_next_source_line;
  4  1946 
  4  1946      if class = star_class then
  4  1947         begin
  5  1948         next1;
  5  1949         if name1 = long <:until:> then
  5  1950           begin
  6  1951           next1;
  6  1952           if class1 = colon_class then
  6  1953               next1;
  6  1954           if name1 = skip_end_name then 
  6  1955               until_condition_met := true;
  6  1956           end;
  5  1957         end control of first token;
  4  1958      until until_condition_met;
  4  1959      end else
  3  1960       error(directive,line_no,element_no);
  3  1961   return_from_skip := true;
  3  1962   end directive_skip_until;
  2  1963 procedure directive_onlyin_logic(mode);
  2  1964 <********************************>
  2  1965 value mode; boolean mode;
  2  1966 <* if mode is true then skip only in is performed
  2  1967    else skip not in is performed *>
  2  1968 begin
  3  1969 <* check the param list to se the param
  3  1970    mode.<text> , where <text> schall be equal
  3  1971    the next element *>
  3  1972 long array param_name,until_name,only_name(1:2);
  3  1973 integer param_call_result;
  3  1974 boolean until_condition_met;
  3  1975 
  3  1975 
  3  1975 param_call_result := get_text_string(<:version:>,param_name);
  3  1976 class1 := get_long_name(only_name);
  3  1977 if param_call_result <> 0 or
  3  1978    (param_call_result = 0 and
  3  1979      (( mode and (param_name(1) <> only_name(1) or
  3  1980       param_name(2) <> only_name(2)))
  3  1981     or
  3  1982      ( -, mode and  param_name(1) = only_name(1) and
  3  1983                     param_name(2) = only_name(2) ))) then
  3  1984 
  3  1984   begin 
  4  1985   <* skip until a 'until' directive is met with
  4  1986      with the version text as parameter. *>
  4  1987    until_condition_met := false;
  4  1988    repeat
  4  1989      if list_all then list_line;
  4  1990      read_next_source_line;
  4  1991      if class = eof_class then until_condition_met := true;
  4  1992      
  4  1992      if class = star_class then
  4  1993        begin
  5  1994        next1;
  5  1995        if name1 = long <:until:> then
  5  1996          begin
  6  1997          next1;
  6  1998          if class1 = colon_class then
  6  1999            class1 := get_long_name(until_name);
  6  2000          if class1 > 0 and
  6  2001             only_name(1) =until_name(1) and
  6  2002             only_name(2) = until_name(2) then
  6  2003            until_condition_met := true;
  6  2004          end;
  5  2005        end control of first token 'colon' ;
  4  2006     until until_condition_met;
  4  2007  end skip not this version ;
  3  2008 return_from_skip := true;
  3  2009 
  3  2009 
  3  2009 end directive_only_in;
  2  2010 
  2  2010 
  2  2010 procedure include_source_file;
  2  2011 <****************************>
  2  2012 begin
  3  2013 long array file_name(1:2);
  3  2014 integer stack_result;
  3  2015 class1 := get_long_name(file_name);
  3  2016 if class1 > 0 then
  3  2017     begin
  4  2018     stack_result :=  stack_and_connect_in(file_name);
  4  2019     if list then list_line;
  4  2020 
  4  2020     if stack_result <> 0 then
  4  2021       write(out,"*",4,<: copy connect error: :>,file_name,"nl",1)
  4  2022     else
  4  2023       write(out,<: micasm source : :>,file_name,"nl",1);
  4  2024     end else 
  3  2025     error(directive,line_no,element_no);
  3  2026 end include_source_file;
  2  2027 
  2  2027 
  2  2027 
  2  2027 
  2  2027 
  2  2027 
  2  2027 
  2  2027 procedure list_line;
  2  2028 <*******************>
  2  2029 begin
  3  2030 if -, line_listed then
  3  2031 begin
  4  2032 line_listed := true;
  4  2033 if line_num then write(out,<<dddd>,line_no);
  4  2034       if code_generated then
  4  2035       begin
  5  2036       if dec_code then write(out,<<_zddd>,instr_index);
  5  2037       if octal_code then write(out,<<_zddd>,octal(extend instr_index));     
  5  2038       outchar(out,'sp');
  5  2039       end
  4  2040       else
  4  2041        begin
  5  2042        if dec_code then write(out,"sp",5);
  5  2043        if octal_code then write(out,"sp",5);
  5  2044        outchar(out,'sp');
  5  2045        end;
  4  2046       line_pointer := 0;
  4  2047       for line_pointer := line_pointer+1 
  4  2048       while line_pointer <= no_of_elements do
  4  2049       begin
  5  2050         if read_kind(line_pointer) = 6 then
  5  2051         begin
  6  2052           write(out,string read_value(increase(line_pointer)));
  6  2053           line_pointer := line_pointer - 1;
  6  2054         end
  5  2055         else
  5  2056         if read_kind(line_pointer) = 2 then
  5  2057         write(out,<<d>,read_value(line_pointer))
  5  2058         else
  5  2059         outchar(out,read_value(line_pointer) extract 8);
  5  2060       end;
  4  2061   end;
  3  2062 end list_line;
  2  2063 
  2  2063 
  2  2063 
  2  2063 
  2  2063   procedure read_next_source_line;
  2  2064   <******************************>
  2  2065   begin
  3  2066   <* reset boolean control *>
  3  2067   error_in_this_line := false ;
  3  2068 
  3  2068   code_generated := false;
  3  2069   alu_function_performed := false;
  3  2070   jump_sekvens_performed := false;
  3  2071   addrs_performed := false;
  3  2072   shift_condition_performed := false;
  3  2073   jump_addrs_performed := false;
  3  2074   line_listed := false;
  3  2075 
  3  2075   line_pointer := 1;
  3  2076   element_no := 0;
  3  2077   no_of_elements := read_all(in,read_value,read_kind,1);
  3  2078   line_no := line_no + 1;
  3  2079   next;
  3  2080   end read_next_source_line;
  2  2081 
  2  2081 
  2  2081 
  2  2081 
  2  2081 
  2  2081 
  2  2081 
  2  2081 
  2  2081 
  2  2081   plus_label_dec := long <:plus label dec.:>;
  2  2082   declaration := long <:declaration:>;
  2  2083   operand_type := long <:operand type:>;
  2  2084   minus_delim := long <:minus delim.:>;
  2  2085   missing_operand := long <:missing operand.:>;
  2  2086   label_dec:= long <:label dec.:>;
  2  2087   illegal_type := long <:illegal type:>;
  2  2088   plus_name_dec := long <:plus name dec.:>;
  2  2089   name_unknown := long <:name unknown:>;
  2  2090   directive := long <:directive:>;
  2  2091   unknown := long <:unknown:>;
  2  2092   name_length := long <:name length exeedes 6 char.:>;
  2  2093   delimiter := long <:delimiter:>;
  2  2094   undec_label := long <:undec. label or addrs. :>;
  2  2095   multiple_function := long <:multiple function.:>;
  2  2096   plus_addrs_def := long <:plus addrs def.:>;
  2  2097   minus_addrs_def := long <:minus addrs. def.:>;
  2  2098   illegal_source := long <:illegal source:>;
  2  2099   illegal_dest := long <:illegal destination:>;
  2  2100   illegal_dest_and_source := long <:illegal destination and or source :>;
  2  2101   save_file_name := long <:illegal save file name:>;
  2  2102   load_file_name := long <:illegal load file name:>;
  2  2103   termination := long <:termination:>;
  2  2104   operand := long <:unknown operand:>;
  2  2105   algol copy.3 <* schould be m290xinit *>;
t2901init d.801119.1148
  2  2105 
  2  2106 
  2  2106 
  2  2106 
  2  2106 
  2  2106 
  2  2106   <* def. of micro types *>
  2  2107   alu_function_type := 11;
  2  2108   jump_addrs_type := 12;
  2  2109   <*not def. type := 13 *>
  2  2110   jump_sekvens_type := 14;
  2  2111   load_counter_type :=15;
  2  2112   special_type :=16;
  2  2113   special_min:=0;
  2  2114   special_max:=32;
  2  2115 
  2  2115   reg_op_type := 30;
  2  2116   condition_type := 40;
  2  2117   condition_type_min :=40;
  2  2118   condition_type_max:=45;
  2  2119 
  2  2119 
  2  2119   format(0) :=0;
  2  2120   format(1):=1 shift 12 + 4;
  2  2121   format(2) := 5 shift 12 + 5;
  2  2122   format(3):= 6 shift 12 + 10;
  2  2123   format(4):= 11 shift 12 + 11;
  2  2124   format(5) := 12 shift 12 + 12;
  2  2125   format(6) := 13 shift 12 + 13;
  2  2126   format(7) := 14 shift 12 + 15;
  2  2127   format(8):= 16 shift 12 + 16;
  2  2128   format(9):=17 shift 12 + 19;
  2  2129   format(10) := 20 shift 12 + 20;
  2  2130   format(11) := 21 shift 12 + 21;
  2  2131   format(12):= 22 shift 12 + 22;
  2  2132   format(13):= 23 shift 12 + 31;
  2  2133   format(14) := 32 shift 12 + 35;
  2  2134   format(15):= 36 shift 12 + 39;
  2  2135   format(16) := 40 shift 12 + 47;
  2  2136   <*      initialising af fixed values bit patterns *>
  2  2137   for index:=0 step 1 until 48 do
  2  2138   bits(index):= (extend (-1)) shift (-48+index);
  2  2139 
  2  2139 
  2  2139 
  2  2139 
  2  2139 
  2  2139 
  2  2139   <* initializing of fixed mask *>
  2  2140 
  2  2140   alu_dest_mask := bits(3) shift (48-26);
  2  2141   alu_func_mask := bits(3) shift (48-29);
  2  2142   carry_mask := bits(1) shift (48-23);
  2  2143   alu_source_mask := bits(3) shift (48-32);
  2  2144   addrs_mask := bits(12) shift (48-40);
  2  2145   condition_select_mask := bits(5) shift (48-11);
  2  2146   sekvens_mask := bits(4) shift (48-5);
  2  2147   condition_enable_mask := bits(1) shift  (48-6);
  2  2148   condition_pol_mask := bits(1) shift (48-12);
  2  2149   parity_mask := bits(1) shift (48-1);
  2  2150 
  2  2150   status_reg_enable_mask := bits(1) shift (48-13);
  2  2151 
  2  2151   interupt_enable_mask   := bits(1) shift (48-14);
  2  2152 
  2  2152   spare_1_mask := bits(2) shift (48-16);
  2  2153 
  2  2153   control_enable_mask := bits(1) shift (48-17);
  2  2154 
  2  2154   control_code_mask := bits(3) shift (48-20);
  2  2155 
  2  2155   dest_extern_mask := bits(1) shift (48-21);
  2  2156 
  2  2156   source_extern_mask := bits(1) shift (48-22);
  2  2157 
  2  2157   short_dest_mask := bits(4) shift (48-36);
  2  2158 
  2  2158   short_source_mask := bits(4) shift (48-40);
  2  2159   special_source_mask := bits(1) shift (48-20);
  2  2160 
  2  2160 
  2  2160   dest_mask := dest_extern_mask + short_dest_mask;
  2  2161 
  2  2161   source_mask := source_extern_mask + short_source_mask;
  2  2162 
  2  2162   alu_addrs_mode_mask := bits(3) shift (48-26) + bits(3) shift (48-32);
  2  2163 
  2  2163   alu_full_length_mask := bits(9) shift (48-32);
  2  2164   control_full_mask := bits(4) shift (48-20);
  2  2165 
  2  2165 
  2  2165   <* initialising of fixed code values *>
  2  2166   <* alu source control init *>
  2  2167   a_and_q := 0;
  2  2168   a_and_b := 1;
  2  2169   z_and_q := 2;
  2  2170   z_and_b:= 3;
  2  2171   z_and_a := 4;
  2  2172   d_and_a := 5;
  2  2173   d_and_q := 6;
  2  2174   d_and_z := 7;
  2  2175   <* alu destination control init *>
  2  2176   q_reg := 0;
  2  2177   nop := no_load := 1;
  2  2178   rama := 2;
  2  2179   ramf := 3;
  2  2180   ramqd := 4;
  2  2181   ramd := 5;
  2  2182   ramqu := 6;
  2  2183   ramu := 7;
  2  2184   <* alu_function control init *>
  2  2185   alu_add := 0;
  2  2186   alu_subr := 1;
  2  2187   alu_subs := 2;
  2  2188   alu_or := 3;
  2  2189   alu_and := 4;
  2  2190   alu_notrs := 5;
  2  2191   alu_exor := 6;
  2  2192   alu_exnor := 7;
  2  2193   <* control value for selecting not addressable
  2  2194   registers, inside                          *>
  2  2195   q_regs_value := -1;
  2  2196   nop_code := mask_in(extend 0,extend 14,sekvens_mask);
  2  2197   nop_code := mask_in(nop_code,extend 1,alu_dest_mask);
  2  2198   nop_code:=mask_in(nop_code,extend 0,dest_extern_mask);
  2  2199   nop_code:=mask_in(nop_code,extend 0,source_extern_mask);
  2  2200   <* mir(15) := 0 , mir(14) := 1. *>
  2  2201   nop_code := mask_in(nop_code,extend 0, spare_1_mask);
  2  2202   <* bit 6 7 in micro instr. shall be of oposite value *>
  2  2203   nop_code := mask_in(nop_code,extend 8,condition_select_mask);
  2  2204   nop_code := mask_in(nop_code,extend 1,interupt_enable_mask);
  2  2205   code_kind := 30;
  2  2206   start_addrs := 0;
  2  2207   if false then
  2  2208   begin
  3  2209     for index:=1 step 1 until 24 do
  3  2210     begin
  4  2211       outchar(out,10);
  4  2212       print_formated(mask_in(extend 0,
  4  2213       extend(-1),std_mask(extend index)));
  4  2214     end;
  3  2215   end;
  2  2216 

t290xasm
  2  2216 
  2  2216 
  2  2216   init_long_array(name_table,-1);
  2  2217 
  2  2217   init_HEAP;
  2  2218   <* init of fields *>
  2  2219 
  2  2219   no_of_errors := 0;
  2  2220   error_record_chain_head := nil;
  2  2221   error_record_text := 4;
  2  2222   error_record_line_no := 8;
  2  2223   error_record_element_pos := 10;
  2  2224   error_record_chain := 6;
  2  2225   error_record_instr_index := 12;
  2  2226   error_record_length := 12;
  2  2227 
  2  2227 
  2  2227   l_d_record_chain_head := nil;
  2  2228   l_d_name := 4;
  2  2229   l_d_chain := 8;
  2  2230   l_d_spec := 2;
  2  2231   l_d_index := 4;
  2  2232   l_d_line_no := 6;
  2  2233   l_d_spec_class := 10;
  2  2234   l_d_record_length := 10;
  2  2235   map_spec := 1; vector_spec := 2;
  2  2236 
  2  2236   l_r_chain := 2;
  2  2237   l_r_name  := 6;
  2  2238   l_r_index := 8;
  2  2239   l_r_line_no := 10;
  2  2240   l_r_element_no := 12;
  2  2241   l_r_record_length := 12;
  2  2242   l_r_record_chain_head :=nil; <* no label refference blocks *>
  2  2243   name_name := 8;
  2  2244   name_chain := 2;
  2  2245   name_type := 4;
  2  2246   name_record_length := 8;
  2  2247   name_table(0,0) := name_table_length;
  2  2248   <* asm. begin *>
  2  2249     prom_code := -1;
  2  2250     for index := 0 step 1 until length_of_code-1 do
  2  2251     opcode(index):=prom_code;
  2  2252     begin
  3  2253     integer array tail(1:20);
  3  2254     zone dummy(128,1,stderror);
  3  2255     real r;
  3  2256     integer i,j,lookup_result;
  3  2257     long array mic_asm_prog_name,program_name(1:2);
  3  2258     i:=system(2,j,program_name);
  3  2259     open(dummy,4,programname,0);
  3  2260     lookup_result:=monitor(42,dummy,0,tail);
  3  2261     write(out,"ff",1,<:Micro asm.:__:>,true,12,program_name,
  3  2262                <: version date.:>,
  3  2263           <<zddddd.dddd>,systime(6,tail(6),r) + r/1000000,"nl",1);
  3  2264     close(dummy,true);
  3  2265   if connect_file_in(mic_asm_prog_name) = 4 then
  3  2266   write(out,"nl",1,"*",5,<:Source file connect error::>,
  3  2267         mic_asm_prog_name);
  3  2268     get_connected_name(in,micasm_prog_name);
  3  2269     lookup_result:=monitor(42,in,0,tail);
  3  2270     write(out,"nl",1,<:Source file:_:>,true,12,
  3  2271           mic_asm_prog_name,<: version date.:>,
  3  2272           <<zddddd.dddd>,systime(6,tail(6),r)+r/1000000,"nl",1);
  3  2273 
  3  2273 
  3  2273     <* control if any and get name of object file *>
  3  2274     if get_left_side(object_file_name) = 0 then
  3  2275          object_file := true else object_file := false;
  3  2276     if object_file then
  3  2277     begin
  4  2278     open(dummy,0,object_file_name,0);
  4  2279     lookup_result := monitor(42) lookup tail:(dummy,0,tail);
  4  2280     
  4  2280     if lookup_result <> 0 then
  4  2281        object_file := false;
  4  2282     write(out,"nl",1,if objectfile then       
  4  2283               <:Object file:_:> else <:*** Unknown object file::>,
  4  2284               true,12,object_file_name);       
  4  2285     if objectfile then
  4  2286       write(out,<: version date.:>,
  4  2287             <<zddddd.dddd>,systime(6,systime(7,0,0.0),r)+r/1000000);
  4  2288     outchar(out,'nl');           
  4  2289     close(dummy,true);
  4  2290     end;
  3  2291   end block with control of files;
  2  2292 
  2  2292 
  2  2292 
  2  2292     <* get and control of other parameters,
  2  2293        unknown parameters is ignored. *>
  2  2294     get_bool_string(<:help:>,help_wanted);
  2  2295     if help_wanted then help_string(<:micasmhelp:>);
  2  2296     if get_bool_string(<:message:>,message_list) <> 0 then
  2  2297       message_list := true;
  2  2298     list_all := false;
  2  2299     if get_bool_string(<:list:>,list) <> 0 then
  2  2300        begin
  3  2301        long array param_name(1:2);
  3  2302        if get_text_string(<:list:>,param_name) = 0 then
  3  2303          begin
  4  2304          if param_name(1) = long <:all:> then list:=list_all := true;
  4  2305          end;
  3  2306        end;
  2  2307     if get_bool_string(<:linenum:>,line_num) <> 0 then line_num:= true;
  2  2308     if get_bool_string(<:deccode:>,dec_code) <> 0 then dec_code := true;
  2  2309     if get_bool_string(<:octal:>,octal_code) <> 0 then
  2  2310       begin
  3  2311       octal_code := true;
  3  2312       if get_text_string(<:octal:>,param_name) = 0 then
  3  2313         begin
  4  2314         if param_name(1) = long <:only:> then dec_code:= line_num := false;
  4  2315         end;
  3  2316       end;
  2  2317     if get_text_string(<:find:>,find_name) = 0 then find := true;
  2  2318 
  2  2318     if get_bool_string(<:errors:>,list_error_lines) <> 0 and
  2  2319       get_bool_string(<:errorlines:>,list_error_lines) <> 0 and
  2  2320       get_bool_string(<:els:>,list_error_lines) <> 0 then
  2  2321          list_error_lines := true;
  2  2322     get_bool_string(<:code:>,print_code);
  2  2323     get_bool_string(<:labelxref:>,test_label_ref);
  2  2324     get_bool_string(<:labelbit:>,test_label_bit);
  2  2325     get_bool_string(<:entry:>,entry_list_wanted);
  2  2326     get_bool_string(<:bitlines:>,list_bit_lines);
  2  2327     return_from_skip := false;
  2  2328 
  2  2328     <* initializing of counting variables and
  2  2329        reading of first code line *>
  2  2330     
  2  2330 
  2  2330     instr_index:=0;            
  2  2331     present_code := nop_code;            
  2  2332     error_in_this_line := false;
  2  2333     line_no := 0;
  2  2334     read_next_source_line;
  2  2335 
  2  2335 while class <> eof_class do
  2  2336     begin
  3  2337       if class = stop_line_class then
  3  2338       begin
  4  2339         <* 
  4  2340       end line , or
  4  2341 comment      . Commant wil be be created by
  4  2342 get_next_element       *>
  4  2343 if (list or (error_in_this_line and list_error_lines )  
  4  2344     or ( find and found ))
  4  2345     and ( -, return_from_skip or list_all) then
  4  2346     list_line;
  4  2347 return_from_skip := false;
  4  2348 found := false;
  4  2349     if print_code and code_generated then
  4  2350     begin
  5  2351     if -, list  and -, list_bit_lines and
  5  2352        -, (error_in_this_line and list_error_lines) then
  5  2353       write(out,<<-zddd>,instr_index,
  5  2354              octal(extend instr_index),"sp",1)
  5  2355       else
  5  2356    if -, list and list_bit_lines  and
  5  2357       -, (error_in_this_line and list_error_lines) then
  5  2358       begin
  6  2359       list_line;
  6  2360       write(out,<:          :>);
  6  2361       end
  5  2362      else
  5  2363       write(out,<:          :>);
  5  2364       print_formated(present_code);
  5  2365       outchar(out,10);
  5  2366     end;
  4  2367     if code_generated then
  4  2368     begin
  5  2369       op_code(instr_index):=present_code;
  5  2370       instr_index:=instr_index+1;
  5  2371       present_code := nop_code;            
  5  2372     end;
  4  2373   <* read next line of source  text *>
  4  2374   read_next_source_line;
  4  2375   end class 2 new line
  3  2376   else
  3  2377   if class = text_class or class = unknown_name_class then
  3  2378   begin
  4  2379     class_2 := look_ahead_class;
  4  2380     if class_2 = colon_class or class_2 = slash_class then
  4  2381       begin
  5  2382       spec_class := nil;
  5  2383       if element_no = 1 and class = unknown_name_class then
  5  2384         begin                    
  6  2385         if class2 = slash_class then
  6  2386           begin
  7  2387           skip_next;
  7  2388           look2;
  7  2389           if class2 = quote_class or class2 = double_quote_class then
  7  2390             begin
  8  2391             spec_class := if class2 = quoteclass then map_spec else vectorspec;
  8  2392             skip_next; <* skip quote or double quote *>
  8  2393             look2;
  8  2394             end;
  7  2395 
  7  2395           if class2 = number_class or class2 = colon_class then
  7  2396              begin
  8  2397 
  8  2397              if class_2 = number_class then
  8  2398                begin
  9  2399                next1;
  9  2400                class2 := look_ahead_class;
  9  2401                end
  8  2402               else
  8  2403               number_1 := line_no;
  8  2404              if class2 = colon_class then
  8  2405                begin
  9  2406                new_insert_label_def(name,number,instr_index,line_no,
  9  2407                                     number1 extract 24,spec_class);
  9  2408                end else
  8  2409               error(directive,line_no,element_no);
  8  2410              end
  7  2411             else
  7  2412              error(directive,line_no,element_no);
  7  2413              end
  6  2414             else
  6  2415              begin
  7  2416              new_insert_label_def(name,number,instr_index,line_no,
  7  2417                                   nil,spec_class)
  7  2418              end;
  6  2419         next;
  6  2420         end
  5  2421            
  5  2421       else
  5  2422       error(label_dec,line_no,element_no);
  5  2423       next;
  5  2424     end 
  4  2425     else
  4  2426     begin
  5  2427       if class = unknown_name_class then
  5  2428       begin
  6  2429         error(name_unknown,line_no,element_no);
  6  2430         skip_until_delim_class;
  6  2431         next;
  6  2432       end
  5  2433       else
  5  2434       if name_table(number,0) = alu_function_type then
  5  2435       alu_function
  5  2436       else
  5  2437       if name_table(number,0) = jump_addrs_type then
  5  2438       jump_addrs
  5  2439       else
  5  2440       if name_table(number,0) = jump_sekvens_type then
  5  2441       jump_sekvens
  5  2442       else
  5  2443       if name_table(number,0) = load_counter_type then
  5  2444       load_counter
  5  2445       else
  5  2446       if name_table(number,0) = special_type then
  5  2447       special
  5  2448       else
  5  2449       begin
  6  2450         error(illegal_type,line_no,element_no);
  6  2451         next
  6  2452       end;
  5  2453     end;
  4  2454   end type equal identifier
  3  2455   else
  3  2456   if class = star_class then
  3  2457   begin
  4  2458     <* After star is assm. directive,
  4  2459     1 direktive pr. line,
  4  2460     after the direktive the rest of the line is skipped,
  4  2461     the direktive schould be the first element in the line *>
  4  2462     if code_generated then error(directive,line_no,element_no)
  4  2463     else
  4  2464     begin
  5  2465       next1;
  5  2466       next2;
  5  2467       if (class1 <> 9 and class1 <> 6 ) or class2 <> colon_class <*colon*> then
  5  2468       error(long <:test dir 1 :>,line_no,if class2 <> colon_class then element_no else
  5  2469       element_no -1)
  5  2470       else
  5  2471       begin
  6  2472         if name1 = long <:name:> then
  6  2473         begin
  7  2474           next1;
  7  2475           if class1 <> 9 then
  7  2476           error(if class1 <> 6 then long <:test dir 2.:> else
  7  2477           plus_name_dec,line_no,element_no)
  7  2478           else
  7  2479           begin
  8  2480             name_table(number1,1) := name1;
  8  2481             index:=0;
  8  2482 
  8  2482             for class2 := next2
  8  2483             while class2 = comma_class and index < 5 do
  8  2484             begin
  9  2485               next2;
  9  2486               if class2 = number_class then
  9  2487               name_table(number1,index) := number2
  9  2488               else
  9  2489               if class2 = 6 <* defined name *> then
  9  2490               name_table(number1,index) := number_2            
  9  2491               else
  9  2492               begin
 10  2493                 error(long <:test dir. 3:>,line_no,element_no);
 10  2494                 index:=100;
 10  2495               end;
  9  2496               if index = 0 then index :=2 else
  9  2497               if index<100 then index:=index+1;
  9  2498             end;
  8  2499           end;
  7  2500         end else
  6  2501         
  6  2501         if name1 = long <:const:> then
  6  2502           begin
  7  2503           next1;
  7  2504           if class1 <> 9 then
  7  2505             error(if class1 <> 6 then directive else
  7  2506                    plus_name_dec,line_no,element_no)
  7  2507            else
  7  2508              begin
  8  2509              next2;
  8  2510              if class2 = comma_class then
  8  2511                begin
  9  2512                next2;
  9  2513                if class2 = number_class then
  9  2514                  begin
 10  2515                  new_insert_label_def(name1,number1,
 10  2516                                       number2 extract 12,line_no,nil,nil);
 10  2517                  end
  9  2518                 else error(directive,line_no,element_no);
  9  2519                end 
  8  2520               else error(directive,line_no,element_no);
  8  2521              end;
  7  2522           end else
  6  2523        
  6  2523         if name1 = long <:mask:> then 
  6  2524         begin
  7  2525         long array operand(1:1); <* only one word used *>
  7  2526         boolean mask_succes;
  7  2527         long mask_name,mask_number;
  7  2528         operand(1) := 0;
  7  2529           if next1 <> unknown_name_class then
  7  2530           error(long <: directive 2:>,line_no,element_no)
  7  2531           else
  7  2532           if next2 <> comma_class  then
  7  2533           error(long <:directive 3:>,line_no,element_no)
  7  2534           else
  7  2535            begin
  8  2536            mask_name := name1;
  8  2537            mask_number := number1;
  8  2538            mask_succes := read_and_set_bits(operand);
  8  2539            if  -, mask_succes then 
  8  2540              error(long <:directive 4:>,line_no,element_no)
  8  2541             else
  8  2542              begin
  9  2543              name_table(mask_number,0) := mask_type;
  9  2544              name_table(mask_number,1) := mask_name;
  9  2545              name_table(mask_number,2) := operand(1);
  9  2546 
  9  2546              end;
  8  2547            end;
  7  2548         end else
  6  2549         if name1 = long <:origo:> then
  6  2550         begin
  7  2551           if next1 <> number_class then
  7  2552           error(long <:test dir. 4:>,line_no,element_no)
  7  2553           else
  7  2554           instr_index := number1;
  7  2555         end
  6  2556         else
  6  2557         if name1 = long <:list:> then
  6  2558         begin
  7  2559           next1;
  7  2560           if name1 = long <:on:> or name1 = long <:yes:> then
  7  2561           list := true
  7  2562           else
  7  2563           if name1 = long <:off:> or name1 = long <:no:> then
  7  2564           list := false
  7  2565           else
  7  2566           error(long <:test dir 5:>,line_no,element_no)
  7  2567         end else
  6  2568         if name1 = long <:page:> then
  6  2569           begin
  7  2570           if list then
  7  2571           outchar(out,12);
  7  2572           end else
  6  2573         if name1 = long <:skip:> then
  6  2574            begin
  7  2575            <* procedure skip logic *>
  7  2576            directive_skip_until;
  7  2577            end else
  6  2578         if name1 = long <:onlyi:>  add 'n' then
  6  2579            begin
  7  2580            <* procedure skip if not in named mode *>
  7  2581            directive_onlyin_logic(true);
  7  2582            end else
  6  2583         if name1 = long <:notin:> then
  6  2584            begin
  7  2585            <* skip if named mode *>
  7  2586            directive_onlyin_logic(false <* invert the onlyin logic *>);
  7  2587            end else
  6  2588         if name1 = long <:until:> then
  6  2589            begin
  7  2590            <* a until directive met outside the
  7  2591               performing of the skip logic is blind *>
  7  2592            return_from_skip := true;
  7  2593            end else
  6  2594         if name1 = long <:load:> then
  6  2595         begin
  7  2596           zone zntb(128,1,stderror);
  7  2597           long array long_name(1:2);
  7  2598           integer move_count,no_of_halfwords;
  7  2599           long array field move_index;
  7  2600           move_index := -4;
  7  2601           class1 := get_long_name(long_name);
  7  2602           if class1 >0 then
  7  2603           begin
  8  2604             open(zntb,4,longname,0);
  8  2605             movecount:=(name_table_length +1)* 5 <*dimension*> * 4 <*halfwords*>;
  8  2606             for movecount :=movecount while movecount > 0 do
  8  2607             begin
  9  2608               no_of_halfwords := if move_count > 512 then 512 else
  9  2609               move_count;
  9  2610               move_count := move_count - no_of_halfwords;
  9  2611               inrec6(zntb,no_of_halfwords);
  9  2612               to_from(name_table.move_index,zntb,no_of_half_words);
  9  2613               move_index := move_index + no_of_half_words;
  9  2614             end read and move;
  8  2615           end else error(load_file_name,0,0);
  7  2616           if false then
  7  2617           begin
  8  2618             <******* test *******>
  8  2619             write(out,<:<12>load contents of name table::>);
  8  2620             for move_count :=0 step 1 until name_table_length do
  8  2621             write(out,<:<10>:>,move_count,name_table(move_count,0),
  8  2622             name_table(move_count,1),
  8  2623             name_table(move_count,2),
  8  2624             name_table(move_count,3),
  8  2625             name_table(move_count,4));
  8  2626           end test;
  7  2627         end else
  6  2628         if name1 = long <:save:> then
  6  2629         begin
  7  2630           zone zntb(128,1,stderror);
  7  2631           integer movecount,no_of_half_words;
  7  2632           integer array field move_index;
  7  2633           long array long_name(1:2);
  7  2634           class1:=get_long_name(long_name);
  7  2635           if class1>0 then
  7  2636           begin
  8  2637             open(zntb,4,long_name,0);
  8  2638             if false then
  8  2639             begin
  9  2640               <***** test ***>
  9  2641               write(out,<:<12>contents of saved name table::>);
  9  2642               for move_count := 0 step 1 until name_table_length do
  9  2643               write(out,<:<10>:>,movecount,name_table(move_count,0),
  9  2644               name_table(move_count,1),
  9  2645               name_table(move_count,2),
  9  2646               name_table(move_count,3),
  9  2647               name_table(move_count,4));
  9  2648             end test;
  8  2649             movecount := (name_table_length +1)* 5 <*dimmension*> * 4 <*halfwords*>;
  8  2650             move_index := -4;
  8  2651             for movecount := movecount while movecount > 0 do
  8  2652             begin
  9  2653               no_of_halfwords := if movecount > 512 then 512 else
  9  2654               movecount;
  9  2655               movecount := movecount - no_of_half_words;
  9  2656               outrec6(zntb,no_of_half_words);
  9  2657               tofrom(zntb,name_table.move_index,no_of_half_words);
  9  2658               move_index := moveindex + no_of_half_words;
  9  2659             end move and write;
  8  2660             close(zntb,true);
  8  2661           end else error(save_file_name,0,0);
  7  2662         end else
  6  2663         if name1 = long <:end:> then
  6  2664         begin
  7  2665           class := eof_class;
  7  2666         if list then list_line;
  7  2667         end else
  6  2668         if name1 = long <:copy:> then
  6  2669           begin
  7  2670           include_source_file;     
  7  2671           end 
  6  2672         else
  6  2673        
  6  2673         if name1 = long <:test:> then
  6  2674         begin
  7  2675           next;
  7  2676           if class <> 9 and class <> 6 then
  7  2677           error(long <:test dir t1:>,line_no,element_no)
  7  2678           else
  7  2679           begin
  8  2680             if name = long <:on:> or name = long <:yes:> then
  8  2681             test := true
  8  2682             else
  8  2683             if name = long <:off:> or name = long <:no:> then
  8  2684             test := false
  8  2685 
  8  2685             else
  8  2686             if name = long <:biton:> or name = long <:bitye:> add 115 then
  8  2687             print_code := true
  8  2688             else
  8  2689             if name = long <:bitof:> add 102 or name = long <:bitno:> then
  8  2690             print_code := false
  8  2691             
  8  2691             else
  8  2692 
  8  2692             if name = long <:labre:>  add 102 then
  8  2693             test_label_ref := true
  8  2694 
  8  2694             else
  8  2695     
  8  2695             if name = long <:labbi:> add 116 then
  8  2696             test_label_bit := true
  8  2697             else error(directive,line_no,element_no);
  8  2698           end;
  7  2699         end
  6  2700      
  6  2700         else
  6  2701         error(long <:unknown directive:>,line_no,element_no-1);
  6  2702       end;
  5  2703     end;
  4  2704     class := if class <> eof_class then stop_line_class 
  4  2705     else eof_class;
  4  2706   end directive class
  3  2707   else
  3  2708   if class = semicolon_class then
  3  2709   begin
  4  2710     <* 
  4  2711     comment start *>
  4  2712             class := stop_line_class;
  4  2713   end
  3  2714   else
  3  2715   if class = long_text_class then
  3  2716   begin
  4  2717     error(name_length,line_no,element_no);
  4  2718     next;
  4  2719   end
  3  2720   else
  3  2721   begin
  4  2722     <* class is something else *>
  4  2723     error(delimiter,line_no,element_no);
  4  2724     next;
  4  2725   end;
  3  2726 if class = eof_class then
  3  2727   begin
  4  2728   long array mic_asm_prog_name(1:2);
  4  2729 
  4  2729   integer result;
  4  2730   result := connect_file_in(mic_asm_prog_name);
  4  2731 
  4  2731   if result = 0 then
  4  2732     begin
  5  2733     write(out,"nl",1,<: micasm source file: :>,mic_asm_prog_name);
  5  2734     read_next_source_line;
  5  2735     end;
  4  2736 
  4  2736    end;
  3  2737 end scan loop;
  2  2738 last_instr_index := instr_index ;
  2  2739 resolve_labels;
  2  2740 <* temp delete
  2  2741 
  2  2741 
  2  2741 
  2  2741 
  2  2741 
  2  2741 for index:=1 step 1 until label_ref_index do
  2  2742 begin
  2  2743 
  2  2743 
  2  2743 name := label_ref_table(index,0);
  2  2744 if -, lookup_name(label_def_table,name,number) then
  2  2745   begin
  2  2746   instr_index := label_ref_table(index,2);
  2  2747   error(undec_label,label_ref_table(index,1) extract 24,
  2  2748   label_ref_table(index,3) extract 24)
  2  2749   end
  2  2750 
  2  2750     else
  2  2751 begin
  2  2752 op_code(label_ref_table(index,2)):=
  2  2753 mask_in(op_code(label_ref_table(index,2)),
  2  2754 extend ( label_def_table(number,0) extract 24),addrs_mask);
  2  2755 if  test_label_bit or test_label_ref then
  2  2756 begin
  2  2757 write(out,"nl",1,"sp",5,<<zddd>,
  2  2758 octal(label_ref_table(index,2)),
  2  2759 <: label ref to: :>,
  2  2760 octal(label_def_table(number,0)));
  2  2761 if test_label_bit then
  2  2762   begin
  2  2763   write(out,<:<10>           :>);
  2  2764   print_formated(opcode(label_ref_table(index,2)));
  2  2765   end;
  2  2766 end;
  2  2767 end;
  2  2768 end label insert loop;
  2  2769 if entry_list_wanted then
  2  2770 begin
  2  2771 <@ print label xref table @>
  2  2772 procedure shellsort(n,file);
  2  2773 value               n;
  2  2774 integer             n;
  2  2775 long array                 file;
  2  2776 begin
  2  2777   integer dist,i,k0,k,kmd;
  2  2778   long a,fkmd,a_help,fkmd_help;
  2  2779 
  2  2779   dist:= -1;
  2  2780   for dist:= dist shift(-1) while dist>0 do
  2  2781   if dist<n then
  2  2782   begin
  2  2783     for k0:= dist+1 step 1 until n do
  2  2784     begin
  2  2785       a:= file(k0,1);
  2  2786       a_help := file(k0,2);
  2  2787       k:= k0;
  2  2788 p:    kmd:= k-dist;
  2  2789       if kmd>0 then
  2  2790       begin
  2  2791         fkmd:= file(kmd,1);
  2  2792         fkmd_help := file(kmd,2);
  2  2793         if fkmd>a then
  2  2794         begin
  2  2795           file(k,2) := fkmd_help;
  2  2796           file(k,1):= fkmd;
  2  2797           k:= kmd;
  2  2798           goto p
  2  2799         end
  2  2800       end;
  2  2801       file(k,1):= a;
  2  2802       file(k,2) := a_help;
  2  2803     end
  2  2804   end
  2  2805 end;
  2  2806 integer sort_index;
  2  2807 long array wr_name(1:2);
  2  2808 comment 
  2  2809 shell_sort(label_def_table_length,label_def_table);
  2  2810 wr_name(2):=0;
  2  2811 for index := 1 step 1 until label_def_table_length do
  2  2812     begin
  2  2813     l_d_record := ((index-1)*8)+4;
  2  2814     if label_def_table(index,0) > 0 and 
  2  2815        (label_def_table.l_d_record.l_d_spec >0)
  2  2816     then
  2  2817       begin
  2  2818       wr_name(1):= label_def_table(index,1);
  2  2819       write(out,false add 32,15 -
  2  2820             write(out,<:<10>:>,wr_name),
  2  2821             <:<13>       :>,<: ref. to addrs.::>,
  2  2822             <<__zddd>,
  2  2823             label_def_table.l_d_record.l_d_index,
  2  2824             octal(extend label_def_table.l_d_record.l_d_index),   
  2  2825             <:  spec or line no.::>,label_def_table.l_d_record.l_d_spec -1);
  2  2826       end;
  2  2827     end;
  2  2828 end write xref label table loop;
  2  2829   end of temp delete *>
  2  2830 
  2  2830 if test_label_ref then label_list(false);
  2  2831 
  2  2831 if entry_list_wanted then label_list(true);
  2  2832 
  2  2832 
  2  2832 if print_error_table then
  2  2833  write(out,<:<10>MIC. ASM. OK! :>)                          
  2  2834 else
  2  2835  write(out,<:<10>MIC. ASM. SORRY!:>,<<_ddd>,no_of_errors,<: error(s):>,
  2  2836 <: found.:>);
  2  2837 write(out,"nl",1,<:LAST INSTR. ADDRS.::>,<<_dddd>,last_instr_index,
  2  2838 <: OCTAL INSTR. ADDRS.::>,octal(extend(last_instr_index)));
  2  2839 
  2  2839 
  2  2839 
  2  2839 
  2  2839 
  2  2839 if object_file then 
  2  2840 begin
  3  2841 zone code_out(128,1,stderror);
  3  2842 long array field code_block;
  3  2843 integer short_clock;
  3  2844 index :=1;
  3  2845 open(code_out,4,object_file_name(increase(index)),0);
  3  2846 setposition(code_out,0,1); <* start on segm 1. due to
  3  2847                               historic reasons *>
  3  2848 for code_block :=-4,code_block + 512 
  3  2849 while code_block < 4*length_of_code - 4 do
  3  2850 begin
  4  2851 outrec6(code_out,512);
  4  2852 to_from(code_out,op_code.code_block,512);
  4  2853 end;
  3  2854 for index := 1 step 1 until 10 do tail(index):=0;
  3  2855 tail(1) :=1 + ( length_of_code//128);
  3  2856 tail(6) := systime(7)short clock:(0,0.0);
  3  2857 tail(9) := code_kind shift 12 + start_addrs extract 12;
  3  2858 
  3  2858 tail(10) := length_of_code*4 + 512 <* first segm is dummy  *>;
  3  2859 monitor(44)change entry:(code_out,0,tail);
  3  2860 close(code_out,true);
  3  2861 end send object code to backing storage area;
  2  2862 end dec of table block;
  1  2863 write(out,<: TRANSLATOR BLOCKS::>,<<__d>,blocksread,"nl",1);
  1  2864 
  1  2864 fp_proc(7,0,0,0); <*  end program *>
  1  2865 end \f


aandb    D:   796
         A:  2168
         U:  1394
aandq    D:   796
         A:  2167
         U:  1380
addrsmask
         D:   786
         A:  2144
         U:   964  1275  1548
addrsperformed
         D:   712  1238
         A:  1276  2071
         U:  1236  1271  1288
addrsref D:   913
         A:   925
         U:  1273  1627
allocate D:   821
         A:   825
         U:   849   884   918   932
allways  D:   347
         U:   345   360
aluadd   D:   800
         A:  2185
aluaddrsmodemask
         D:   789
         A:  2162
         U:  1551
aluand   D:   800
         A:  2189
aludestmask
         D:   781
         A:  2140
         U:  1342  1490  1493  1495  1512  1517  1543  2197
aluexnor D:   801
         A:  2192
aluexor  D:   800
         A:  2191
alufulllengthmask
         D:   790
         A:  2163
         U:  1552
alufuncmask
         D:   783
         A:  2141
         U:  1307  1545
alufunction
         D:  1300
         U:  2435
alufunctionperformed
         D:   710
         A:  1320  2069
         U:  1131  1304
alufunctiontype
         D:   705
         A:  2107
         U:  2434
alunotrs D:   800
         A:  2190
aluor    D:   800
         A:  2188
alusourcemask
         D:   782
         A:  2143
         U:  1398  1488  1513  1518  1544
alusubr  D:   800
         A:  2186
alusubs  D:   800
         A:  2187
apostclass
         D:   507
         A:   636
         U:   668  1263  1267  1619
arr      D:     6
         A:    13
         U:     3    11    14
base     D:  1801  1828
         A:  1807
         U:  1816  1827  1833
baseconvert
         D:  1827
         A:  1832  1838  1843
         U:  1816
bithigh  D:  1890
         U:  1888  1899  1905  1908
bithighinword
         D:  1896
         A:  1908
         U:  1912  1913  1920
bitlow   D:  1890
         U:  1888  1899  1903  1907
bitlowinword
         D:  1897
         A:  1907
         U:  1912  1918
bits     D:   805
         A:  2138
         U:  2140  2141  2142  2143  2144  2145  2146  2147
             2148  2149  2150  2151  2152  2153  2154  2155
             2156  2157  2158  2159  2162  2163  2164
blocklinelimit
         D:   446
blocksread
         U:  2863
boolargstring
         D:    42
         A:    52
calculatehashkey
         D:   892
         A:   895
         U:   864   883
calledbefore
         D:   276
         A:   297
         U:   281   287
carry    D:  1402  1455  1480  1500
         U:  1400  1451  1453  1476  1478  1496  1498  1520
carrymask
         D:   780
         A:  2142
         U:  1451  1476  1496  1520  1542
char     D:   453   465
         U:   456   457   459   460
charclass
         D:   703
charclass1
         D:   703
charvalue
         D:   702
charvalue1
         D:   702
charvalue2
         D:   702
class    D:   514  1677  1745
         A:  1242  1564  1669  1679  1704  1724  1746  2665
             2704  2712
         U:  1139  1155  1218  1233  1242  1243  1245  1262
             1263  1264  1267  1272  1285  1287  1565  1583
             1613  1619  1624  1625  1634  1659  1669  1670
             1671  1680  1687  1705  1746  1748  1765  1771
             1777  1783  1789  1795  1854  1876  1885  1946
             1991  1992  2335  2337  2377  2383  2427  2456
             2676  2704  2708  2715  2726
class1   D:   515
         A:  1709  1728  1976  1999  2015  2601  2634
         U:  1203  1710  1940  1952  1998  2000  2016  2467
             2475  2476  2504  2505  2602  2635
class2   D:   516
         A:  1714  1732  2379  2400  2482
         U:  1715  2380  2385  2389  2391  2395  2397  2404
             2467  2468  2483  2486  2489  2510  2513
close    U:   491  2264  2289  2660  2860
code     D:   589
         A:   600   602
         U:   586   600   602   608
codeblock
         D:  2842
         A:  2848
         U:  2848  2849  2852
codegenerated
         D:   710
         A:  1143  1159  1231  1320  2068
         U:  2034  2349  2367  2462
codekind D:   502
         A:  2205
         U:  2857
codeout  D:  2841
         U:  2845  2846  2851  2852  2859  2860
colonclass
         D:   506
         A:   632
         U:   678  1859  1952  1998  2380  2395  2404  2467
             2468
commaclass
         D:   504
         A:   626
         U:   673  1233  1285  1570  1575  1659  1885  2483
             2510  2532
conditionenablemask
         D:   770
         A:  2147
         U:  1137  1153  1532
conditionpolmask
         D:   772
         A:  2148
         U:  1534
conditionselectmask
         D:   771
         A:  2145
         U:  1533  2203
conditiontype
         D:   707
         A:  2116
         U:  1245  1249
conditiontypemax
         D:   708
         A:  2118
conditiontypemin
         D:   708
         A:  2117
connected
         D:   352
         A:   363   366   375
         U:   356   369
connectfilein
         D:   272
         A:   284   289   295
         U:  2265  2730
connectouttoleftside
         D:   345
         A:   377
continuationchar
         D:   447
         U:   487   488   490
controlcodemask
         D:   777
         A:  2154
         U:  1539
controlenablemask
         D:   776
         A:  2153
         U:  1450  1470  1538
controlfullmask
         D:   791
         A:  2164
         U:  1553
createmask
         D:   353   381
         A:   360   361
         U:   361   362   374   379   402
currentoutmodeandkind
         D:   527
currentoutname
         D:   526
danda    D:   796
         A:  2172
         U:  1389
dandq    D:   796
         A:  2173
         U:  1377
dandz    D:   796
         A:  2174
         U:  1360
deccode  D:   539
         A:  2308  2314
         U:  2036  2042  2308
declaration
         D:   759
         A:  2082
default  D:    61
         A:    64
delimclass
         D:   506
         A:   639
         U:  1669  1746
delimiter
         D:   761
         A:  2093
         U:  1204  1219  1659  2723
destexternmask
         D:   778
         A:  2155
         U:  1540  2160  2198
destmask D:   787
         A:  2160
         U:  1444  1464  1487  1549
destvalue
         D:  1329  1406
         A:  1331  1333  1336  1339  1417  1422  1431  1437
         U:  1342  1443  1444
directive
         D:   760
         A:  2090
         U:  1960  2025  2409  2412  2462  2505  2518  2520
             2697
directiveonlyinlogic
         D:  1963
         U:  2581  2586
directiveskipuntil
         D:  1935
         U:  2576
docname  D:   311   354   381
         A:   373
         U:   309   319   322   335   358   362   374   379
              387   396   403
doublequoteclass
         D:   509
         A:   638
         U:   669  2389
drum     D:   347
         U:   345   361
dummy    D:  2254
         U:  2259  2260  2264  2278  2279  2289
dummyname
         D:  1719
         U:  1720
dummynumber
         D:  1719
         U:  1720
elementno
         D:   703   916
         A:  1739  2076
         U:   913   924  1133  1149  1174  1204  1219  1250
             1271  1273  1278  1282  1288  1305  1475  1507
             1584  1585  1627  1631  1639  1650  1659  1739
             1960  2025  2383  2409  2412  2422  2429  2450
             2462  2468  2469  2477  2493  2506  2518  2520
             2530  2533  2540  2552  2566  2677  2697  2701
             2717  2723
elementpos
         D:   845
         U:   841   854
elementsprline
         D:   495
emptyparamname
         D:   278
         A:   279
         U:   294
entrylistwanted
         D:   545
         U:  2325  2831
eof      D:   710
eofclass D:   513
         A:   646
         U:  1670  1787  1991  2335  2665  2704  2705  2726
eol      D:   710
equalclass
         D:   506
         A:   634
         U:   682
error    D:   841  1849
         A:  1850  1857  1860  1863  1866  1871  1873  1879
             1881
         U:   955  1133  1149  1174  1204  1219  1250  1271
             1278  1282  1288  1305  1475  1507  1584  1585
             1631  1639  1650  1659  1870  1885  1886  1960
             2025  2409  2412  2422  2429  2450  2462  2468
             2476  2493  2505  2518  2520  2530  2533  2540
             2552  2566  2615  2661  2677  2697  2701  2717
             2723
errorinthisline
         D:   719
         A:   847  2067  2332
         U:  2343  2352  2357
errorrecord
         D:   733
         A:   849
         U:   850   851   852   853   854   855
errorrecordchain
         D:   738
         A:  2224
         U:   850  1084  1090  1095  1096  1097
errorrecordchainhead
         D:   740
         A:   851  1090  2220
         U:   850  1066  1071  1074  1089
errorrecordelementpos
         D:   736
         A:  2223
         U:   854  1103
errorrecordinstrindex
         D:   737
         A:  2225
         U:   855  1101  1102
errorrecordlength
         D:   739
         A:  2226
         U:   849
errorrecordlineno
         D:   735
         A:  2222
         U:   853  1078  1080  1100
errorrecordtext
         D:   734
         A:  2221
         U:   852  1104
errortext
         D:   834   844
         U:   832   837   841   852
exor     U:   602
fatalerror
         D:   832
         U:   830
filename D:   428   436  2013
         U:   431   432   434   471  2015  2018  2021  2023
filenamestring
         D:   426
         U:   424   431
find     D:   533
         A:  2317
         U:  2344
findname D:   525
         U:  1755  2317
format   D:   720
         A:  2119  2120  2121  2122  2123  2124  2125  2126
             2127  2128  2129  2130  2131  2132  2133  2134
             2135
         U:  1118
found    D:   201   534   862
         A:   204   215   863   869  1755  2348
         U:   209   866   874  2344
fpproc   U:   321   322   325   339   371   372   391   399
              403   493   839  2864
from     D:  1112  1743  1799  1929
         A:  1113  1121  1747  1761  1808
         U:  1118  1121  1742  1746  1747  1750  1751  1754
             1761  1762  1767  1773  1779  1785  1790  1793
             1794  1798  1802  1805  1807  1808  1809  1812
             1815  1817  1821  1823  1927  1931
funcbit  D:   591
funcmask D:   582   589
         A:   605
         U:   580   584   586   595   605
funcvalue
         D:   582   589
         A:   603
         U:   580   584   586   599   603
getallregoperands
         D:  1557
         A:  1586
         U:  1407  1459  1484  1504
getaregoperand
         D:  1607
         U:  1211  1568  1573  1578  1657  1660
getboolarg
         D:    54
         A:    67    79    82    85
         U:    40    51
getboolstring
         D:    32
         A:    40
         U:   696  2294  2296  2299  2307  2308  2309  2318
             2319  2320  2322  2323  2324  2325  2326
getconnectedname
         D:   299
         U:   283  2268
getdocspec
         D:   411
         U:   472
getelement
         D:  1742
         A:  1756  1759  1767  1768  1773  1774  1779  1780
             1787  1789  1795
         U:  1665  1679  1738
getfreetext
         D:   243
         A:   267   269
         U:   240
getintarg
         D:   126
         A:   142   145   148
         U:   124
getinteger
         D:  1798
         A:  1802  1811  1816  1822
         U:  1767  1773  1779
getintsetarg
         D:   150
         A:   178   180
         U:   191
getintsetstring
         D:   182
         A:   191
getintstring
         D:   116
         A:   124
getleftside
         D:   221
         A:   228   232
         U:   205   254   358  2274
getlongname
         D:  1674
         A:  1682  1691  1695
         U:  1976  1999  2015  2601  2634
getnextelement
         D:  1734
         A:  1738
         U:  1704  1709  1714  1720
getnextfreetext
         D:   236
         A:   240
         U:   280
gettextarg
         D:    97
         A:   109   111   113
         U:    95
gettextstring
         D:    88
         A:    95
         U:  1975  2302  2312  2317
getzone6 U:   305   416
get2regoperands
         D:  1653
         U:  1208
halfwordsprinstr
         D:   497
hashindex
         D:   555
         A:   557   565
         U:   561   564   565   566   567   568   569   570
              573   574
hashkey  D:   882
         A:   883
         U:   889   890
help     D:   434
         U:   432
helpfile D:   444
         U:   456   471   491
helpstring
         D:   424
         U:   697  2295
helpwanted
         D:   550   718
         U:   696   697  2294  2295
hexnumber
         D:   987
highset  D:   160
         U:   164   170
i        D:    19  2256
         A:    20  2258
         U:    21    29
illegalclass
         D:   504
         A:   624
         U:   667
illegaldest
         D:   763
         A:  2099
illegaldestandsource
         D:   764
         A:  2100
         U:  1475
illegalnumberclass
         D:   512
         A:   643
illegalsource
         D:   763
         A:  2098
illegaltype
         D:   760
         A:  2087
         U:  1250  2450
in       U:   283   321   322   325   339   487  2077  2268
             2269
includesourcefile
         D:  2010
         U:  2670
increase U:  2052  2845
index    D:   501   553   613   812   906   929   988  1112
             1170
         A:   466   569   615   654   658   666   680   683
              814   991  1028  1114  1214  2137  2209  2250
             2481  2494  2496  2497  2844  2854
         U:   467   551   615   617   655   659   667   681
              684   816   817   818   905   909   910   911
              927   933   935   940   993   995   999  1030
             1032  1038  1116  1118  1216  2138  2213  2251
             2483  2487  2490  2496  2497  2845  2854
indexhigh
         D:  1895
         A:  1905
         U:  1909  1919
indexlow D:  1894
         A:  1903
         U:  1909  1911  1917  1921
init     D:     5
         U:     3    13
initlongarray
         D:     3
         U:  2216
initmask D:  1927
         A:  1930
initshift
         D:   591
         A:   593   606
         U:   600   602   606
initHEAP D:   809
         U:  2217
inrec6   U:  2611
insertnamerecord
         D:   881
         A:   884
         U:   885   886   887   888   889   890
insertnametable
         D:   905
         U:   933
instr    D:   592
instrindex
         D:   699   916   930
         A:   954  2330  2370  2554
         U:   855   913   922   927   936  1273  1627  2036
             2037  2353  2354  2369  2370  2406  2416  2738
intable  U:   685
internalandexternal
         D:  1453
         U:  1313  1314
internaloperands
         D:  1400
         U:  1311  1312
interuptenablemask
         D:   774
         A:  2151
         U:  1536  2204
isotable U:   649
itemno   D:    60   101   131   157   197
         A:    68   106   137   169   214
         U:    65    68    69   104   106   107   135   137
              138   139   167   169   172   194
j        D:  2256
         U:  2258
jumpaddrs
         D:  1128
         U:  1164  2438
jumpaddrsperformed
         D:   711
         A:  1143  2073
         U:  1132  1148  1304
jumpaddrstype
         D:   705
         A:  2108
         U:  2437
jumpsekvens
         D:  1145
         U:  2441
jumpsekvensperformed
         D:   711
         A:  1159  2070
         U:  1131  1148
jumpsekvenstype
         D:   706
         A:  2110
         U:  2440
kind     D:   413   448  1482  1502  1609
         A:   418  1615  1622  1628  1638  1644  1649
         U:   411   472   473  1484  1504  1607
kind1    D:  1171  1405  1458  1482  1502  1559  1656
         A:  1563
         U:  1211  1407  1459  1557  1568  1657
kind2    D:  1171  1405  1458  1482  1502  1559  1656
         A:  1563
         U:  1408  1459  1484  1504  1557  1573  1660
kind3    D:  1405  1458  1483  1503  1559
         A:  1563
         U:  1409  1460  1485  1505  1557  1578
labeldec D:   760
         A:  2086
         U:  2422
labellist
         D:   983
         U:  2830  2831
labeltype
         D:   518
         A:   693
         U:   933   993  1030  1264  1625
laf1     D:    10
         A:    12
         U:    12    14
laf2     D:    10
         A:    12
         U:    13    14
lastchar D:   448
         A:   479
         U:   476   482   490
lastinstrindex
         D:   700
         A:  2738
         U:  2837  2838
ldchain  D:   747
         A:  2229
         U:   934
ldindex  D:   745
         A:  2231
         U:   936   963   971  1002  1003  1049  1050  1051
             1052
ldlineno D:   746
         A:  2232
         U:   937
ldname   D:   742
         A:  2228
         U:   967
ldrecord D:   741
         A:   932   960   995  1032  1046
         U:   933   934   936   937   938   939   963   967
              971   996  1002  1003  1004  1005  1007  1008
             1010  1033  1034  1035  1037  1048  1049  1050
             1051  1052
ldrecordchainhead
         D:   741
         A:   935  2227
         U:   934
ldrecordlength
         D:   748
         A:  2234
         U:   932
ldspec   D:   744
         A:  2230
         U:   938   996  1004  1005  1007  1008  1010  1033
             1034  1037  1048
ldspecclass
         D:   744
         A:  2233
         U:   939  1035
leftparclass
         D:   504
         A:   628
         U:   670  1139  1155  1203  1565  1854
lengthofcode
         D:   496
         A:   688
         U:   756  2250  2849  2855  2858
line     D:   445
         A:   457   461
         U:   466   467
linelengthlimit
         D:   447
         A:   470
         U:   459
linelimit
         D:   446
         A:   469
         U:   477
linelisted
         D:   717
         A:  2032  2074
         U:  2030
lineno   D:   447   701   845   916   930
         A:   475   476  2078  2333
         U:   476   477   841   853   913   923   927   937
             1133  1149  1174  1204  1219  1250  1271  1273
             1278  1282  1288  1305  1475  1507  1584  1585
             1627  1631  1639  1650  1659  1960  2025  2033
             2078  2403  2406  2409  2412  2416  2422  2429
             2450  2462  2468  2477  2493  2506  2516  2518
             2520  2530  2533  2540  2552  2566  2677  2697
             2701  2717  2723
lineno1  D:   701
linenum  D:   537
         A:  2307  2314
         U:  2033  2307
linepointer
         D:   701
         A:  1672  1740  2046  2047  2053  2075
         U:  1665  1669  1672  1679  1689  1690  1691  1738
             1740  2047  2048  2050  2052  2053  2056  2057
             2059
linepointer1
         D:   701
linepointer2
         D:   702
linepointer3
         D:   702
list     D:   536
         A:  2304  2561  2564
         U:  2019  2299  2343  2351  2356  2570  2666
listall  D:   548
         A:  2298  2304
         U:  1944  1989  2345
listbitlines
         D:   716
         U:  2326  2351  2356
listerrorlines
         D:   714
         A:  2321
         U:  2318  2319  2320  2343  2352  2357
listline D:  2027
         U:  1944  1989  2019  2346  2359  2666
loadcounter
         D:  1161
         U:  2444
loadcountertype
         D:   706
         A:  2111
         U:  2443
loadfilename
         D:   764
         A:  2102
         U:  2615
logand   U:   602
logor    U:   600  1911  1917  1919
longall  D:   592
         A:   594
         U:   602
longname D:  1675  2597  2633
         A:  1683  1684  1689  1690
         U:  1674  2601  2604  2634  2637
longone  D:   592
         A:   594
         U:   600   602
longtextclass
         D:   511
         A:   641
         U:  1687  2715
look     D:  1722
         A:  1724
lookaheadclass
         D:  1662
         A:  1665
         U:  1269  1564  1570  1575  1724  1728  1732  2379
             2400
lookaheadparam
         D:   249
         U:   260
looknamerecord
         D:   861
         A:   865   871
         U:   866   868   871   873
lookupindex
         D:  1611
lookupname
         D:   551
         A:   570
         U:   951  1756
lookupresult
         D:  2256
         A:  2260  2269  2279
         U:  2280
look1    D:  1726
         A:  1728
look2    D:  1730
         A:  1732
         U:  2388  2393
lowerbound
         D:     9
         A:    11
         U:    12    14
lowset   D:   159
         A:   164
         U:   165   177   178
lrchain  D:   750
         A:  2236
         U:   919   980
lrelementno
         D:   754
         A:  2240
         U:   924   956
lrindex  D:   752
         A:  2238
         U:   922   954   961   969
lrlineno D:   753
         A:  2239
         U:   923   955
lrname   D:   751
         A:  2237
         U:   921   951
lrrecord D:   749
         A:   918   948   980
         U:   919   920   921   922   923   924   925   949
              951   954   955   956   961   969   980
lrrecordchainhead
         D:   755
         A:   920  2242
         U:   919   948
lrrecordlength
         D:   755
         A:  2241
         U:   918
mapspec  D:   743
         A:  2235
         U:  1017  1021  2391
maskbit  D:   591
         A:   595
         U:   597
maskin   D:   586
         A:   608
         U:   584   962  1930  2196  2197  2198  2199  2201
             2203  2204  2212
maskname D:  2527
         A:  2536
         U:  2544
maskno   D:  1524
         U:  1522  1528
masknumber
         D:  2527
         A:  2537
         U:  2543  2544  2545
masksucces
         D:  2526
         A:  2538
         U:  2539
masktype D:   519
         A:   694
         U:  2543
matchname
         D:    59
maxindex D:   986
         A:  1038
         U:  1045  1046  1054
maxspec  D:   986
         A:  1027  1037
         U:  1033  1043  1058
messagelist
         D:   715
         A:  2297
         U:  2296
micasmprogname
         D:  2257  2728
         U:  2265  2267  2268  2271  2730  2733
minline  D:  1064
         A:  1081
         U:  1087  1094
minlineno
         D:  1065
         A:  1073  1080
         U:  1078
minusaddrsdef
         D:   762
         A:  2097
         U:  1288
minusclass
         D:   505
         A:   631
         U:   677  1771
minusdelim
         D:   759
         A:  2084
missingoperand
         D:   759
         A:  2085
         U:  1282  1585
mode     D:   413   448  1965
         A:   417
         U:   411   472  1963  1979  1982
monitor  U:  2260  2269  2279  2859
movecount
         D:  2598  2631
         A:  2605  2606  2610  2620  2642  2649  2651  2655
         U:  2606  2608  2609  2610  2621  2622  2623  2624
             2625  2643  2644  2645  2646  2647  2651  2653
             2654  2655
moveindex
         D:  2599  2632
         A:  2600  2613  2650  2658
         U:  2612  2613  2657  2658
movestring
         U:    39    50    94   123   190   431
multiplefunction
         D:   761
         A:  2095
         U:  1133  1149  1305
name     D:   413   577   858   878   893   906   915   929
             1664  1678  1735  1743
         A:   419   421  1754
         U:   411   857   864   868   876   883   887   892
              895   896   897   898   899   900   901   905
              909   913   921   927   933  1273  1627  1665
             1679  1683  1704  1734  1738  1742  1755  1756
             2406  2416  2680  2683  2686  2689  2692  2695
namechain
         D:   731
         A:  2244
         U:   889
namelength
         D:   761
         A:  2092
         U:  2717
namemask D:   728
namename D:   727
         A:  2243
         U:   868   871   887
namerecord
         D:   726
namerecordindex
         D:   859
         A:   864   873
         U:   857   865
namerecordlength
         D:   732
         A:  2246
nametable
         D:   553   724
         A:   909   910   911  1054  2247  2480  2487  2490
             2543  2544  2545
         U:   551   556   566   567   570   574   951   960
              993   995   999  1030  1032  1045  1046  1134
             1136  1150  1152  1172  1173  1176  1183  1184
             1193  1194  1207  1215  1227  1228  1245  1248
             1252  1253  1264  1306  1308  1636  1643  1705
             1710  1715  1756  2216  2434  2437  2440  2443
             2446  2612  2621  2622  2623  2624  2625  2643
             2644  2645  2646  2647  2657
nametableindex
         D:   945
         U:   952   960
nametablelength
         D:   501
         A:   690
         U:   724   991  1028  2247  2605  2620  2642  2649
nametype D:   730   859
         A:  2245
         U:   857   888
nameunknown
         D:   760
         A:  2089
         U:  2429
namevalue
         D:   729
name1    D:   577
         U:  1709  1942  1949  1954  1995  2472  2480  2501
             2515  2523  2536  2549  2557  2560  2563  2568
             2573  2578  2583  2588  2594  2628  2663  2668
             2673
name2    D:   578
         U:  1714
newinsertlabeldef
         D:   927
         A:   940
         U:  2406  2416  2515
newinsertname
         D:   876
         A:   885
newlookupname
         D:   857
         A:   874
next     D:  1702
         A:  1704
         U:  1138  1154  1217  1232  1234  1241  1268  1284
             1285  1287  1319  1567  1572  1577  1582  1612
             1621  1658  1853  1859  1865  1874  1882  2079
             2419  2423  2431  2451  2675  2718  2724
nextchar D:   446
         A:   454   458
         U:   457   458   459   461
next1    D:  1707
         A:  1709
         U:  1202  1856  1939  1948  1951  1953  1994  1997
             2399  2465  2474  2503  2529  2551  2559
next2    D:  1712
         A:  1714
         U:  1862  2466  2482  2485  2509  2512  2532
nil      D:   517
         A:   692
         U:   866   996  1004  1007  1008  1017  1027  1034
             1043  1054  1058  1066  1071  1075  1076  1087
             2220  2227  2242  2382  2417  2516
no       D:   239   246
         A:   241
         U:   240   241   243   265   266
nofound  D:   251
         A:   253   262
         U:   262   265   266
noinset  D:   154   185
         A:   166   177
         U:   150   182   191
noload   D:   798
         A:  2177
         U:  1331  1333  1490
noofbitsincode
         D:   497
         A:   687
         U:   720  1869  1878
noofelements
         D:   704
         A:  2077
         U:  1740  2048
nooferrors
         D:   500
         A:   848  2219
         U:   848  2835
noofhalfwords
         D:   823  2598  2631
         A:   827  2608  2653
         U:   821   826   827   828  2610  2611  2612  2613
             2655  2656  2657  2658
noofop   D:  1405  1458  1483  1503  1561
         A:  1407  1459  1484  1504  1562  1569  1574  1579
         U:  1410  1461  1586
noofspec D:   986
         A:   989  1011  1055
         U:  1011  1019  1055
nop      D:   798
         A:  2177
nopcode  D:   807
         A:  2196  2197  2198  2199  2201  2203  2204
         U:  2197  2198  2199  2201  2203  2204  2331  2371
notused  D:   520
         A:   648
         U:  1353  1355  1364  1370  1416  1473  1563
number   D:   577   611  1112  1664  1678  1735  1743  1799
             1828
         A:   618  1775  1785  1793  1815  1821  1837  1842
         U:   610   615   617   618  1134  1136  1150  1152
             1172  1173  1176  1183  1184  1193  1194  1201
             1227  1228  1245  1248  1252  1253  1264  1275
             1306  1308  1616  1636  1643  1665  1679  1704
             1705  1710  1715  1734  1738  1742  1756  1767
             1773  1775  1779  1786  1798  1816  1827  1835
             1837  1878  1879  1880  2406  2416  2434  2437
             2440  2443  2446
numberclass
         D:   511
         A:   642
         U:  1262  1613  1615  1628  1856  1862  1876  2395
             2397  2486  2513  2551
number1  D:   578  1830
         A:  1835  2403
         U:  1709  1838  1839  1867  1868  1871  2407  2480
             2487  2490  2515  2537  2554
number2  D:   578  1830
         A:  1831  1839
         U:  1714  1839  1842  1867  1869  1872  2487  2490
             2516
objectfile
         D:   713
         A:  2275  2281
         U:  2276  2282  2285  2839
objectfilename
         D:   757
         U:  2274  2278  2284  2845
octal    D:   610
         A:   620
         U:   969   971  1003  1050  1102  2037  2354  2838
octalcode
         D:   541
         A:  2311
         U:  2037  2043  2309
oneoperand
         D:  1498
         U:  1316  1317
onlyname D:  1972
         U:  1976  1979  1980  1982  1983  2001  2002
onlyspecwanted
         D:   984
         U:   983   997  1015
opcode   D:   756  1110
         A:   962  2251  2369
         U:   962   977  1108  1116  2852
opcodeindex
         D:   944
         A:   961
         U:   962   977
open     U:   471  2259  2278  2604  2637  2845
operand  D:   762  1847  1891  1929  2525
         A:  1911  1917  1919  1922  2104  2528
         U:  1278  1650  1845  1871  1879  1888  1911  1917
             1919  1927  1930  2538  2545
operandtype
         D:   759
         A:  2083
         U:  1507  1631  1639
opvalue  D:  1324  1482  1502  1609
         A:  1616  1623  1643
         U:  1322  1332  1335  1338  1484  1486  1487  1489
             1492  1504  1506  1508  1509  1510  1607
opvalue1 D:  1170  1346  1404  1457  1482  1502  1654
         A:  1355  1375
         U:  1208  1211  1212  1214  1344  1353  1355  1356
             1359  1362  1373  1375  1376  1379  1387  1392
             1407  1415  1416  1417  1420  1421  1422  1424
             1427  1429  1437  1459  1463  1464  1472  1653
             1657
opvalue2 D:  1170  1346  1404  1457  1482  1502  1654
         A:  1212
         U:  1208  1214  1344  1353  1355  1364  1370  1373
             1375  1383  1387  1392  1408  1421  1423  1424
             1428  1431  1432  1435  1438  1439  1459  1465
             1466  1467  1473  1484  1504  1653  1660
opvalue3 D:  1404  1457  1483  1503
         U:  1409  1428  1431  1432  1435  1438  1460  1485
             1505
op1      D:  1559
         A:  1563
         U:  1557  1568
op2      D:  1559
         A:  1563
         U:  1557  1573
op3      D:  1559
         A:  1563
         U:  1557  1578
out      D:   436
         U:   371   372   391   399   403   432   434   467
              472   484   485   492   563   573   837   968
              976  1000  1020  1047  1099  1116  1120  1125
             2021  2023  2033  2036  2037  2038  2042  2043
             2044  2052  2057  2059  2211  2261  2266  2270
             2282  2286  2288  2353  2360  2363  2365  2571
             2619  2621  2641  2643  2733  2833  2835  2837
             2863
outchar  U:   467  1116  1120  1125  2038  2044  2059  2211
             2288  2365  2571
outdocname
         D:   449
         U:   472
outrec6  U:  2656  2851
paramcallresult
         D:  1973
         A:  1975
         U:  1977  1978
paramname
         D:    59   132   161   200   223   238   247   274
              302   524  1972  2301
         A:   306   307
         U:    69    71    72    75    76   138   139   141
              172   174   205   208   211   212   221   229
              233   236   240   243   254   257   272   280
              283   295   299  1975  1979  1980  1982  1983
             2302  2304  2312  2314
paritymask
         D:   768
         A:  2149
         U:  1530
periodclass
         D:   505
         A:   630
         U:   674  1805
plusaddrsdef
         D:   762
         A:  2096
         U:  1271
plusclass
         D:   505
         A:   635
         U:   676  1765
pluslabeldec
         D:   759
         A:  2081
plusnamedec
         D:   760
         A:  2088
         U:  2477  2506
present  D:   580
         U:  1134  1136  1150  1152  1183  1192  1215  1226
             1252  1275  1306  1342  1398  1444  1446  1447
             1449  1451  1464  1466  1469  1470  1476  1487
             1488  1490  1493  1495  1496  1508  1509  1512
             1513  1517  1518  1520
presentcode
         D:   576
         A:   584  2331  2371
         U:   584  2364  2369
previus  D:  1064
         A:  1075  1083  1094
         U:  1081  1095  1096
primindex
         D:   555
         A:   561
         U:   564   568
printcode
         D:   713
         A:  2687  2690
         U:  2322  2349
printerrortable
         D:  1062
         A:  1067  1070
         U:   836  2832
printformated
         D:  1108
         U:   977  2212  2364
programname
         D:  2257
         U:  2258  2259  2261
promcode D:   806
         A:  2249
         U:  2251
qreg     D:   798
         A:  2176
         U:  1336  1493  1512
qregsvalue
         D:   803
         A:  2195
         U:  1335  1356  1373  1375  1383  1423  1429  1435
             1438  1443  1445  1463  1465  1486  1492  1510
quoteclass
         D:   508
         A:   636
         U:  2389  2391
r        D:  2255
         U:  2263  2272  2287
raf      D:    37    48    62    92   102   121   133   162
              188   202   226   250   429
         A:    38    49    63    93   103   122   134   163
              189   203   227   252   430
         U:    39    50    94   107   123   138   139   141
              172   174   190   208   229   233   257   431
rama     D:   798
         A:  2178
ramd     D:   798
         A:  2181
ramf     D:   798
         A:  2179
         U:  1339  1495  1517
ramqd    D:   798
         A:  2180
ramqu    D:   798
         A:  2182
ramu     D:   798
         A:  2183
readall  U:  2077
readandsetbits
         D:  1845
         A:  1886
         U:  2538
readchar U:   456   487
readkind D:   722
         U:  1669  1691  1746  1750  1751  1761  1802  1805
             1809  2050  2056  2077
readline D:   451
         A:   460
         U:   479
readnextsourceline
         D:  2063
         U:  1945  1990  2334  2374  2734
readtable
         D:   622
         A:   655   657   659   660   661   662   663   664
              665   667   668   669   670   671   672   673
              674   675   676   677   678   679   681   682
              684
         U:   649   685
readvalue
         D:   721
         U:  1689  1690  1751  1754  1785  1793  1807  1815
             1821  2052  2057  2059  2077
recordlength
         D:   879
         U:   876   884
reff     D:   907
         U:   905   911
refferencefirstfree
         D:   503
         A:   813   828
         U:   825   828   829
refferencelastfree
         D:   503
         A:   818
         U:   829
reffindex
         D:   879
         A:   886
         U:   876
regoptype
         D:   705
         A:  2115
         U:  1636
resolvelabels
         D:   942
         U:  2739
result   D:    34    46    57   277   318   353   385  2729
         A:    64    73    77   280   355   362   374   402
             2730
         U:    32    40    51    52    54   281   287   292
              322   323   363   377   403   404   406  2731
return   D:   118   129
         A:   141
         U:   116   124   126
returnfromskip
         D:   546
         A:  1961  2008  2327  2347  2592
         U:  2345
returnname
         D:    89    99
         U:    88    95    97   107
returnset
         D:   153   184
         A:   174
         U:   150   164   182   191
rightparclass
         D:   505
         A:   629
         U:   671  1218  1242  1269  1287  1583  1865
savefilename
         D:   764
         A:  2101
         U:  2661
scanaddrsoperands
         D:  1290
         U:  1141
scanconditionoperands
         D:  1295
         U:  1157
scansekvensoperands
         D:  1236
         U:  1293  1298
searchname
         D:    36    47    56    91    99   120   128   152
              187   196
         A:   207
         U:    39    40    50    51    54    65    94    95
               97   104   123   124   126   135   150   167
              190   191   194   207   211   212
searchno D:   199
         A:   205   218
         U:   208   214   218
searchparamname
         D:   194
         A:   206   216
         U:    65   104   135   167
searchstring
         D:    34    44    89   118   183
         U:    32    39    42    50    88    94   116   123
              182   190
searchtable
         D:   723
         A:   890
         U:   865   889
searchtablelength
         D:   499
         A:   689
         U:   723   903
sekvensmask
         D:   769
         A:  2146
         U:  1135  1151  1531  2196
semicolonclass
         D:   506
         A:   633   656
         U:   657  2708
sepandlength
         D:    60   101   131   156   199   225   251
         A:   107   138   208   233   257   260
         U:   108   209   258   261   265
setaludest
         D:  1322
         A:  1330  1341
         U:  1415  1420  1427  1472
setalusource
         D:  1344
         A:  1349  1370  1383  1397
         U:  1416  1421  1428  1473
setbits  D:  1888
         A:  1900  1924
         U:  1871  1879
setindex D:   158
         A:   165   175
         U:   170   174   175   177   178
setposition
         U:   485   492  2846
setresult
         D:  1405  1458  1483  1503
         A:  1415  1416  1420  1421  1427  1428
shiftconditionperformed
         D:   712
         A:  2072
shiftindex
         D:  1830
         A:  1831  1840
         U:  1839  1840
shortclock
         D:  2843
shortdestmask
         D:   784
         A:  2157
         U:  1508  1546  2160
shortname
         D:   553
         U:   551   557   558   559   560   564   567   570
shortsourcemask
         D:   785
         A:  2158
         U:  1509  1547  2161
skipendname
         D:  1938
         A:  1942
         U:  1954
skipnext D:  1717
         A:  1720
         U:  2387  2392
skipuntildelimclass
         D:  1667
         U:  2430
slashclass
         D:   510
         A:   637
         U:   675  2380  2385
sourceexternmask
         D:   779
         A:  2156
         U:  1541  2161  2199
sourcemask
         D:   788
         A:  2161
         U:  1446  1466  1550
sourcevalue
         D:  1348  1406
         A:  1357  1360  1365  1367  1377  1380  1389  1394
             1417  1423  1432  1438
         U:  1398  1445  1446  1447  1449
spare1mask
         D:   775
         A:  2152
         U:  1537  2201
spec     D:   930
         U:   927   938
specclass
         D:   743   930
         A:  1017  2382  2391
         U:   927   939  1021  1022  1035  2407  2417
special  D:  1166
         U:  2447
specialdeftype
         D:   763
         U:  1174
specialmax
         D:   709
         A:  2114
         U:  1173
specialmin
         D:   709
         A:  2113
         U:  1172
specialsourcemask
         D:   792
         A:  2159
         U:  1448  1469
specialtype
         D:   706
         A:  2112
         U:  2446
specnumber
         D:  1169
         A:  1201
         U:  1207  1215
stackandconnectin
         D:   309
         A:   326   331   342
         U:   294   295  2018
stackandconnectout
         D:   379
         A:   393   405   406   408
         U:   362   374
stackchainaddress
         D:   386
         A:   389   390
         U:   391   399   400   401
stackchain1
         D:   384
         A:   400
         U:   389
stackchain2
         D:   384
         A:   401
         U:   390
stacked  D:   317
         A:   330   340
         U:   330   337   340
stackedout
         D:   383
         A:   392   398
         U:   387   392   398
stackresult
         D:  2014
         A:  2018
         U:  2020
starclass
         D:   504
         A:   625
         U:   672  1946  1992  2456
startaddrs
         D:   502
         A:  2206
         U:  2857
startindex
         D:   251
         A:   255   264
         U:   257   260   264
statusregenablemask
         D:   773
         A:  2150
         U:  1535
stderror U:   444  2254  2596  2630  2841
stdmask  D:  1522
         A:  1528
         U:  1194  2213
stdtable D:    16
stoplineclass
         D:   513
         A:   645
         U:  1243  1671  1783  2337  2704  2712
system   U:    11    69   107   138   139   164   172   208
              229   233   257   260  2258
systime  U:  2263  2272  2287  2856
table    D:    18
         A:    21
         U:    16
tablelength
         D:   555
         A:   556
         U:   561   563   565
tail     D:   304   528  2253
         A:  2854  2855  2856  2857  2858
         U:   305   306   307  2260  2263  2269  2272  2279
             2859
tal      D:   613
         A:   614   617
         U:   617   620
terminal D:   450
         A:   473
         U:   482
termination
         D:   765
         A:  2103
         U:  1584
test     D:   530
         A:   686  2681  2684
testclass
         D:  1737
         A:  1738
testlabelbit
         D:   532
         A:  2696
         U:   965   974  2324
testlabelref
         D:   531
         A:  2693
         U:   965  2323  2830
textclass
         D:   511
         A:   640
         U:  1245  1264  1272  1625  1634  1644  1680  1691
             1705  1710  1715  1748  1750  1751  1757  1761
             1940  2377
this     D:  1064
         A:  1074  1084  1089  1095
         U:  1076  1078  1080  1083  1084  1090  1097  1100
             1101  1102  1103  1104
to       D:  1112  1664  1677  1737  1743  1799  1929
         A:  1762  1790  1794  1812  1817  1823
         U:  1665  1679  1738  1740  1742  1767  1773  1779
             1798  1927  1931
tofrom   U:    14  2612  2657  2852
type     D:   514   879   907  1240
         A:  1248  1705
         U:   876   888   905   910  1249  1625
typeofoperands
         D:  1303
         A:  1308
         U:  1309
type1    D:   515
         A:  1710
type2    D:   516
         A:  1715
undeclabel
         D:   761
         A:  2094
         U:   955
unknown  D:   761
         A:  2091
unknownnameclass
         D:   513
         A:   644
         U:  1262  1272  1624  1649  1680  1757  1759  1940
             2377  2383  2427  2529
untilconditionmet
         D:  1937  1974
         A:  1955  1987  1991  2003
         U:  1958  2006
untilname
         D:  1972
         U:  1999  2001  2002
upperbound
         D:     9
         U:    11    14
vectorspec
         D:   743
         A:  2235
         U:  1017  1022  2391
wordindex
         D:  1898
         A:  1921
         U:  1922
write    U:   484   563   573   837   968   976  1000  1020
             1047  1099  2021  2023  2033  2036  2037  2042
             2043  2052  2057  2261  2266  2270  2282  2286
             2353  2360  2363  2619  2621  2641  2643  2733
             2833  2835  2837  2863
writeline
         D:   463
         U:   480
wrname   D:   946   987
         A:   947   967   990   999  1045
         U:   972  1000  1047
z        D:   301   413
         U:   299   305   411   416
zanda    D:   796
         A:  2171
         U:  1367
zandb    D:   796
         A:  2170
         U:  1365  1518
zandq    D:   796
         A:  2169
         U:  1357  1488  1513
zerooneoperand
         D:  1478
         U:  1315
zntb     D:  2596  2630
         U:  2604  2611  2612  2637  2656  2657  2660
zonedescription
         D:   415
         U:   416   417   418   419   420   421   422
HEAP     D:   725
         A:   816   817   850   852   853   854   855   887
              888   889   919   921   922   923   924   934
              936   937   938   939  1096
         U:   868   871   951   954   955   956   961   963
              967   969   971   980   996  1002  1003  1004
             1005  1007  1008  1010  1033  1034  1035  1037
             1048  1049  1050  1051  1052  1078  1080  1084
             1090  1095  1097  1100  1101  1102  1103  1104
HEAPlength
         D:   498
         A:   691
         U:   725   814
no. of identifiers=493
algol end 121
▶EOF◀