
     1  %begin
     2  
503 @ 4405:         LINE   1 "regression-compile-tmp/array2d.imp"
504 @ 4443:         BEGIN  _lev0id0 {lev=0 --> 1}

     3    %routine printarray(%integerarray(2)%name A, %integer a0low, a0high, a1low, a1high)
505 @ 4444:            LINE   3 "regression-compile-tmp/array2d.imp"
506 @ 4482:            DEF    PRINTARRAY (_lev0id0_PRINTARRAY) p1=V_0081 a/tf=7 b/format=0 c/ostate=0  type=0 (<type:0>) form=7 (routine) special=0 (<special:0>) linkage=0 (auto) spec=0 indirect=0 unass=0
507 @ 4504:               START  ( FORMAL PARAMETERS  {lev=2 --> 3, nested=0 --> 1}
508 @ 4505:                  DEF    A p1=V_0082 a/tf=1c b/format=1 c/ostate=240  type=1 (integer) form=12 (<form:12>) special=0 (<special:0>) linkage=0 (auto) spec=0 indirect=0 unass=0
509 @ 4518:                  DEF    A0LOW p1=V_0083 a/tf=11 b/format=1 c/ostate=0  type=1 (integer) form=1 (simple) special=0 (<special:0>) linkage=0 (auto) spec=0 indirect=0 unass=0
510 @ 4535:                  DEF    A0HIGH p1=V_0084 a/tf=11 b/format=1 c/ostate=0  type=1 (integer) form=1 (simple) special=0 (<special:0>) linkage=0 (auto) spec=0 indirect=0 unass=0
511 @ 4553:                  DEF    A1LOW p1=V_0085 a/tf=11 b/format=1 c/ostate=0  type=1 (integer) form=1 (simple) special=0 (<special:0>) linkage=0 (auto) spec=0 indirect=0 unass=0
512 @ 4570:                  DEF    A1HIGH p1=V_0086 a/tf=11 b/format=1 c/ostate=0  type=1 (integer) form=1 (simple) special=0 (<special:0>) linkage=0 (auto) spec=0 indirect=0 unass=0
513 @ 4588:               FINISH ) {lev=2}

     4      %integer A0, A1
     5      ! Imp needs some perm code to determine upper and lower bounds of arrays
514 @ 4589:               LINE   4 "regression-compile-tmp/array2d.imp"
515 @ 4627:               DEF    A0 p1=V_0087 a/tf=11 b/format=1 c/ostate=0  type=1 (integer) form=1 (simple) special=0 (<special:0>) linkage=0 (auto) spec=0 indirect=0 unass=0
516 @ 4641:               DEF    A1 p1=V_0088 a/tf=11 b/format=1 c/ostate=0  type=1 (integer) form=1 (simple) special=0 (<special:0>) linkage=0 (auto) spec=0 indirect=0 unass=0

     6      %for A0 = a0low, 1, a0high %cycle
517 @ 4655:               LINE   6 "regression-compile-tmp/array2d.imp"
518 @ 4693:               PUSH   A0
519 @ 4696:               PUSHI  #0x00000001
520 @ 4701:               PUSH   A0HIGH
521 @ 4704:               PUSH   A0LOW
522 @ 4707:               FOR    L_0003

     7        %for A1 = a1low, 1, a1high %cycle
523 @ 4710:               LINE   7 "regression-compile-tmp/array2d.imp"
524 @ 4748:               PUSH   A1
525 @ 4751:               PUSHI  #0x00000001
526 @ 4756:               PUSH   A1HIGH
527 @ 4759:               PUSH   A1LOW
528 @ 4762:               FOR    L_0006

     8          write(A(A0, A1), 3); print string(", ")
