d
i
g
i
t
a
l
digital equipment corporation · maynard, massachusetts
MEMORY ADDRESS
EMA
RUN
Part of the kermit package
OS/8 DECODING PROGRAM

PROGRAM TO  DECODE  OS/8  FILES  FROM "PRINTABLE" ASCII FORMAT TO BINARY-IMAGE
FORMAT.  INTERMEDIATE  "ASCII"  CONVERSION  SHOULD  BE HARMLESS AS LONG AS ALL
PRINTING DATA CHARACTERS ARE NOT MODIFIED.

DISTRIBUTED BY CUCCA AS "K12DEC.PAL" AS PART OF THE CUCCA KERMIT-12 PACKAGE.

WRITTEN BY:

CHARLES LASNER (CJL)
CLA SYSTEMS
72-55 METROPOLITAN AVENUE
MIDDLE VILLAGE, NEW YORK 11379-2107
(718) 894-6499

USAGE:

THIS PROGRAM OPERATES ON "PRINTABLE"  ASCII  FILES  WHICH HAVE BEEN CREATED BY
ENCODING THE CONTENTS OF ARBITRARY (BINARY) FILES.  THE ENCODING FORMAT ALLOWS
FOR SOME INNOCUOUS CONTENT MODIFICATION SUCH AS  EXTRANEOUS  WHITE  SPACE  AND
EXTRA / PAIRS, BUT RIGOROUSLY VALIDATES CERTAIN ASPECTS OF THE FORMAT,
SUCH AS A TRAILING CHECKSUM.

CERTAIN IMBEDDED COMMANDS ARE USED SUCH AS (REMARK .........) WHICH ALLOWS FOR
COMMENTARY LINES WITHIN THE FILE FOR IDENTIFICATION PURPOSES.  THE (FILE ) AND
(END )  COMMANDS  CONTAIN  THE  SUGGESTED  FILENAME FOR THE DESCENDANT DECODED
FILE.

WHEN CREATING THE DESCENDANT DECODED FILE,  THE  USER  MAY  SPECIFY EITHER THE
IMBEDDED FILENAME OR AN ALTERNATE FILENAME ON EITHER THE DEFAULT (DSK:) DEVICE
OR A SPECIFIED DEVICE: 

.RUN DEV DECODE		INVOKE PROGRAM.
*INPUT			INPUT IS DECODED INTO IMBEDDED NAME ON DSK: (DEFAULT).
*DEV:OUTPUT.EX CHARACTER  WAS  USED  TO  TERMINATE THE LINE
			(THIS IS SIGNIFIED BY $).  THIS CAUSES PROGRAM EXIT.
.			PROGRAM EXITS NORMALLY.

INPUT  FILE  ASSUMES  .EN  EXTENSION;  THERE IS NO ASSUMED  OUTPUT  EXTENSION.
IMAGE TRANSFER MODE DOESN'T USE OUTPUT FILENAMES, AS THE TRANSFER DESTROYS THE
OS/8 FILE STRUCTURE (POSSIBLY PRESENT) ON THE DEVICE.

PROGRAM EXIT IS THE NORMAL  OS/8 METHOD OF EITHER PRESSING <^C> ON THE CONSOLE
KEYBOARD DURING THE COMMAND, OR ENDING  THE  COMMAND  INPUT LINE WITH AN 
CHARACTER.

THIS PROGRAM  SUPPORTS  A PROPER SUBSET OF THE ASCII ENCODING SCHEME DISCUSSED
BY CHARLES LASNER  AND  FRANK  DA  CRUZ.  THE SCHEME USED IS FIVE-BIT ENCODING
WITH COMPRESSION, (AS OPPOSED  TO SIX-BIT WITHOUT COMPRESSION AS USED IN PRIOR
VERSIONS).

RESTRICTIONS:

A)	SUPPORTS ONLY ONE DECODABLE FILE PER ENCODED FILE.

B)	IGNORES ALL (END ) COMMANDS.

C)	  < ALWAYS INDICATES ENCODED DATA LINES;  NO CHECK IS MADE FOR
	WHETHER THE > IS ON THE SAME LINE AS THE <.

D) 	PDP-8 GENERATED CHECKSUM DATA MUST  BE  THE  FINAL DATA IN THE FILE IN
	THE  PROPER  FORMAT:    ZCCCCCCCCCCCC  WHERE  CCCCCCCCCCCC    IS   THE
	TWELVE-CHARACTER PDP-8 CHECKSUM DATA.

IF THE ENCODED FILE IS PASSED THROUGH ANY  INTERMEDIARY  PROCESS THAT MODIFIES
THE CONTENTS IN A WAY THAT INTERFERES WITH ANY  OF  THE  ABOVE,  THIS DECODING
PROGRAM  WILL  FAIL.   IT IS THE USER'S RESPONSIBILITY TO  EDIT  OUT  UNWANTED
CHANGES TO THE ENCODED FILE.  ALL OTHER ASPECTS OF THE  PROTOCOL  ARE  OBEYED,
SUCH AS IMBEDDED , EXTRA  , OR TRAILING SPACES HAVE NO  EFFECT  ON
THE RELIABILITY OF THE DECODING PROCESS, ETC.

ERROR MESSAGES.

ANY MESSAGE  PRINTED  IS A FATAL ERROR MESSAGE.  ALL MESSAGES ARE THE STANDARD
OS/8 "USER" ERROR  MESSAGES OF THE FORM:  USER ERROR X AT AAAAA WHERE X IS THE
ERROR NUMBER AND AAAAA  IS  THE  PROGRAM ADDRESS WHERE THE ERROR WAS DETECTED.
THE FOLLOWING USER ERRORS ARE DEFINED:

ERROR NUMBER		PROBABLE CAUSE

0			TOO MANY OUTPUT FILES.

1			NO INPUT FILE OR TOO MANY INPUT FILES.

2			IMBEDDED OUTPUT FILENAME FORMAT ERROR.

3			I/O ERROR WHILE LOCATING IMBEDDED OUTPUT FILENAME.

4			ERROR WHILE FETCHING FILE HANDLER.

5			ERROR WHILE ATTEMPTING TO ENTER OUTPUT FILE.

6			OUTPUT FILE LARGER THAN AVAILABLE FILE SPACE.

7			ERROR WHILE CLOSING THE OUTPUT FILE.

8			I/O ERROR WHILE DECODING FILE DATA OR BAD DATA.

ASSEMBLY INSTRUCTIONS.

IT IS  ASSUMED  THE  SOURCE  FILE  K12DEC.PAL  HAS  BEEN  MOVED AND RENAMED TO
DSK:DECODE.PA.

.PAL DECODE



Feel free to contact me, David Gesswein djg@pdp8online.com with any questions, comments on the web site, or if you have related equipment, documentation, software etc. you are willing to part with.  I am interested in anything PDP-8 related, computers, peripherals used with them, DEC or third party, or documentation. 

PDP-8 Home Page   PDP-8 Site Map   PDP-8 Site Search