(* INITIAL MENU PROGRAM *)›(* AS OF 09/08/89       *)›(*$S+*)›PROGRAM INIT;›CONST CLEAR=125; CURSOR=752;›      ON=0; OFF=1;›      RAMTOP=$6A;›      LASTFILE=$1D82;›      DEFAULT_DRV=$1D94;›VAR BASENAME:STRING[11];›    PGMNAME:STRING[30];›    DATA:STRING[128];›    I,J:INTEGER;›    REPLY,DRIVENO:CHAR;›    DRIVE:STRING[3];››PROCEDURE PRESSANY;›BEGIN  ›    WRITELN;›    WRITE('Ðòåóó áîù ëåù ôï ãïîôéîõå');›    READ(REPLY)›  END;›    ›BEGIN (*MAIN*)› DRIVENO:=PEEK(DEFAULT_DRV);› DRIVE:=CONCAT('D',DRIVENO,':');› GRAPHICS(0);› POKE(CURSOR,OFF);› WRITE(CHR(CLEAR));› GOTOXY(2,0);› WRITELN('           DRAPER PASCAL');› WRITELN;› WRITELN('            VERSION 2.1');› WRITELN;› WRITELN('        1 - Run Program');› WRITELN;› WRITELN('        2 - Disk Directory');› WRITELN;› WRITELN('        3 - Compile Program');› WRITELN;› WRITELN('        4 - Edit a Program');› WRITELN;› WRITELN('        5 - Exit to DOS');› WRITELN;› WRITELN('        6 - List a file');› WRITELN;› WRITELN('        7 - Trace on');› GOTOXY(2,22);› WRITELN('          Copyright 1989');› WRITE('          by Norm Draper');› GOTOXY(2,18);› REPEAT READ(REPLY)› UNTIL (REPLY>'0') AND (REPLY<'8');› CASE REPLY OF›  '1': BEGIN (* Run Program *)›    REPEAT›      WRITELN('  Enter name of program to be run');›      WRITELN;›      POKE(CURSOR,ON);›      J:=ADDR(PGMNAME);›      FOR I:=0 TO 16 DO›        POKE(J+I,PEEK(LASTFILE+I));›      WRITE('        ');›      WRITELN(PGMNAME);›      WRITE('        ',CHR(28));›      READLN(BASENAME);›      J:=ADDR(BASENAME);›      FOR I:=0 TO 16 DO›        POKE(LASTFILE+I,PEEK(J+I));›      I:=POS('.',BASENAME);›      IF I<>0 THEN›        BEGIN›          J:=LENGTH(BASENAME);›          DELETE(BASENAME,I,J-I+1);›          WRITELN;›          WRITELN('Suffix not required, ignored');›          WRITELN›        END;›      IF POS(':',BASENAME)=0 THEN›        INSERT(DRIVE,BASENAME,1);›      PGMNAME:=CONCAT(BASENAME,'.PCD');   ›      OPTIONS(0);›      OPEN(#4,4,0,PGMNAME);›      I:=IORESULT;›      CLOSE(#4);›      IF I=170 THEN›        WRITELN('Ðòïçòáí îïô æïõîä');›      OPTIONS(1)›    UNTIL I=0;›    WRITE(CHR(CLEAR));›    XCTL(PGMNAME) END;›  '2': BEGIN (* Disk Directory *)›    CLOSE(#1);›    POKE(CURSOR,ON);›    WRITE('Filespec? ');›    READLN(DATA);›    POKE(CURSOR,OFF);›    IF DATA='' THEN›      DATA:=CONCAT(DRIVE,'*.*');›    IF POS(':',DATA)=0 THEN›      INSERT(DRIVE,DATA,1);›    IF POS(':',DATA)=LENGTH(DATA) THEN›      INSERT('*.*',DATA,LENGTH(DATA)+1);›    OPEN(#1,6,0,DATA);›    READLN(#1,PGMNAME);›    WRITE(CHR(CLEAR));›    WHILE NOT EOF(#1) DO›      BEGIN WRITELN(PGMNAME);›      READLN(#1,PGMNAME) END;›    CLOSE(#1);›    PRESSANY;›    PGMNAME:=CONCAT(DRIVE,'INIT.PCD');›    XCTL(PGMNAME) END;›  '3': BEGIN (* Compile Program *)›        MAXGRAPH(0);›        WRITELN('Loading Compiler...');›        POKE(CURSOR,ON);›        PGMNAME:=CONCAT(DRIVE,'COMPILER.PCD');›        XCTL(PGMNAME)›       END;›  '4': BEGIN (* Edit a Program *)›        MAXGRAPH(0);›        WRITELN('Loading Editor...');›        PGMNAME:=CONCAT(DRIVE,'EDITOR.PCD');›        XCTL(PGMNAME)›       END;›  '5': BEGIN (* Exit to DOS *)›        POKE(CURSOR,ON);›        DOS›       END;›  '6': BEGIN (* List a file *)›    WRITELN('Enter filename of file to be listed');›    POKE(CURSOR,ON);›    WRITELN;›    READLN(PGMNAME);›    POKE(CURSOR,OFF);›    IF POS(':',PGMNAME)=0 THEN›      INSERT(DRIVE,PGMNAME,1);›    CLOSE(#1);›    OPEN(#1,4,0,PGMNAME);›    READLN(#1,DATA);›    WRITE(CHR(CLEAR));›    WHILE NOT EOF(#1) DO›      BEGIN WRITELN(DATA);›      READLN(#1,DATA) END;›    CLOSE(#1);›    PRESSANY;›    PGMNAME:=CONCAT(DRIVE,'INIT.PCD');›    XCTL(PGMNAME) END;›  '7': BEGIN (* Trace on *)›    POKE(CURSOR,ON);›    WRITELN('Enter number of entries to maintain: ');›    READ(I);›    TRACEON(I);›    PGMNAME:=CONCAT(DRIVE,'INIT.PCD');›    XCTL(PGMNAME) END› END›END.›