Google
 

Trailing-Edge - PDP-10 Archives - AP-4172F-BM - 3a-sources/makram.mac
There are 21 other files named makram.mac in the archive. Click here to see a list.
;<3-UTILITIES>MAKRAM.MAC.4, 18-Nov-77 09:10:38, EDIT BY KIRSCHEN
;UPDATE VERSION NUMBERS FOR RELEASE 3
;<3-UTILITIES>MAKRAM.MAC.3,  8-Nov-77 10:47:53, EDIT BY KIRSCHEN
;MORE COPYRIGHT UPDATING...
;<3-UTILITIES>MAKRAM.MAC.2, 28-Oct-77 10:52:16, EDIT BY KIRSCHEN
;UPDATE COPYRIGHT FOR RELEASE 3
;<1A-UTILITIES>MAKRAM.MAC.8,  6-MAY-76 10:43:04, EDIT BY HURLEY
;<1A-UTILITIES>MAKRAM.MAC.4,  6-APR-76 15:27:07, EDIT BY MILLER
;<1A-UTILITIES>MAKRAM.MAC.3, 31-MAR-76 11:15:33, EDIT BY MILLER
;<1A-UTILITIES>MAKRAM.MAC.2, 31-MAR-76 11:14:26, EDIT BY MILLER
;<1A-UTILITIES>MAKRAM.MAC.1, 31-MAR-76 10:24:29, EDIT BY KIRSCHEN
;<V-SOURCES>MAKRAM.MAC.11, 30-MAR-76 16:44:32, EDIT BY PORCHER
;<V-SOURCES>MAKRAM.MAC.9, 29-MAR-76 12:05:33, EDIT BY PORCHER
;<V-SOURCES>MAKRAM.MAC.8, 29-MAR-76 10:46:04, EDIT BY PORCHER
;<V-SOURCES>MAKRAM.MAC.7, 26-MAR-76 21:47:46, EDIT BY PORCHER
;<V-SOURCES>MAKRAM.MAC.6, 26-MAR-76 12:05:25, EDIT BY MILLER
;<V-SOURCES>MAKRAM.MAC.5, 25-MAR-76 13:55:04, EDIT BY MILLER
;<V-SOURCES>MAKRAM.MAC.4, 25-MAR-76 13:39:26, EDIT BY MILLER
;<V-SOURCES>MAKRAM.MAC.3, 25-MAR-76 13:31:36, EDIT BY MILLER
;<V-SOURCES>MAKRAM.MAC.2, 25-MAR-76 10:40:15, EDIT BY MILLER
	TITLE MAKRAM - PROGRAM TO MAKE BINARY RAM FILE FOR LP20	



;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1976, 1977, 1978 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

	SEARCH MONSYM,MACSYM
	.REQUIRE SYS:MACREL
	SALL
	IFDEF .PSECT,<
	.DIRECT FLBLST>
	IFNDEF .PSECT,<
	.DIRECT .XTABM>

;THIS PROGRAM ACCEPTS TEXT INPUT DESCRIBING TRANSLATION ACTION
;TO BE PERFORMED ON CERTAIN ASCII CHARACTERS. AN INITIAL RAM IS
;ASSEMBLED IN WHICH CORRESPONDS TO THE STANDARD BA10 TRANSLATION
;ALGORITHM FOR A 96 CHARACTER LP10.

; VERSION INFORMATION

VMAJOR==3		;MAJOR VERSION
VMINOR==0		;MINOR VERSION
VWHO==0			;WHO LAST EDITED (0=DEC DEVELOPMENT)
VEDIT==2		;EDIT NUMBER

VMAKTR== <VWHO>B2+<VMAJOR>B11+<VMINOR>B17+VEDIT


;DEFINTIONS

A==1
B==2
C==3
D==4
W1==5
W2==6
P==17

