DataMuseum.dk

Presents historical artifacts from the history of:

CP/M

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about CP/M

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦7cbbfcbbe⟧ TextFile

    Length: 23680 (0x5c80)
    Types: TextFile
    Names: »CFIGIF.PAS«

Derivation

└─⟦1a1ae220f⟧ Bits:30004190 COMPAS Pascal v.2.2
    └─ ⟦this⟧ »CFIGIF.PAS« 
└─⟦693a7a378⟧ Bits:30003305 COMPAS, RcTekst, RcKalk, RCComal80 til RC703
    └─ ⟦this⟧ »CFIGIF.PAS« 
└─⟦6bdda2365⟧ Bits:30005253 COMPAS Pascal v2.21 til CR7
    └─ ⟦this⟧ »CFIGIF.PAS« 
└─⟦856c4d8a3⟧ Bits:30003073 SW1729 COMPAS Pascal v2.20 installationsdiskette til Piccolo
    └─ ⟦this⟧ »CFIGIF.PAS« 
└─⟦dea633962⟧ Bits:30003306 PROMbrænder software til RC703
    └─ ⟦this⟧ »CFIGIF.PAS« 
└─⟦f5abb7d57⟧ Bits:30005754 SW1329/D8 COMPAS Pascal v2.20 (RC703)
    └─ ⟦this⟧ »CFIGIF.PAS« 

TextFile

PROCEDURE CONFIGURE;
VAR
  CH: CHAR;

PROCEDURE CRT;
VAR
  CH: CHAR;

PROCEDURE EDITCRT;
CONST
  PA1: STR36 = 'A. Screen width (in characters)...: ';
  PB1: STR36 = 'B. Screen height (in lines).......: ';
  PC1: STR36 = 'C. Auto scroll (YES/NO)...........: ';
  PA2: STR36 = 'A. GOTOXY lead-in sequence........: ';
  PB2: STR36 = 'B. GOTOXY separator sequence......: ';
  PC2: STR36 = 'C. GOTOXY terminator sequence.....: ';
  PD2: STR36 = 'D. Line before column (YES/NO)....: ';
  PE2: STR36 = 'E. Coordinate offset..............: ';
  PF2: STR36 = 'F. Coordinate format (0/2/3)......: ';
  PA3: STR36 = 'A. CLREOS sequence................: ';
  PB3: STR36 = 'B. CLREOL sequence................: ';
  PC3: STR36 = 'C. Insert line sequence...........: ';
  PD3: STR36 = 'D. Delete line sequence...........: ';
  PE3: STR36 = 'E. Reverse ON sequence............: ';
  PF3: STR36 = 'F. Reverse OFF sequence...........: ';
VAR
  SEC: INTEGER;
  CH,MC,FIRST,LAST: CHAR;

PROCEDURE HELPS;
BEGIN
  WRITELN('Character sequences are entered as sequences of hex values be-');
  WRITELN('tween 00 and FF. Each hex value must be separated from the sur-');
  WRITELN('rounding ones by at least one blank. To enter an empty sequence');
  WRITELN('simply enter a blank line.');
  WRITELN;
END;

PROCEDURE HELP1;
BEGIN
  WRITELN('SCREEN WIDTH. This field defines the number of characters per');
  WRITELN('line on your video display. Always specify the exact value.');
  WRITELN;
  WRITELN('SCREEN HEIGHT. This field defines the number of lines per screen');
  WRITELN('on your video display. Always specify the exact value.');
  WRITELN;
  WRITELN('AUTO SCROLL. If your video display scrolls automatically when');
  WRITELN('a character is written to rightmost character position on the');
  WRITELN('bottom line, then this field should be set to YES. Otherwise');
  WRITELN('it should be set to NO.');
  WRITELN;
  PRESSRETURN;
END;

