begin
  
  integer first subscript, second subscript
  integername element
  integer i

  ! imp77 doesn't allow initialised multi-dimensional arrays.  (Imp80 would!)
  ! So I'll initialise these explicitly:
  integerarray A(1:3, 1:2)


  { EMAS IMP80 and IMP77: in a two-dimensional array whose first element was (1,1), }
  { the order would be (1,1), (2,1), (3,1), i.e. first subscript changing fastest.  }
  element == A(1,1); element = i and element == INTEGER(ADDR(element)+4) for i = 1, 1, 3*2
  
  for second subscript = 1,1,2 cycle
    for first subscript = 1,1,3 cycle
      print string("A("); write(first subscript, -1)
      print string(", "); write(second subscript, -1)
      print string(") = "); write(A(first subscript, second subscript), -1)
      print string(",   ")
    repeat
    newline
  repeat
  newline
  
endofprogram