BUFSIZ==100
NCHPW==5
ATMSIZ==100
GJFSIZ==.GJRTY+2

	DEFINE TXTPTR (MSG) <POINT 7,[ASCIZ /MSG/]>
	DEFINE RAMWRD (TYPE,DATUM) <
	IFE TYPE-OTHER,<
		..T==TRNBIT+DATUM ;;TRANSLATE TO OTHER
		>
	IFE TYPE-ARROW,<
		..T==INTBIT+"^"	;;FORM DATUM WORD
		>		;;END OF ARROW TRANSLATION

	IFE TYPE-SELF,<
		..T==TRNBIT+BYTE ;;TRANSLATE TO SELF
		>

	IFE TYPE-PAPER,<
		..T==VFUBIT+<DATUM-1> ;;PAPER MOTION
		>

	IFE TYPE-DEL,<
		..T==DELBIT	;;DELIMITER
		>
	IFE TYPE-IGNORE,<
		..T==TRNBIT+0	;;SEND NON-PRINTING CHARACTER
		>
	IFE TYPE-IMAGE,<
		..T==DATUM	;;PROVIDE BINARY QUANTITY
		>

	IFE BYTE&1,< .T==..T_^D18>
	IFN BYTE&1,< .T+..T>	;;GENERATE WORD
	BYTE==BYTE+1		;;NEXT BYTE
>				;;END OF MACRO

;DEFINITIONS FOR THE ABOVE MACRO

PAPBIT==1B27			;PAPER MOTION BIT
DELBIT==1B25			;DELIMITER BIT
ARROW==0			;ARROW MODE
SELF==1				;TRANSLATE TO SELF
TRNBIT==1B26			;TRANSLATE BIT
INTBIT==1B24			;PAPER BIT 
PAPER==2			;PAPER MOTION CHARATCER
VFUBIT==PAPBIT+TRNBIT
DEL==3				;DELIMITER
DELBIT==1B25
OTHER==4
IGNORE==5			;IGNORE THIS CODE
IMAGE==6			;DATUM IS FULL DESCRIPTION

;DATA

CMDBLK:	BLOCK .CMGJB+5		;COMD STATE BLOCK
ATMBFR:	BLOCK ATMSIZ		;ATOM BUFFER
GJFBLK:	BLOCK GJFSIZ		;GTJFN LONG FORM BLOCK
EIGHTB:	BLOCK 1			;0: 7 DATA BITS, 1: EIGHT DATA BITS
PDLN==50			;LENGTH OF PDL
PDL:	BLOCK PDLN		;ALLOCATE PDL
BUFFER:	BLOCK 100		;RESERVE LINE SPACE
	SUBTTL	GENERATE THE RAM
BYTE==0			;START AT 0
.T==0			;INITIALIZE
..T==0

PRAM:	RAMWRD SELF		;NULL GOES TO SELF
	REPEAT ^D8,<RAMWRD ARROW> ;1-10 IS ARROW MODE
	RAMWRD SELF		;TAB GOES TO SELF
	RAMWRD PAPER,^D8	;LF IS VERT MOTION
	RAMWRD PAPER,7		;VT IS CHANNEL 7
	RAMWRD PAPER,1		;FF IS TOP OF FORM
	RAMWRD PAPER,1B31+1	;SPACE 0 LINES
	REPEAT 2,<RAMWRD ARROW> ;16-17 ARROW TRANSLATION
	RAMWRD PAPER,2		;20 VFU CH 2
	RAMWRD PAPER,3		;21 VFU CH 3
	RAMWRD PAPER,4		;22 VFU CH 4
	RAMWRD PAPER,5		;23 VFU CH 5
	RAMWRD PAPER,6		;24 VFU CH 6
	REPEAT 6,<RAMWRD ARROW>	;25-32 ARROW MODE
	RAMWRD OTHER,"$"	;33 PRINTS AS $
	REPEAT 4,<RAMWRD ARROW>	;34-37 ARROW MODE
	REPEAT 177-40,<
	   RAMWRD SELF>		;ALL REST GO TO SELF
	RAMWRD IGNORE		;EXCEPT DELETE, WHO HAD NONE!!!!

