
          Source file: test5     compiled on 10-JUN-81 at 19.04.00
          Object file: TEST5.EXE

                   Edinburgh IMP77 Compiler - Version 8.1

               1  %include "edwin:specs.inc"
           &   1  { EDWIN routine specs added }                   %end %of %list
               2  %begin
               3     ! EDWIN test program 5
               4     ! A demonstration program for the EDWIN CATs driver.
               5  
               6     %const %integer GOOD=1, LOW=0
               7     %integer SYM,TYPE
               8  
               9     %routine BOX (%integer XL,YL,XR,YR)
              10        MOVE ABS (XL,YL)
              11        LINE REL (0,YR-YL)
              12        LINE REL (XR-XL,0)
              13        LINE REL (0,-(YR-YL))
              14        LINE REL (-(XR-XL),0)
              15     %end
              16  
              17     %routine PAGE 1
              18        NEWFRAME
              19        MOVE ABS (12,21)
              20        TEXT ("This introduces a new version of")
              21        MOVE ABS (10,6)
              22        SET CHAR QUALITY (GOOD)
              23        TEXT ("EDWIN")
              24        MOVE ABS (41,4)
              25        SET CHAR QUALITY (LOW)
              26        TEXT ("for the ")
              27        TEXT ("Visual 200") %if TYPE=200
              28        TEXT ("Bantam 550") %if TYPE=550
              29        TEXT (" terminals")
              30        BOX (5,3,74,22)
              31        MOVE ABS (0,1)
              32        UPDATE
              33     %end
              34  
              35     %routine PAGE2
              36        %routine CROSS
              37           LINE REL (20,20)
              38           MOVE REL (-20,0)
              39           LINE REL (20,-20)
              40        %end
              41  
              42        NEW FRAME
              43        MOVE ABS (0,2)
              44        CROSS
              45        MOVE ABS (55,2)
              46        CROSS
              47        MOVE ABS (31,12)
              48        TEXT ("When things go wrong")
              49        MOVE ABS (32,10)
              50        TEXT ("Don't get cross!!")
              51        UPDATE
              52     %end
              53  
              54     Prompt ("Terminal type: ")
              55     Read (TYPE)
              56     Initialise for (TYPE)
              57     Aspect ratioing (0); ! Off
              58     Window (0, 79, 0, 23)
              59  
              60     Print string ("Enter line style required as a number between 0 and 4")
              61     Newline
              62     Prompt ("Number: ")
              63     Read (SYM) %until 0<=SYM<=7
              64     Set line style (SYM)
              65     Read symbol (SYM) %until SYM=NL
              66  
              67     Prompt ("Hit RETURN key")
              68  
              69     Page1
              70     Read symbol (SYM) %until SYM = NL
              71     Page2
              72  
              73     Terminate edwin
              74  %end %of %program
