1.4 ASSEMBLERS				PAGE 1.4-1		JAN 1975
--------------

-NAME: DCP
-AUTHOR: A.E. BROUWER, MATH. CENTR., A'DAM
-DATE: 731003
-VERSION NR: DCP AB-V21
-LAST UPDATE: 741112
-ENVIRONMENT: OS/8 OPER. SYSTEM

DCP (PRELIMINARY DESCRIPTION).

DCP (SOMETIMES CALLED DEASS) IS A PROGRAM TO DEASSEMBLE (OR DISASSEMBLE)
A PAL PROGRAM GIVEN IN BINARY OR IN CORE IMAGE FORMAT AS 1ST INPUT FILE.
INFORMATION ABOUT THE PROGRAM AND MEANINGFUL TAGS CAN BE GIVEN
IN A SECOND INPUT FILE. A WELL READABLE LISTING WITH MEANINGFUL
TAGS BUT WITHOUT COMMENT CAN BE OBTAINED IN A FEW PASSES
(TYPICALLY FOUR). THE FIRST TIME NO INFORMATION IS SUPPLIED; WHILE
READING THE OUTPUT ONE RECOGNIZES CERTAIN PARTS AS MESSAGES
("NO ROOM FOR OUTPUT") OR NUMERIC TABLES (6030,7634,7766,7777)
OR SIMPLE SUBROUTINES (TTYOUT, PUSH, PRINT).
PUTTING THESE THINGS IN AN INFORMATION FILE AND THEN RUNNING
DCP AGAIN GIVES YOU A MUCH NICER OUTPUT THE SECOND TIME.
NOW YOU MAY EMBARK ON THE PROGRAM ITSELF AND OBTAIN AFTER A SMALL
NUMBER OF PASSES (DEPENDING ON THE COMPLEXITY OF THE PROGRAM AND
YOUR LAZINESS) A SOURCE THAT MIGHT HAVE BEEN THE ORIGINAL ONE EXCEPT
FOR ITS LACK OF COMMENT. AT THIS MOMENT YOU COULD PROFITABLY USE
THE CTRL/E FEATURE OF MCEDIT TO PROVIE THE WHOLE SOURCE OF COMMENT.
(FOR EXAMPLE, WE OBTAINED A SOURCE OF A FORTRAN COMPILER IN THREE
DAYS AFTER FIVE PASSES.)

BELOW WE WILL DESCRIBE THE OS/8 VERSION OF THE PROGRAM

-MEMORY REQUIREMENTS: 16K

-ASSEMBLY INSTRUCTIONS:
.R PAL8
*102,DCP_SBIN,DCPZ/L$
.SAVE SYS DCP

-OPERATING INSTRUCTIONS:
.R DCP
*OUTPUT<INPUT,INFO(OPTIONS)
					PAGE 1.4-2		JAN 1975
COMMAND LINE INTERPRETATION:

1. IF NO INPUT AND NO OUTPUT SPECIFIED THEN DELETE DSK:DCPLS.TM
   IF COMMAND CLOSED WITH ALTMODE THEN EXIT TO OS/8 MONITOR
ELSE CALL COMMAND DECODER AGAIN.

2. IF NO OUTPUT GIVEN BUT AN OUTPUT FILE IS REQUIRED BECAUSE
   CHAINING TO CREF.SV IS REQUESTED THEN DSK:DCPLS.TM IS USED.

3. IF NO INPUT GIVEN THEN USE OUTPUT FILENAME WITH EXTENSIONS
   .SV AND .SM (IF PRESENT)
E.G.
	*DEASS<
IS EQUIVALENT TO
	*DEASS<DEASS.V
IF DEASS.SM DOES NOT EXIST, AND TO
	*DEASS<DEASS.SV,DEASS.SM
OTHERWISE.
IN THIS CASE A PREVIOUS VERSION OF THE OUTPUTFILE IS
DELETED FIRST (IF NECESSARY).