PROCEDURE HELP2;
BEGIN
  HELPS;
  WRITELN('GOTOXY LEAD-IN SEQUENCE. The character sequence sent prior to');
  WRITELN('the coordinates. The maximum length is 8.');
  WRITELN;
  WRITELN('GOTOXY SEPARATOR SEQUENCE. The character sequence sent between');
  WRITELN('the coordinates. The maximum length is 4.');
  WRITELN;
  WRITELN('GOTOXY TERMINATOR SEQUENCE. The character sequence sent after');
  WRITELN('the coordinates. The maximum length is 4.');
  WRITELN;
  PRESSRETURN;
  WRITELN('LINE BEFORE COLUMN. This field should be set to YES if your');
  WRITELN('video display requires the line coordinate (Y) to be sent');
  WRITELN('before the column coordinate (X). Otherwise it should be set');
  WRITELN('to NO.');
  WRITELN;
  WRITELN('COORDINATE OFFSET. This field defines the value (in decimal)');
  WRITELN('to be added to the coordinates before they are transmitted.');
  WRITELN('If the coordinate format (see below) is 0, then 32 is normally');
  WRITELN('used. If the coordinate format is 2 or 3, then 0 or 1 is nor-');
  WRITELN('mally used.');
  WRITELN;
  PRESSRETURN;
  WRITELN('COORDINATE FORMAT. A value of 0 in this field indicates that');
  WRITELN('the coordinates are to be transmitted as single bytes using');
  WRITELN('binary format. Other values (2 or 3) indicate that the coor-');
  WRITELN('dinates are to be transmitted as decimal character strings of');
  WRITELN('2 or 3 characters.');
  WRITELN;
  PRESSRETURN;
END;

PROCEDURE HELP3;
BEGIN
  HELPS;
  WRITELN('CLREOS SEQUENCE. The function sequence which clears all charac-');
  WRITELN('ter positions from the cursor to the end of the screen. The');
  WRITELN('maximum length is 8.');
  WRITELN;
  WRITELN('CLREOL SEQUENCE. The function sequence which clears all charac-');
  WRITELN('ter positions from the cursor to the end of the current line.');
  WRITELN('The maximum length is 8.');
  WRITELN;
  PRESSRETURN;
  WRITELN('INSERT LINE SEQUENCE. The function sequence which scrolls the');
  WRITELN('current line, and all lines below it, down, and clears the');
  WRITELN('current line. This function is optional. If it is specified,');
  WRITELN('the editor will use it when scrolling down. The maximum length');
  WRITELN('is 8.');
  WRITELN;
  WRITELN('DELETE LINE SEQUENCE. The function sequence which deletes the');
  WRITELN('current line, and scrolls up all lines below it, with a blank');
  WRITELN('line appearing at the bottom. This function is optional. If it');
  WRITELN('is specified, the editor will use it when scrolling up, thus');
  WRITELN('preserving the status line on top of the display. The maximum');
  WRITELN('length is 8.');
  WRITELN;
  PRESSRETURN;
  WRITELN('REVERSE ON SEQUENCE. The function sequence which turns on');
  WRITELN('reverse video (or increased intensity). This function is optio-');
  WRITELN('nal. If it is specified, the editor will use it to highlight');
  WRITELN('the status line. The maximum length is 8.');
  WRITELN;
  WRITELN('REVERSE OFF SEQUENCE. The function sequence which turns off');
  WRITELN('the attribute activated by the sequence above. The maximum');
  WRITELN('length is 8.');
  WRITELN;
  PRESSRETURN;
END;