;NOW GENERATE BLOCK TO HOLD BUILT RAM

RAM:	BLOCK 200		;THE RAM
	RELOC 2000-140		;START THE CODE

; ENTRY VECTOR DEFINITION

ENTVEC:	JRST START
	JRST START
	EXP VMAKTR


CMDTAB:	ELEV1-.-1,,ELEV1-.-1
	XWD [ASCIZ /ARROW-MODE/],AROW
	XWD [ASCIZ /DELIMITED-TRANSLATE/],DTRANS
	XWD [ASCIZ /EXIT/],.EXIT
	XWD [ASCIZ /HELP/],.HELP
	XWD [ASCIZ /LOWER-CASE/],LOWER
	XWD [ASCIZ /NUMBER-OF-DATA-BITS/],NDBITS
	XWD [ASCIZ /OUTPUT/],OUTPUT
	XWD [ASCIZ /TRANSLATE/],TRANS
	XWD [ASCIZ /UPPER-CASE/],UPPER
ELEV1:

PROMPT:	ASCIZ /MAKRAM>/
HLPTXT:	ASCIZ /NEW?/
	SUBTTL	COMMAND PARSER AND DISPATCH

START:	RESET			;CLEAN UP
	MOVE A,[PRAM,,RAM]	;MOVE PROTOTYPE RAM
	BLT A,RAM+77		;DO FIRST 200 CHARACTERS
	MOVE A,[PRAM,,RAM+100]
	BLT A,RAM+177		;DO SECOND 200 CHARACTERS
	SETZM EIGHTB		;ASSUME 7 DATA BITS
	HRROI A,PROMPT		;GET POINTER TO PROMPT STRING
	MOVEM A,CMDBLK+.CMRTY	;PUT RE-TYPE PROMPT POINTER IN STATE BLOCK
	HRROI A,BUFFER		;GET POINTER TO INPUT TEXT BUFFER
	MOVEM A,CMDBLK+.CMPTR	;SAVE POINTER TO COMMAND STRING
	MOVEM A,CMDBLK+.CMBFP	;SAVE POINTER TO START-OF-BUFFER
	MOVE A,[.PRIIN,,.PRIOU] ;GET PRIMARY INPUT,, OUTPUT JFN'S
	MOVEM A,CMDBLK+.CMIOJ	;SAVE PRIMARY JFN'S
	MOVEI A,PARSE1		;GET RE-PARSE ADDRESS
	MOVEM A,CMDBLK+.CMFLG	;SAVE RE-PARSE ADDRESS
	SETZM CMDBLK+.CMINC	;INITIALIZE # OF CHARACTERS AFTER POINTER
	MOVEI A,BUFSIZ*NCHPW	;GET # OF CHARACTERS IN BUFFER AREA
	MOVEM A,CMDBLK+.CMCNT	;SAVE INITIAL # OF FREE CHARACTER POSITIONS
	HRROI A,ATMBFR		;GET POINTER TO ATOM BUFFER
	MOVEM A,CMDBLK+.CMABP	;SAVE POINTER TO LAST ATOM INPUT
	MOVEI A,ATMSIZ*NCHPW	;GET # OF CHARACTERS IN ATOM BUFFER
	MOVEM A,CMDBLK+.CMABC	;SAVE COUNT OF SPACE LEFT IN ATOM BUFFER
PARSE:
COMMAN:	MOVEI A,CMDBLK		;GET ADDRESS OF COMMAND STATE BLOCK
	MOVEI B,[FLDDB. (.CMINI)] ;GET FUNCTION DESCRIPTOR BLOCK
	COMND			;INITIALIZE COMMAND SCANNER JSYS

PARSE1:	MOVE A,[GJFBLK,,G