The Usercode produced by the Kidsgrove Algol compiler

by

B. A. Wichmann

Contents

1. Introduction  1
  1.1 Usercode procedures 1
    1.1.1 Access to parameters in code procedures 1
  1.2 Main program and core layout 2  
  1.3 Usercode labels 3 
  1.4 Procedure layout (in P0) 4  
  1.5 System calls 4
2. Translation of expressions 4
  2.1 Stacking  5 
  2.2 One dimensional arrays 5
  2.3 Two dimensional arrays 6 
  2.4 Constants 6  
    2.4.1 V stores of P0 7
  2.5 Exponentiate and integer divide 8
  2.6 Common subexpressions 9 
  2.7 Type conversion 10
  2.8 Overflow 10 
3. For loops 10   
4. Booleans and conditions 12  
  4.1 Relational operators 12  
5. Dynamic storage allocation 13  
6. Assigning storage at Procedure level 13
  6.1 General layout of core 16   
7. Own variables and arrays 17 
8. Procedure calls 17 
  8.1 Procedure calling sequence 17 
  8.2 Procedure entry and exit 18 
  8.3 Simple procedures 18 
9. Nested procedures 19
10. Call by name 20
11. Other parameters 21
12. Relocator statistics 22
  12.1 Table of use of entries 22
  12.2 Comments on relationship with CCU11 30