BEGIN æEDITCRTå
  SEC:=1;
  WITH DATA DO
  REPEAT
    WRITELN('CRT CONFIGURATION TABLE (SECTION ',SEC,'):');
    WRITELN;
    CASE SEC OF
      1: BEGIN
	   WRITELN(PA1,WIDTH);
	   WRITELN(PB1,HEIGHT);
	   WRITELN(PC1,YESNO(SCROLLF));
	 END;
      2: BEGIN
	   WRITELN(PA2,HEXSEQ(GXYLS));
	   WRITELN(PB2,HEXSEQ(GXYSS));
	   WRITELN(PC2,HEXSEQ(GXYTS));
	   WRITELN(PD2,YESNO(LINB4COL));
	   WRITELN(PE2,COOROFS);
	   WRITELN(PF2,COORFMT);
	 END;
      3: BEGIN
	   WRITELN(PA3,HEXSEQ(CESS));
	   WRITELN(PB3,HEXSEQ(CELS));
	   WRITELN(PC3,HEXSEQ(ILNS));
	   WRITELN(PD3,HEXSEQ(DLNS));
	   WRITELN(PE3,HEXSEQ(RONS));
	   WRITELN(PF3,HEXSEQ(ROFS));
	 END;
    END;
    WRITELN;
    IF (SEC>=2) AND ((GXYR<>0) OR (CESR<>0) OR (CELR<>0)) THEN
    BEGIN
      WRITE('User written drivers for: ');
      IF GXYR<>0 THEN WRITE('GOTOXY ');
      IF CESR<>0 THEN WRITE('CLREOS ');
      IF CELR<>0 THEN WRITE('CLREOL');
      WRITELN; WRITELN;
    END;
    WRITELN('Press RETURN to view more');
    WRITELN;
    IF SEC=1 THEN MC:='C' ELSE MC:='F';
    CH:=SELECT('Edit(A-'+MC+'), All(Z), Exit(X), Help(Y)',
    	       Æ'A'..MC,'Z','X','Y',^MÅ);
    IF CH=^M THEN
    BEGIN
      IF SEC=3 THEN SEC:=1 ELSE SEC:=SEC+1;
    END ELSE
    BEGIN
      IF CH='Z' THEN
      BEGIN
        FIRST:='A'; LAST:=MC;
      END ELSE
      BEGIN
        FIRST:=CH; LAST:=CH;
      END;
      FOR CH:=FIRST TO LAST DO
      CASE SEC OF
	1: CASE CH OF
	     'A': BEGIN
		    WRITE(PA1); WIDTH:=READNUM(40,255);
		  END;
	     'B': BEGIN
		    WRITE(PB1); HEIGHT:=READNUM(8,255);
		  END;
	     'C': BEGIN
		    WRITE(PC1); SCROLLF:=READYN;
		  END;
	     'Y': HELP1;
	   END;
	2: CASE CH OF
	     'A': BEGIN
		    WRITE(PA2); GXYLS:=READSEQ(8);
		  END;
	     'B': BEGIN
		    WRITE(PB2); GXYSS:=READSEQ(4);
		  END;
	     'C': BEGIN
		    WRITE(PC2); GXYTS:=READSEQ(4);
		  END;
	     'D': BEGIN
		    WRITE(PD2); LINB4COL:=READYN;
		  END;
	     'E': BEGIN
		    WRITE(PE2); COOROFS:=READNUM(0,255);
		  END;
	     'F': BEGIN
		    WRITE(PF2); COORFMT:=READNUM(0,3);
		  END;
	     'Y': HELP2;
	   END;
	3: CASE CH OF
	     'A': BEGIN
		    WRITE(PA3); CESS:=READSEQ(8);
		  END;
	     'B': BEGIN
		    WRITE(PB3); CELS:=READSEQ(8);
		  END;
	     'C': BEGIN
		    WRITE(PC3); ILNS:=READSEQ(8);
		  END;
	     'D': BEGIN
		    WRITE(PD3); DLNS:=READSEQ(8);
		  END;
	     'E': BEGIN
		    WRITE(PE3); RONS:=READSEQ(8);
		  END;
	     'F': BEGIN
		    WRITE(PF3); ROFS:=READSEQ(8);
		  END;
	     'Y': HELP3;
	   END;
      END;
      IF CH IN Æ'A'..MCÅ THEN WRITELN;
    END;
  UNTIL CH='X';
END;

PROCEDURE EDITUWD;
VAR
  CH: CHAR;

FUNCTION VECTOR(A: INTEGER): STR12;
BEGIN
  IF A=0 THEN VECTOR:='Unconfigured' ELSE VECTOR:=HEX(A,4);
END;

FUNCTION READVECT(OKZERO: BOOLEAN): INTEGER;
VAR
  V,E: INTEGER;
  S: STR4;