4. IF THE OUTPUTFILE HAS NO EXPLICIT EXTENSION THEN ADD
   .DC IF A SOURCE IS PRODUCED, AND .LS OTHERWISE
(ONE WOULD EXPECT .PA INSTEAD OF .DC BUT THAT PROVED DANGEROUS)

OPTIONS AFFECTING INTERPRETATION OF COMMAND LINE:
/B	EXPECT .BN RATHER THAN .SV FORMAT IN FIRST INPUTFILE
	THIS CHANGES THE DEFAULT EXTENSION INTO .BN IF NO
	INPUT IS SPECIFIED.
/L	PRODUCE .LS RATHER THAN .DC OUTPUT
/X	CHAIN TO CREF.SV
	(1ST OUTPUT BECOMES INPUT AND 2ND OUTPUT BECOMES OUTPUT)
	THIS OPTION IMPLIES THE OPTIONS /L AND /T
E.G.
	.R DCP
	*DEASS,TTY:</X/B
IS EQUIVALENT TO
	.R PIP
	*DEASS.LS</D$
	.R DCP
	*DEASS.LS<DEASS.BN,DEASS.SM/L/T/B
	.R CREF
	*TTY:<DEASS.LS
ALSO
	.R DCP
	*
	*DEASS.SV,SPECS1,SPECS2,SPECS3/S
MEANS
	.R PIP
	*DEASS.TM</D$
	.R DCP
	*DCPLS.TM<DEASS.SV,SPECS1,SPECS2,SPECS3/L/T
	.R CREF
	*DCPLS.TM
					PAGE 1.4-3		JAN 1975
OPTIONS:
/A	DO NOT GENERATE A 'START' LABEL
	(BY DEFAULT A LABLE 'START' IS GENERATED WHEN DECODING
	A CORE IMAGE FILE. THIS IS POSSIBLE SINCE THE CORE COONTROL
	BLOCK CONTAINS THE STARTING ADDRESS)
/B	EXPECT .BN INSTEAD OF .SV INPUT
/C	COPY THE INFO FILE AFTER THE OUTPUT
/D	ALLOW 'JMP .-3', 'JMP I .+1' INSTRUCTIONS
	(NORMALLY FOR EACH REFERENCE A TAG IS GENERATED)
/H	DO NOT GENERATE LITERALS
/K	ALLOW MODIFICATION OF LITERALS
	(NORMALLY AN INSTRUCTION LIKE 1377 WILL BE TRANSLATED BY
	'TAD (1234' BUT 2377 BY 'ISZ A177' SINCE NO DECENT PROGRAMMER
	EVER WRITES 'ISZ (1234'. IT WAS FOUND HOWEVER THAT SEVERAL
	DEC PROGRAMS CONTAIN SUCH CONSTRUCTS)
/L	PRODUCE OUTPUT IN .LS FORMAT
/N	DO NOT GENERATE TABLE OF UNDEFINED SYMBOLS
/S	GENERATE TABLE OF ALL SYMBOLS
/T	CONVERT TABS INTO SPACES
/W	DO NOT INTERPRET 6141 AS THE PDP12 'LINC' INSTRUCTION
/X	CHAIN TO CREF.SV