529 @ 4765:               LINE   8 "regression-compile-tmp/array2d.imp"
530 @ 4803:               PUSH   WRITE
531 @ 4806:               PUSH   A
532 @ 4809:               PUSH   A0
533 @ 4812:               INDEX 
534 @ 4813:               PUSH   A1
535 @ 4816:               ACCESS
536 @ 4817:               ASSPAR
537 @ 4818:               PUSHI  #0x00000003
538 @ 4823:               ASSPAR
539 @ 4824:               CALL  
540 @ 4825:               LINE   8 "regression-compile-tmp/array2d.imp"
541 @ 4863:               PUSH   PRINTSTRING
542 @ 4866:               PUSHS  ", "
543 @ 4870:               ASSPAR
544 @ 4871:               CALL  

     9        %repeat
545 @ 4872:               LINE   9 "regression-compile-tmp/array2d.imp"
546 @ 4910:               REPEAT L_0006
547 @ 4913:               LOCATE L_0007

    10        newline
548 @ 4916:               LINE   10 "regression-compile-tmp/array2d.imp"
549 @ 4954:               PUSH   NEWLINE
550 @ 4957:               CALL  

    11      %repeat
551 @ 4958:               LINE   11 "regression-compile-tmp/array2d.imp"
552 @ 4996:               REPEAT L_0003
553 @ 4999:               LOCATE L_0004

    12      newline
554 @ 5002:               LINE   12 "regression-compile-tmp/array2d.imp"
555 @ 5040:               PUSH   NEWLINE
556 @ 5043:               CALL  

    13    %end
    14  
557 @ 5044:               LINE   13 "regression-compile-tmp/array2d.imp"
558 @ 5082:            END    _lev0id0_PRINTARRAY {lev=2 --> 1}

    15    %integername element
559 @ 5083:            LINE   15 "regression-compile-tmp/array2d.imp"
560 @ 5121:            DEF    ELEMENT p1=V_0082 a/tf=12 b/format=1 c/ostate=0  type=1 (integer) form=2 (name) special=0 (<special:0>) linkage=0 (auto) spec=0 indirect=0 unass=0

    16    %integer i
    17  
    18    ! imp77 doesn't allow initialised multi-dimensional arrays.  (Imp80 would!)
    19    ! So I'll initialise these explicitly:
561 @ 5140:            LINE   16 "regression-compile-tmp/array2d.imp"
562 @ 5178:            DEF    I p1=V_0083 a/tf=11 b/format=1 c/ostate=0  type=1 (integer) form=1 (simple) special=0 (<special:0>) linkage=0 (auto) spec=0 indirect=0 unass=0

    20    %integerarray fred(0:1, 0:2)       { simple case }
563 @ 5191:            LINE   20 "regression-compile-tmp/array2d.imp"
564 @ 5229:            DEF    FRED p1=V_0084 a/tf=1b b/format=1 c/ostate=100  type=1 (integer) form=11 (array) special=0 (<special:0>) linkage=0 (auto) spec=0 indirect=0 unass=0
565 @ 5245:            PUSHI  #0x00000000
566 @ 5250:            PUSHI  #0x00000001
567 @ 5255:            PUSHI  #0x00000000
568 @ 5260:            PUSHI  #0x00000002
569 @ 5265:            DIM    0002 0001

    21    %integerarray jim(11:13, 100:103)  { non-zero lower bounds }
570 @ 5271:            LINE   21 "regression-compile-tmp/array2d.imp"
571 @ 5309:            DEF    JIM p1=V_0085 a/tf=1b b/format=1 c/ostate=100  type=1 (integer) form=11 (array) special=0 (<special:0>) linkage=0 (auto) spec=0 indirect=0 unass=0
572 @ 5324:            PUSHI  #0x0000000b
573 @ 5329:            PUSHI  #0x0000000d
574 @ 5334:            PUSHI  #0x00000064
575 @ 5339:            PUSHI  #0x00000067
576 @ 5344:            DIM    0002 0001

    22    element == fred(0,0); element = i %and element == element++1 %for i = 0, 1, 5