BEGIN
  REPEAT
    BUFLEN:=4; READ(S);
    IF (S='') AND OKZERO THEN
    BEGIN
      V:=0; E:=0;
    END ELSE
    BEGIN
      VAL('$'+S,V,E);
      IF E=0 THEN IF (V<$140) OR (V>$1BF) THEN E:=1;
      IF E>0 THEN BACKSP(LEN(S));
    END;
  UNTIL E=0;
  WRITELN; READVECT:=V;
END;

PROCEDURE EDITPATCH;
VAR
  CH: CHAR;
  I,J: INTEGER;

PROCEDURE MODIFYDATA;
VAR
  AD,D,E: INTEGER;
  S: STR4;
BEGIN
  WRITE('Start address: '); AD:=READVECT(FALSE)-$140; WRITELN;
  WITH DATA DO
  REPEAT
    WRITE(HEX(AD+$140,4),HEX(PATCHÆADÅ,2):3,': ');
    REPEAT
      BUFLEN:=2; READ(S);
      IF (S<>'') AND (S<>'.') THEN
      BEGIN
	VAL('$'+S,D,E);
	IF E>0 THEN BACKSP(LEN(S)) ELSE PATCHÆADÅ:=D;
      END ELSE E:=0;
    UNTIL E=0;
    WRITELN; AD:=AD+1;
  UNTIL (S='.') OR (AD=128);
  WRITELN;
END;

PROCEDURE HELP;
BEGIN
  WRITELN('The user patch area is 128 bytes long and starts in memory at');
  WRITELN('address 140H. The patch area may actually be used to store');
  WRITELN('anything, but normally it is used to install user written');
  WRITELN('drivers for terminals which does not support one or more of');
  WRITELN('the GOTOXY, CLREOS, and CLREOL functions.');
  WRITELN;
  WRITELN('When you select the M (modify) function from the menu, you');
  WRITELN('must first specify the start address (in hex). This address');
  WRITELN('must of course be an address within the patch area, i.e. an');
  WRITELN('address between 140H and 1BFH. You are then allowed to view');
  WRITELN('and/or modify one byte at a time. To leave a byte unchanged,');
  WRITELN('just enter a blank line. To change it to a new value, enter');
  WRITELN('the value in hex. To end, enter a period.');
  WRITELN;
  PRESSRETURN;
END;

BEGIN æEDITPATCHå
  WITH DATA DO
  REPEAT
    WRITELN('CONTENTS OF USER PATCH AREA:');
    WRITELN;
    FOR I:=0 TO 7 DO
    BEGIN
      WRITE(HEX(I*16+$140,4),' ');
      FOR J:=0 TO 15 DO WRITE(HEX(PATCHÆI*16+JÅ,2):3);
      WRITELN;
    END;
    WRITELN;
    CH:=SELECT('Modify(M), Exit(X), Help(Y)',Æ'M','X','Y'Å);
    CASE CH OF
      'M': MODIFYDATA;
      'Y': HELP;
    END;
  UNTIL CH='X';
END;

PROCEDURE EDITADDRS;
CONST
  PA: STR36 = 'A. GOTOXY driver address..........: ';
  PB: STR36 = 'B. CLREOS driver address..........: ';
  PC: STR36 = 'C. CLREOL driver address..........: ';
VAR
  CH: CHAR;

PROCEDURE HELP;
BEGIN
  WRITELN('The user driver addresses define the entry addresses of the');
  WRITELN('user written terminal drivers within the user patch area. When');
  WRITELN('a driver address is defined (i.e. when the address is not in');
  WRITELN('its "unconfigured" state), it automatically overrides the cor-');
  WRITELN('responding fields in the configuration table.');
  WRITELN;
  WRITELN('Before defining a driver address, you should install the driver');
  WRITELN('in the user patch area (to do that, quit this menu, and use');
  WRITELN('function 1 in the next menu).');
  WRITELN;
  WRITELN('To activate a driver, simply enter the address (in hex) of the');
  WRITELN('driver. To deactivate it again, enter a blank line instead of');
  WRITELN('an address.');
  WRITELN;
  PRESSRETURN;