/(F)	(WHERE F DESIGNATES A DIGIT BETWEEN 0 AND 7)
	TRANSLATE FIELD F OF THE PROGRAM (DEFAULT: /0)
	(THE TRANSLATION IS DONE ONE FIELD AT A TIME;
	THIS CAUSES SOME FLAWS IN THE OUTPUT:
	CIF 10
	JMS I 	(200
	IS TRANSLATED AS
	CIF 10
	JMS I 	(START
	IF LOC 200 IN THE CURRENT FIELD IS LABELED START.
	NOTE THAT ASSEMBLING THE PRODUCED SOURCE GIVES THE
	CORRECT BINARY)
=NNNNMMMM	THE = OPTION CAN BE USED TO SPECIFY A PART
	OF THE PROGRAM TO BE DECODED. NNN GIVES BEGIN AND
	MMMM END+1 OF THE RANGE.
	(NOTE THAT IF BEGIN>3777 THE COMMAND HAS TO BE CLOSED
	WITH ALTMODE INSTEAD OF RETURN).
					PAGE 1.4-4		JAN 1975
INPUT FORMAT

EACH INPUT SECTION STARTS WITH $X (WHERE X IS A LETTER INDICATING
THE TYPE OF THE SECTION) AND ENDS WITH $ .
$<CR> INDICATES THE END OF ALL INPUT (WHEN NOT WITHIN A SECION).
BETWEEN THE SECTIONS COMMENT NOT CONTAINING $ MAY BE INSERTED.
SECTION TYPES:
$A	TRANSLATE AS 6BIT ASCII (TEXT "STRING")
$D	DONT TRANSLATE
$I	TRANSLATE AS INSTRUCTION (OVERRIDING OTHER SPECS)
$L	TRANSLATE AS IDENTIFIER RATHER THAN AS INSTRUCTION
$N	TRANSLATE OCTAL
$S	SUBROUTINE WITH ARGS
$T	SYMBOL DEFINITIONS
$Z	SPECIAL CODING
$	END OF INPUT

CONTENT OF SECTION:
1. SECTIONS $X WHERE X IS A,D,I,L OR N.
   CONTENTS: LINES OF THE FORM
   MMMM-NNNN
OR
   NNNN
WHERE NNNN AND MMMM ARE OCTAL ADDRESSES.
E.G. THE SECTION
   $N
   1717-1730
   1750
   $
SPECIFIES THAT THE LOCATIONS 1717-1730 AND 1750 ARE
TO BE TRANSLATED AS OCTAL NUMBERS.

2. SECTIONS $S.
   CONTENTS: LINES OF THE FORM
   SSSS:XXXXX
WHERE SSSS IS A SUBROUTINE ADDRESS AND XXXXX SPECIFIES
THE KIND OF ARGUMENTS THE SUBROUTINE HAS.
E.G. THE SECTION
   $S
   1000:NL
   $
INDICATES THAT EACH CALL TO THE SUBROUTINE AT LOC 1000 HAS TWO
ARGUMENTS OF TYPE OCTAL AND LABEL RESPECTIVELY.

3. SECTIONS $T.
   CONTENTS: LINES OF THE FORM
   TAG=NNNN
OR
   TAG
MEANING: IF NO OCTAL VALUE OF A TAG IS SPECIFIED THEN ITS VALUE IS
TAKEN AS ONE MORE THAN THE VALUE OF THE PREVIOUS TAG.
					PAGE 1.4-5		JAN 1975
4. SECTION $Z.
   THIS IS AN AD HOC CONSTRUCT TO ENABLE THE TRANSLATION OF
SYMBOLTABLES LIKE THOSE OF PAL8 AND CRF.
E.G.
   $Z=52;0=240;1=301;40=260
   NNNN-MMMM:(UUUL)
   $
INDICATES THAT THE RANGE NNNN-MMMM IS A TABLE OF FOUR-WORD ENTRIES
THREE WORDS IN A SPECIAL FORMAT AND ONE LABEL.
THE SPECIAL FORMAT IS AS FOLLOWS:
THE VALUE IS DIVIDED BY 52 GIVING A QUOTIENT AND A REMAINDER.
BOTH ARE CONVERTED INTO A CHARACTER AS FOLLOWS: 0 GIVES A SPACE,
1-37 GIVE LETTERS A-_, AND 40-51 GIVE DIGITS 0-9.

THE CODING HERE IS NOT FOOLPROOF YYET: A STRANGE COMMAND MIGHT
GIVE STRANGE OUTPUT INSTEAD OF AN ERROR MESSAGE.

IN LATER VERSIONS THIS COMMAND WILL BE GENERALIZED, SO WE DONT
DESCRIBE IT IN FULL HERE.



ERRORMESSAGES.
THESE ARE VERY POOR (BECAUSE OF LACK OF SPACE): HLTNNNN,
WHERE NNNN INDICATES THE ADDRESS OF THE ROUTINE IN DCP THAT
DETECTED THE ERROR.
ERRORS ARE ALMOST ALWAYS VIOLATIONS OF THE INPUT FORMAT.
A COMPLETE LIST WILL APPEAR IN THE FINAL REPORT.
1.4 ASSEMBLERS				PAGE 1.4-6		FEB 1975
--------------

NAME: DCP (ERROR TABLE)
AUTHOR: A.E. BROUWER
DATE: 750213

AS NOTED: THE ERRORMESSAGES OF DCP LOOK LIKE 'HLT....'
WHERE .... STANDS FOR THE OCTAL ADDRESS OF THE ROUTINE
THAT DETECTED THE ERROR.
(OF COURSE GIVING INTELLIGIBLE MESSAGES IS HIGHLY DESIRABLE
 BUT LACK OF SPACE PREVENTED THIS. SOME FUTURE VERSION OF DCP
 WILL CHAIN TO A FILE DECPERR.SV CONTAINING THE MESSAGES.)

BELOW THE ERROR NUMBERS ARE GIVEN FOR DCP AB-V21.
[NOTE: THESE NUMBERS MAY CHANGE SLIGHTLY EACH TIME THAT
 DCP IS ASSEMBLED ANEW.]

NUMBER	ERROR
0000	PREMATURE END OF .BN INPUT
0230	CLOSE ERROR
0301	LOOKUP FOR SYS:CREV.SV FAILED
1414	OUTPUT ERROR OR NO ROOM FOR OUTPUT
1451	INPUT ERROR (INFO FILE)
1522	NO CARRIAGE RETURN WHERE EXPECTED IN THE INFO FILE
1755	UPPER BOUND IN BOUND PAIR LESS THAN LOWER BOUND
2031	ASCII STRING CONTAINED A SIXBIT ZERO, BUT NOT AT THE END
	(I.E. A WORD 00XX). (THIS MIGHT HAVE BEEN AN @,
	BUT IS USUALLY AN ERROR.)
2046	ASCII STRING WITHOUT TRAILING ZERO
2061	DCP COULD NOT FIND A SUITABLE DELIMITER FOR THE ASCII STRING
	IN THE RANGE "" TO "?
2125	IMPOSSIBLE
2214	TEXT BUFFER OVERFLOW (TOO MANY OR TOO LONG IDENTIFIERS).
2234	NO IDENTIFIER WHERE EXPECTED (IN A $T SECTION).
2666	ZERO SUBROUTINE ADDRESS SPECIFIED IN A $S SECTION
2705	S-BUFFER OVERFLOW (TOO MANY SUBROUTINES WITH ARGS.)
2761	UNKNOWN TYPE LETTER IN SPECIFICATION OF SUBROUTINE ARGS
3006	$Z NO FOLLOWED BY =
3011	$Z= NOT FOLLOWED BY A NONZERO NUMBER
3022	NO CARRIAGE RETURN OR SEMICOLON WHERE EXPECTED IN $Z HEADER
3030	NO = WHERE EXPECTED IN $Z HEADER LINE
3041	ZERO LOWER BOUND IN BOUND PAIR IN $Z SECTION
3064	Z-BUFFER OVERFLOW
3117	PREMATURELY EXHAUSTED Z-FORMAT
3135	UNKNOWN Z-FORMAT SYMBOL
3470	T-BUFFER OVERFLOW
3723	NO VALUE ASSIGNED TO FIRST TAG IN $T SECTION
4213	NO INPUT AND NO OUTPUT AND NO DSK:DCPLS.TM TO DELETE
4245	HANDLER FETCH ERROR
4341	LOOKUP FOR INPUTFILE FAILED
4442	OUTPUT OPEN ERROR
4456	NO 16K MEMORY AVAILABLE
4470	CHECKSUM OR FORMAT ERROR IN BINARY INPUT FILE
4613	FORMAT ERROR IN CORE CONTROL BLOCK OF .SV INPUT FILE
4647	ERROR READING CORE CONTROL BLOCK OF .SV INPUT
4723	ERROR READING .SV INPUT FILE
1.4 ASSEMBLERS				PAGE 1.4-8		MAR 1976
--------------

NAME: DCP-AB-WW-V24
AUTHOR: W.F. WAKKER, MATH. CENTR., A'DAM
DATE: 760325


DCP VERSION 24 IS A 24K VERSION OF DCP.

THE FOLLOWING EXTENSIONS ARE MADE:
-DCP24 TRANSLATES EAE INSTRUCTIONS IN BOTH A AND B MODE
	(FOR MODE SWITCHING SEE BELOW)
 EXAMPE:	1200	DAD;1234	IS TRANSLATED AS IF THE
 INFO-FILE CONTAINS THE FOLLOWING INTO:
	$I
	1200
	$
	$L
	1201
	$
	$N
	1234+
	$

- IN THE INFO-FILE ONE CAN GIVE : NNNN+ .THIS HAS THE SAME
  EFFECT AS NNNN-MMMM WHERE MMMM=NNNN+1.

- SEVERAL BUFFERS HAVE BEEN ENLARGED.

- THE OUTPUT IS PAGINATED AND HAS A HEADING ON EACH PAGE.
  (THE PAGE NUMBER IS IN OCTAL ....)

- ERROR MESSAGE ARE UNFORTUNATELY AS POOR AS BEFORE (SEE DCP24
   ERROR TABLE).

- NEW SECTIONS, NOW POSSIBLE IN THE INFO-FILE ARE:

  $B	TRANSLATE AS 8-BIT ASCII
  $C	GIVE COMMENT
  $E	FORCE EAE MODE A
  $F	FORCE EAE MODE B
  $M	TRANSLATE NEGATIVE

- SECTION $B
  $B
  NNNN-MMMM
  $
  CAUSES THE LOCATION NNNN-MMMM TO BE TRANSLATED AS
  8-BIT ASCII, E.G. 0301 IS TRANSLATED AS "A.
  VALUES LESS THEN 241 ARE TRANSLATED AS OCTAL NUMBERS.
					PAGE 1.4-9		MAR 1976
- SECTIONS $E AND $F
  WHEN DCP ENCOUNTERS EAE INSTRUCTIONS, SOME SLIGHT HEURISTICS
  ARE DONE TO DETERMINE THE MODE. THE MODE IS INITIALLY A; SWAB,
  DAD, AND DST CAUSE THE MODE TO CHANGE TO MODE B ETC.
  WHEN THESE HEURISTICS ARE TOO POOR, YOU CAN USE  THE $E SECTION
  TO FORCE MODE A AND THE $F SECTION TO FORCE MODE B.

- SECTION $M
  THIS SECTION HAS THE SAME EFFECT AS SECTION $N, ONLY ALL
  OCTALS ARE GIVEN NEGATIVE, E.G. 7770 BECOMES -10.
  IT IS ALSO POSSIBLE TO GIVE $B AND $M TO THE SAME LOC.
  EXAMPLE: 7477 IS NOW TRANSLATED AS -"A.

- SECTION $C
  NOW YOU CAA GIVE COMMENT!!
  FORMAT:	NNNN:THIS IS COMMENT
  EFFECT:	NNNN	........	/THIS IS COMMENT
  ATTENTION: THE $C SECTION MUST BE THE LAST ONE IN THE INFO-FILE:
  WHEN $C IS SEEN IN THE INFO-FILE, A SETUP IS MADE TO
  GIVE THE COMMENT AND NO MORE INPUT WILL BE READ ( E.G. THE PROGRAM
  ACTS LIKE $$ ON THE END IS SEEN). THE COMMENTS ARE ADDED TO
  THE LISTING IN THE LAST PASS OF THE PROGRAM.
**** YOU MUST SORT THE ADDRESSES.
	300:COMM1
	200:COMM2
     HAS AS EFFECT THAT FROM ADRESS 300 ON, NO MORE COMMENT WILL
     BE GIVEN, SINCE ADDRESS 200 IS NOT FOUND ANY MORE.
**** DO NOT GIVE COMMENT ON ADDRESSES WHICH DO NOT BELONG
     TO THE PROGRAM.

- EXTENSION OF $S SECTION
  AS ARGUMENTS IN THE $S SECTION YOU CAN GIVE N, L, A, I, B, M,
  (WITH THE OBVIOUS MEANING, SEE ABOVE ) AND ALSO U.
  U SHOULD ONLY BE USED FOR THE ADDRESSES 200 AND 7700.
  IT MARKS THE ENTRYPOINT OF THE USER SERVICE ROUTINE AND GIVES
  A NICE TRANSLATION OF EACH USR CALL.

- EXTENSION OF $Z SECTION
  NEW POSSIBLE ARGUMENTS: M, B.
1.4 ASSEMBLERS				PAGE 1.4-10		MAR 1976
--------------

NAME: DCP-V24 (ERROR TABLE)

NUMBER	ERROR
0000	PREMATURE END OF .BN INPUT
0237	CLOSE ERROR
0305	LOOKUP FOR SYS:CREF.SV FAILED
1414	OUTPUT ERROR OR NO ROOM FOR OUTPUT
1511	NO CARRIAGE RETURN WHERE EXPECTED IN THE INFO FILE
1707	NO : AS SEPARATOR IN $C SECTION
2145	UPPER BOUND IN BOUND PAIR LESS THAN LOWER BOUND
2235	NO : AS SEPARATOR IN FIRST LINE OF $C SECTION
2331	INPUT ERROR (INFO FILE)
2431	ASCII STRING CONTAINED A SIXBIT ZERO, BUT NO AT THE END
	(I.E. A WORD 00XX). (THIS MIGHT HAVE BEEN AN @,
	BUT IS USUALLY AN ERROR.)
2446	ASCII STRING WITHOUT TRAILING ZERO
2461	DCP COULD NOT FIND A SUITABLE DELIMITER FOR THE ASCII STRING
	IN THE RANGE "" TO "?
2525	IMPOSSIBLE
2614	TEXT BUFFER OVERFLOW (TOO MANY OR TOO LONG IDENTIFIERS)
2634	NO IDENTIFIER WHERE EXPECTED (IN A $T SECTION)
3266	ZERO SUBROUTINE ADDRESS SPECIFIED IN A $S SECTION
3305	S-BUFFER OVERFLOW (TOO MANY SUBROUTINES WITH ARGS)
3367	UNKNOWN TYPE LETTER IN SPECIFICATION OF SUBROUTINE ARGS
3406	$Z NOT FOLLOWED BY =
3411	$Z= NOT FOLLOWED BY A NONZERO NUMBER
3422	NO CARRIAGE RETURN OR SEMICOLON WHERE EXPECTED IN $Z HEADER
3430	NO = WHERE EXPECTED IN $Z HEADER LINE
3441	ZERO LOWER BOUND IN BOUND PAIR IN $Z SECTION
3463	Z-BUFFER OVERFLOW
3517	PREMATURELY EXHAUSTED Z-FORMAT
3541	UNKNOWN Z-FORMAT SYMBOL
4070	T-BUFFER OVERFLOW
4324	NO VALUE ASSIGNED TO FIRST TAG IN $T SECTION