577 @ 5350:            LINE   22 "regression-compile-tmp/array2d.imp"
578 @ 5388:            PUSH   ELEMENT
579 @ 5391:            PUSH   FRED
580 @ 5394:            PUSHI  #0x00000000
581 @ 5399:            INDEX 
582 @ 5400:            PUSHI  #0x00000000
583 @ 5405:            ACCESS
584 @ 5406:            ASSREF
585 @ 5407:            LINE   22 "regression-compile-tmp/array2d.imp"
586 @ 5445:            PUSH   I
587 @ 5448:            PUSHI  #0x00000001
588 @ 5453:            PUSHI  #0x00000005
589 @ 5458:            PUSHI  #0x00000000
590 @ 5463:            FOR    L_0003
591 @ 5466:            PUSH   ELEMENT
592 @ 5469:            PUSH   I
593 @ 5472:            ASSVAL
594 @ 5473:            PUSH   ELEMENT
595 @ 5476:            PUSH   ELEMENT
596 @ 5479:            PUSHI  #0x00000001
597 @ 5484:            ADDA  
598 @ 5485:            ASSREF
599 @ 5486:            REPEAT L_0003
600 @ 5489:            LOCATE L_0004

    23    element == jim(11,100); element = i %and element == element++1 %for i = 0, 1, 11
    24  
601 @ 5492:            LINE   23 "regression-compile-tmp/array2d.imp"
602 @ 5530:            PUSH   ELEMENT
603 @ 5533:            PUSH   JIM
604 @ 5536:            PUSHI  #0x0000000b
605 @ 5541:            INDEX 
606 @ 5542:            PUSHI  #0x00000064
607 @ 5547:            ACCESS
608 @ 5548:            ASSREF
609 @ 5549:            LINE   23 "regression-compile-tmp/array2d.imp"
610 @ 5587:            PUSH   I
611 @ 5590:            PUSHI  #0x00000001
612 @ 5595:            PUSHI  #0x0000000b
613 @ 5600:            PUSHI  #0x00000000
614 @ 5605:            FOR    L_0003
615 @ 5608:            PUSH   ELEMENT
616 @ 5611:            PUSH   I
617 @ 5614:            ASSVAL
618 @ 5615:            PUSH   ELEMENT
619 @ 5618:            PUSH   ELEMENT
620 @ 5621:            PUSHI  #0x00000001
621 @ 5626:            ADDA  
622 @ 5627:            ASSREF
623 @ 5628:            REPEAT L_0003
624 @ 5631:            LOCATE L_0004

    25    printarray(fred, 0,1, 0,2)
625 @ 5634:            LINE   25 "regression-compile-tmp/array2d.imp"
626 @ 5672:            PUSH   PRINTARRAY
627 @ 5675:            PUSH   FRED
628 @ 5678:            ASSPAR
629 @ 5679:            PUSHI  #0x00000000
630 @ 5684:            ASSPAR
631 @ 5685:            PUSHI  #0x00000001
632 @ 5690:            ASSPAR
633 @ 5691:            PUSHI  #0x00000000
634 @ 5696:            ASSPAR
635 @ 5697:            PUSHI  #0x00000002
636 @ 5702:            ASSPAR
637 @ 5703:            CALL  

    26    printarray(jim, 11,13, 100,103)
    27    
638 @ 5704:            LINE   26 "regression-compile-tmp/array2d.imp"
639 @ 5742:            PUSH   PRINTARRAY
640 @ 5745:            PUSH   JIM
641 @ 5748:            ASSPAR
642 @ 5749:            PUSHI  #0x0000000b
643 @ 5754:            ASSPAR
644 @ 5755:            PUSHI  #0x0000000d
645 @ 5760:            ASSPAR
646 @ 5761:            PUSHI  #0x00000064
647 @ 5766:            ASSPAR
648 @ 5767:            PUSHI  #0x00000067
649 @ 5772:            ASSPAR
650 @ 5773:            CALL  

    28  %endofprogram
651 @ 5774:            LINE   28 "regression-compile-tmp/array2d.imp"
652 @ 5812:         END    _lev0id0 {lev=1 --> 0}
653 @ 5813:         END     {lev=0 --> -1}
654 @ 5814: 