END;

BEGIN æEDITADDRSå
  WITH DATA DO
  REPEAT
    WRITELN('USER WRITTEN DRIVER ADDRESSES:');
    WRITELN;
    WRITELN(PA,VECTOR(GXYR));
    WRITELN(PB,VECTOR(CESR));
    WRITELN(PC,VECTOR(CELR));
    WRITELN;
    CH:=SELECT('Edit(A-C), Exit(X), Help(Y)',Æ'A'..'C','X','Y'Å);
    CASE CH OF
      'A': BEGIN
	     WRITE(PA); GXYR:=READVECT(TRUE); WRITELN;
	   END;
      'B': BEGIN
	     WRITE(PB); CESR:=READVECT(TRUE); WRITELN;
	   END;
      'C': BEGIN
	     WRITE(PC); CELR:=READVECT(TRUE); WRITELN;
	   END;
      'Y': HELP;
    END;
  UNTIL CH='X';
END;

PROCEDURE HELP;
BEGIN
  WRITELN('On some terminals, one or more of the functions GOTOXY, CLREOS,');
  WRITELN('and CLREOL are not available, and in such cases, these functions');
  WRITELN('must be supplied through user written drivers.');
  WRITELN;
  WRITELN('For the purpose of implementing user written drivers, COMPAS');
  WRITELN('provides a user patch area of 128 bytes, which is not otherwise');
  WRITELN('used by the system. The drivers must be in Z-80 machine code,');
  WRITELN('and to install them, you may use function 1 on the menu.');
  WRITELN;
  WRITELN('If a driver is installed for one of the functions, it automati-');
  WRITELN('cally overrides the data given in the configuration table for');
  WRITELN('that specific function (i.e. the contents of those fields will');
  WRITELN('then be of no importance).');
  WRITELN;
  PRESSRETURN;
  WRITELN('It is important that all user written drivers return with the');
  WRITELN('carry flag set (use an SCF instruction immediately before RET).');
  WRITELN('The routines must preserve registers BC, DE, HL, and IX. The');
  WRITELN('X and Y coordinates are passed to the GOTOXY routine using the');
  WRITELN('E and D registers respectively. The upper left corner corres-');
  WRITELN('ponds to (E,D)=(0,0).');
  WRITELN;
  WRITELN('Characters may be output to the console from within a driver by');
  WRITE('calling address ',HEX(B1Æ62Å+SWAP(B1Æ63Å),4));
  WRITELN('H. The character is passed in A, and the');
  WRITELN('routine preserves registers BC, DE, HL, and IX.');
  WRITELN;
  WRITELN('Once the code for a driver is installed, the corresponding jump');
  WRITELN('vector should be set to the start address using function 2 on');
  WRITELN('the menu.');
  WRITELN;
  PRESSRETURN;
END;

BEGIN æEDITUWDå
  WITH DATA DO
  REPEAT
    WRITELN('USER WRITTEN DRIVERS MENU:');
    WRITELN;
    WRITELN('1. Edit user patch area');
    WRITELN('2. Edit user driver addresses');
    WRITELN;
    CH:=SELECT('Function(1-2), Exit(X), Help(Y)',Æ'1'..'2','X','Y'Å);
    CASE CH OF
      '1': EDITPATCH;
      '2': EDITADDRS;
      'Y': HELP;
    END;
  UNTIL CH='X';
END;

PROCEDURE HELP;
BEGIN
  WRITELN('Through function 1 on this menu you may view and/or modify the');
  WRITELN('CRT configuration table. The CRT configuration table defines');
  WRITELN('various informations about your terminal, e.g. the number of');
  WRITELN('characters per line and the number of lines per screen. Fur-');
  WRITELN('thermore, it defines the control sequences used to move the');
  WRITELN('cursor, to clear to the end of a line, and to clear to the end');
  WRITELN('of the screen.');
  WRITELN;
  WRITELN('Some computers or terminals may not support some of the func-');
  WRITELN('tions required by COMPAS. In such cases, user written drivers');
  WRITELN('must be employed to perform those functions. User written dri-');
  WRITELN('vers are written in Z-80 machine code, and they may be instal-');
  WRITELN('led using function 2 on this menu.');
  WRITELN;
  PRESSRETURN;
END;

BEGIN æCRTå
  REPEAT
    WRITELN('CRT CONFIGURATION MENU:');
    WRITELN;
    WRITELN('1. Edit CRT configuration table');
    WRITELN('2. Edit user written drivers');
    WRITELN;
    CH:=SELECT('Function(1-2), Exit(X), Help(Y)',Æ'1'..'2','X','Y'Å);
    CASE CH OF
      '1': EDITCRT;
      '2': EDITUWD;
      'Y': HELP;
    END;
  UNTIL CH='X';
END;

PROCEDURE KEYBOARD;
CONST
  KEYNAME: ARRAYÆ1..24Å OF STRINGÆ7Å =
    ('MODE','TAB','BACKSP','RETURN','REMOVE','AUTO','HELP','LEFT',
    'RIGHT','UP','DOWN','PREV','NEXT','BEGIN','END','FIND','CONT',
    'REPLACE','RPLCON','MARK','ZAP','LIST','INSERT','QUIT');
VAR
  CKEY,I,J,M: INTEGER;
  CH,MC: CHAR;

PROCEDURE EDITKEY(K: INTEGER);
VAR
  I,L: INTEGER;
  CH: CHAR;
  OK: BOOLEAN;
  S: STR16;

PROCEDURE ERROR(S: STR24);
VAR
  CH: CHAR;
BEGIN
  WRITE(S,'. Press RETURN...');
  REPEAT READ(KBD,CH) UNTIL CH=^M;
  BACKSP(LEN(S)+17);
END;

BEGIN æEDITKEYå
  WITH DATA DO
  BEGIN
    WRITE('Press <',KEYNAMEÆKÅ,'> key twice');
    FOR I:=LEN(KEYNAMEÆKÅ) TO 10 DO WRITE('.');
    WRITE(': '); OK:=FALSE;
    REPEAT
      S:=''; L:=0;
      REPEAT
	READ(KBD,CH);
	IF (CH=' ') AND (L=0) THEN OK:=TRUE ELSE
	BEGIN
	  S:=S+CH; L:=L+1;
	  IF NOT ODD(L) THEN
	  OK:=COPY(S,1,L DIV 2)=COPY(S,L DIV 2+1,L DIV 2);
        END;
      UNTIL OK OR (L=16);
      IF NOT OK THEN ERROR('ERROR') ELSE
      IF S<>'' THEN
      BEGIN
	S:=COPY(S,1,L DIV 2);
	IF (K<=8) AND (SÆ1Å>=' ') AND (SÆ1Å<=@126) THEN
	BEGIN
	  ERROR('Invalid sequence'); OK:=FALSE;
	END ELSE
	BEGIN
	  FOR I:=1 TO 24 DO IF I<>K THEN
	  BEGIN
	    IF LEN(S)<LEN(KEYSÆ1,IÅ) THEN
	    L:=LEN(S) ELSE L:=LEN(KEYSÆ1,IÅ);
	    IF L<>0 THEN
	    IF COPY(S,1,L)=COPY(KEYSÆ1,IÅ,1,L) THEN OK:=FALSE;
	  END;
	  IF NOT OK THEN ERROR('Ambiguous sequence');
	END;
      END;
    UNTIL OK;
    KEYSÆ1,KÅ:=S; WRITELN(KEYSEQ(S));
    WRITE('Enter <',KEYNAMEÆKÅ,'> key label');
    FOR I:=LEN(KEYNAMEÆKÅ) TO 10 DO WRITE('.');
    WRITE(': '); BUFLEN:=8; READ(KEYSÆ2,KÅ);
    IF (KEYSÆ2,KÅ='') AND (S<>'') THEN
    BEGIN
      KEYSÆ2,KÅ:=COPY(KEYSEQ(S),1,8); WRITE(KEYSÆ2,KÅ);
    END;
    WRITELN;
  END;
  WRITELN;
END;

PROCEDURE HELP;
BEGIN
  WRITELN('The character sequence used to invoke an editor function may be');
  WRITELN('from 1 to 8 characters long. The first character of each of the');
  WRITELN('sequences associated with the <MODE>, <TAB>, <BACKSP>, <RETURN>,');
  WRITELN('<REMOVE>, <AUTO>, <LEFT>, and <RIGHT> functions must be a non-');
  WRITELN('printable character (if it were a printable character it would');
  WRITELN('then be impossible to enter that character in the EDIT mode).');
  WRITELN('If you try to redefine one of these functions to start with a');
  WRITELN('printable character, you will get an error message.');
  WRITELN;
  PRESSRETURN;
  WRITELN('To redefine a sequence you must enter the new sequence twice');
  WRITELN('(i.e. press the key, that produces the sequence, twice). If you');
  WRITELN('hit a wrong key one of the times, just keep on entering charac-');
  WRITELN('ters until you get an error message, and then try again. If the');
  WRITELN('first character entered in a sequence is a blank, that function');
  WRITELN('is set to an "undefined" state (i.e. it will be inaccessible).');
  WRITELN;
  WRITELN('When you modify a character sequence, the new sequence will');
  WRITELN('only be accepted if it is not ambiguous. If, for instance, one');
  WRITELN('or more sequences start with an ESC character, then a single');
  WRITELN('ESC character cannot be used.');
  WRITELN;
  PRESSRETURN;
  WRITELN('In addition to entering the sequence produced by a key you must');
  WRITELN('also enter the text written on the keytop, for instance RETURN,');
  WRITELN('BACK, BREAK, etc., or another descriptive string, for instance');
  WRITELN('CTRL/A for CONTROL and "A" simultaneously. These texts will be');
  WRITELN('displayed when you request help on editor commands using the');
  WRITELN('HELP command. If you enter a blank line, the text representation');
  WRITELN('of the sequence will be used. The string you enter must not be');
  WRITELN('longer than 8 characters.');
  WRITELN;
  PRESSRETURN;
END;

BEGIN æKEYBOARDå
  CKEY:=1;
  WITH DATA DO
  REPEAT
    WRITELN('KEYBOARD CONFIGURATION TABLE:');
    WRITELN;
    IF CKEY+9>24 THEN M:=24-CKEY ELSE M:=9;
    FOR I:=0 TO M DO
    BEGIN
      WRITE(CHR(I+65),'. <',KEYNAMEÆCKEY+IÅ,'>');
      FOR J:=LEN(KEYNAMEÆCKEY+IÅ) TO 10 DO WRITE('.'); WRITE(': ');
      WRITE(KEYSÆ2,CKEY+IÅ);
      IF KEYSÆ2,CKEY+IÅ<>KEYSEQ(KEYSÆ1,CKEY+IÅ) THEN
      WRITE('':10-LEN(KEYSÆ2,CKEY+IÅ),'(',KEYSEQ(KEYSÆ1,CKEY+IÅ),')');
      WRITELN;
    END;
    WRITELN;
    WRITELN('Press RETURN to view more');
    WRITELN;
    MC:=CHR(M+65);
    CH:=SELECT('Edit(A-'+MC+'), All(Z), Exit(X), Help(Y)',Æ'A'..'Z',^MÅ);
    CASE CH OF
      'A'..'J': BEGIN
		  EDITKEY(CKEY+ORD(CH)-65);
		END;
      'Z': BEGIN
	     FOR I:=1 TO 24 DO EDITKEY(I);
	   END;
      'Y': HELP;
      ^M: BEGIN
	    CKEY:=CKEY+10; IF CKEY>24 THEN CKEY:=1;
	  END;
    END;
  UNTIL CH='X';
END;

PROCEDURE MISC;
CONST
  PA: STR36 = 'A. Use BAK files (YES/NO).........: ';
  PB: STR36 = 'B. Auto-indent on (YES/NO)........: ';
  PC: STR36 = 'C. Keyboard delay.................: ';
  PD: STR36 = 'D. Configuration name.............: ';
VAR
  CH: CHAR;

PROCEDURE HELP;
BEGIN
  WRITELN('USE BAK FILES. This field must be either YES or NO. If it is');
  WRITELN('set to YES, duplicate files will have their type changed to');
  WRITELN('BAK when the SAVE command is used to save a file. Otherwise,');
  WRITELN('such files are simply deleted.');
  WRITELN;
  WRITELN('AUTO-INDENT ON. This field defines the initial state of the');
  WRITELN('auto-indent tabulator when COMPAS is cold-started. YES means');
  WRITELN('that auto-indent should be ON, NO means OFF.');
  WRITELN;
  PRESSRETURN;
  WRITELN('KEYBOARD DELAY. This field defines the number of times the');
  WRITELN('editor should poll the keyboard status routine before updating');
  WRITELN('the status line. Experiment to find a value which is "slower"');
  WRITELN('than the keyboard repeat rate (typical values range from 100');
  WRITELN('to 1000). A delay value of 0 should be specified when the CP/M');
  WRITELN('BIOS provides only a dummy console status routine.');
  WRITELN;
  WRITELN('CONFIGURATION NAME. This field defines the name of the current');
  WRITELN('configuration (usually, it is the name of your computer). Up to');
  WRITELN('32 characters may be entered.');
  WRITELN;
  PRESSRETURN;
END;

BEGIN æMISCå
  WITH DATA DO
  REPEAT
    WRITELN('MISCELLANEOUS DATA:');
    WRITELN;
    WRITELN(PA,YESNO(BACKUPF));
    WRITELN(PB,YESNO(AUTOF));
    WRITELN(PC,KDELAY);
    WRITELN(PD,CONFNAME);
    WRITELN;
    CH:=SELECT('Edit(A-D), Exit(X), Help(Y)',Æ'A'..'D','X','Y'Å);
    CASE CH OF
      'A': BEGIN
	     WRITE(PA); BACKUPF:=READYN; WRITELN;
	   END;
      'B': BEGIN
	     WRITE(PB); AUTOF:=READYN; WRITELN;
	   END;
      'C': BEGIN
	     WRITE(PC); KDELAY:=READNUM(0,32767); WRITELN;
	   END;
      'D': BEGIN
	     WRITE(PD); BUFLEN:=32; READLN(CONFNAME); WRITELN;
	   END;
      'Y': HELP;
    END;
  UNTIL CH='X';
END;

PROCEDURE HELP;
BEGIN
  WRITELN('To do a complete configuration of COMPAS you should go through');
  WRITELN('all functions of this menu (the order in which you do it is of');
  WRITELN('no importance, as long as you make sure that all fields within');
  WRITELN('all menus have be inspected and modified if necessary).');
  WRITELN;
  WRITELN('CRT CONFIGURATION. This function is used to view and/or modify');
  WRITELN('the CRT configuration table and the user patch area.');
  WRITELN;
  WRITELN('KEYBOARD CONFIGURATION. This function is used to view and/or');
  WRITELN('modify the keyboard configuration table.');
  WRITELN;
  WRITELN('MISCELLANEOUS DATA. This function allows you to view and/or');
  WRITELN('modify various system informations.');
  WRITELN;
  PRESSRETURN;
END;

BEGIN æCONFIGUREå
  WITH DATA DO
  REPEAT
    WRITELN('MAIN CONFIGURATION MENU:');
    WRITELN;
    WRITELN('1. CRT configuration');
    WRITELN('2. Keyboard configuration');
    WRITELN('3. Miscellaneous data');
    WRITELN;
    CH:=SELECT('Function(1-3), Exit(X), Help(Y)',Æ'1'..'3','X','Y'Å);
    CASE CH OF
      '1': CRT;
      '2': KEYBOARD;
      '3': MISC;
      'Y': HELP;
    END;
  UNTIL CH='X';
END;
«eof»