.NLIST ; ; ; ; RUNOFF PREFIX FILE ; ; This is a file used to convert "PDP-11 macro" ; to VAX Macro-32 ; ; by J. CLEMENT ; Bonner Lab, Rice Univ. ; Box 1892, Houston, Tx. ; 77251 ; ; Conditional definitions ; ; $VMS =1 ; This defines VAX only code dblbuf =0 ; add (;) for no double buffering on RT-11 $FLORD =1 ; add (;) to remove escape seq for FLORIDA DATA ;$DIAB =1 ; remove (;) to define escape seq for Diablo etc. ;$12pt =1 ; remove (;) to define varsp for 12 pitch Diablo ; Debugging aids are only needed if you make major changes to ; RNO and need to look at the output in detail. H$$PHN =0 ; add (;) if autohyphenation not desired $DIGR =0 ; add (;) for no heuristic hyphenation ; NOTE: RSTS compatability not guaranteed !! $PASS =0 ; add (;) to remove 2 pass mode fastx =1 ; add (;) to remove index optimization ; ; Parameters ; ; These parameters may be made installation dependent ; You may change these to set up your installation defaults. ; LINSP=2. ; Partial spacing per line (do not change) ; Linsp defines how may partial lines/sub or superscript ; normally this is 2. ; VMS_BUFFER=^X1000 ; Dynamic buffer size (increase as needed) IFDPTH=32. ; Maximum nesting of .IF commands VARSIZ=40. ; Maximum chars/variable spacing SUPSIZ=40. ; Subscript/superscript size COMSIZ=40. ; Maximum chars/command label SUBMAX=40. ; Maximum chars/substitution IFMAX=40. ; Maximum chars/if label LISSIZ=10. ; Maximum nesting of lists ILSTTP=2. ; Initial list element page test count ILSTVS=1. ; Initial list element vertical spacing IPARIN=5. ; Initial paragraph indentation IPARTP=2. ; INITIAL PARAGRAPH PAGE TEST IPARVS=1. ; INITIAL PARAGRAPH VERTICAL SPACING IRMRG=60. ; INITIAL RIGHT MARGIN ILMRG=0. ; INITIAL LEFT MARGIN ITMRG=0. ; INITIAL TOP MARGIN IHSPAC=3. ; Initial header spacing HWPLN=66. ; Hardware lines per page INLPG=58. ; INITIAL LENGTH OF PAGE LOLMAR=9. ; INITIAL LEFT MARGIN INDENT ON LISTS LSLMAR=4. ; LEFT MARGIN INDENT ON EMBEDDED LISTS NHSPAC=2. ; INITIAL VERTICAL SPACING BEFORE NOTES NASPAC=1. ; Vertical spacing after note title NFSPAC=2. ; FINAL VERTICAL SPACING AFTER NOTES NPMARG=20. ; PRIMARY MARGIN CHANGE ON NOTES NSMARG=5. ; SECONDARY MARGIN CHANGE ON NOTES ISPNG=1. ; STANDARD LINE SPACING CBNSP=3. ; CHAR OFFSET FOR CHANGE BARS ; Min page length is set by changing 16. MINPG=16.*LINSP ; Min page length in partial lines MINLN=16. ; Min line length MAXPS=5. ; Max paragraph spacing allowed FNTSIZ=1. ; Number of fonts handled LEVSIZ=6. ; Max number of header levels ; ; The following control the .DISPLAY commands ; CH.HD1=40. ; Number of characters in pre-header ; Half the characters for variable spacing CH.HD2=40. ; Number of characters in post-header HD.MAX=56. ; This must be larger than CH.HD1,CH.HD2, or 12. ; ; Size of buffers ; IBFSZ=512. ; Input buffer size ; This needs to be larger than the maximum input line. ; You may increase or decrease this as needed. In general it should ; never be smaller than 132. ; OBFSZ=200. ; Output buffer size ; This needs to be larger than the maximum output line if /-CR is used. ; If this is too big you may not be able to edit the resulting file. ; This is not used in RT-11 version where the output line can be any ; size and is not limited. ; ULNSZ=150. ; Underline buffer size ; This needs to be larger than the maximum number of characters/line ; for your printer if either /UL:S or /UL:L are used. ; ; ; This determines storage for traceback lines. Buffer ; must be big enough for full filename. Number must be even ; TRCLN=80. ; Line size for RSX-11M (VMS) ; ; | | | | | | ; | | | | | | ; V V V V V V ; ; ====> The rest of this file should not be changed <==== ; ====> If you make any changes after this notice <==== ; ====> You do so at YOUR OWN RISK. <==== ; ; ^ ^ ^ ^ ^ ^ ; | | | | | | ; | | | | | | ; $WORDL=4 ; Number of bytes per normal word $LONG=4 ; Sets up for 4 bytes/PWRD or GWRD .if df $LONG $WORD2=4 ; Number of bytes per G/PWRD .endc .if ndf $LONG $WORD2=2 ; Number of bytes per G/PWRD .endc ; ; FLAG BITS IN F.1 (Do not mess with these) ; ; NOTE: THE LOW ORDER BYTE CORRESPONDS TO A LEGAL COMMAND MASK ; THAT IS TESTED AGAINST THE TRAILING BYTE OF THE ; APPROPRIATE COMMAND NAME. ; NOTF= ^o1 ; NOTE PROCESSING ACTIVE FOTF= ^o2 ; FOOTNOTE PROCESSING ACTIVE LCKF= ^o4 ; Parameters locked off TEXF= ^o10 ; Text on RELF= ^o40 ; RELATIVE NUMBER CONVERSION (1=YES) BRKF= ^o100 ; CORRESPONDS TO BREAK FLAG IN TRAILING BYTE ; 200 ; Marks last byte in table ; JUSTF= ^o400 ; JUSTIFY ENABLED PJUSTF= ^o1000 ; PREVIOUS JUSTIFY FLAG FILLF= ^o2000 ; FILL ENABLED LITFG= ^o4000 ; LITERAL PROCESSING FLAG TXDEF= ^o10000 ; Text deferred flag IFFLG= ^o20000 ; If flag PARF= ^o40000 ; Paragraph flag ; ; SWITCH WORD FLAG BIT DEFINITIONS FOR S1 (Do not mess with these) ; FFDSW= ^o1 ; SIMULATE FORM FEEDS (0=YES) HYPSW= ^o2 ; HYPHENATE OUTPUT TEXT (1=YES) PAUSW= ^o4 ; PAUSE BETWEEN PAGES (1=YES) SPLSW= ^o10 ; SPOOL TEXT FILE (1=YES) UPCSW= ^o20 ; FORCE ALL TEXT TO UPPER CASE (1=YES) CRSW= ^o40 ; No CR,LF switch EVESW= ^o100 ; Even output ? ODDSW= ^o200 ; Odd output ? DEBSW= ^o400 ; Debug switch TTSW= ^o1000 ; Terminal output switch PASSW= ^o2000 ; Pass switch (causes 2 passes) WARSW= ^o4000 ; Warning suppress switch EROSW= ^o10000 ; ; SWITCH FLAGS (BYTE) (Do not mess with these) ; Definitions ; SW.TDS= ^o1 ; Temporary disable SW.TD2= ^o2 ; Temporary disable 2 SW.HDR= ^o4 ; Temporary disable during headers SW.EDS= ^o20 ; Disable during equation SW.IDS= ^o40 ; Disable during input SW.DIS= ^o200 ; Permanent disable SW.NEG= ^x80000000 ; Define negative switch word FL.ALL= ^o1000 ; Disable all FL.LIT= ^o2000 ; Literal disable FL.DIS= ^o100000 ; Permanent disable ; ; ; ; Bits for LAYOUT (Do not mess with these) ; LAY.CT= ^o1 ; Center title/subtitle LAY.RT= ^o2 ; Title to right LAY.OT= ^o4 ; Alternate right left title LAY.CP= ^o10 ; Center page LAY.LP= ^o20 ; Page to left LAY.OP= ^o40 ; Alternate right left page LAY.NB= ^o100 ; Page number at bottom of page LAY.TB= ^o200 ; Title at bottom of page ; ; INDEX Table format: (Do not mess with these) ; ; byte 1+2 Foreward link to next entry ; byte 3 Status byte X.ENT= ^o200 ; Index entry follows page/chapter.. bytes X.SPG= ^o100 ; Subpage byte present X.PAG= ^o40 ; Page word present X.CH= ^o20 ; Chapter byte present X.AP= ^o10 ; Appendix byte present X.SEN= ^o7 ; these bits number subentries. ; byte 4-n Subpage/page word/chapter/appendix bytes ; byte n+1-m Index entry if X.ENT ; ; List elements stack (Do not mess with these) ; LS.CNT= 0 ; Current number LS.VSP= 1*$WORDL ; Vertical spacing LS.MRG= 2*$WORDL ; saved margin LS.SIZ= 3*$WORDL ; Size of entry ; ; Definitions for numbers ; .if df $LONG NM.MSK= ^x00FFFFFF ; Number mask NM.DEC= ^x04000000 ; Decimal NM.ALP= ^x10000000 ; Alphameric NM.ROM= ^x04000000 ; Roman numerals NM.UC= ^x02000000 ; Upper case letters NM.MC= ^x01000000 ; Mixed case letters .endc .if ndf $LONG NM.MSK= ^o007777 ; Number mask NM.DEC= ^o040000 ; Decimal NM.ALP= ^o100000 ; Alphameric NM.ROM= ^o040000 ; Roman numerals NM.UC= ^o020000 ; Upper case letters NM.MC= ^o010000 ; Mixed case letters .endc ; ; Definitions for text header (Do not mess with these) ; ; ; 1 byte= Skip before line count ; 2 byte= Status ; 3 byte= Skip after line count ; 4 byte= First spacing count ; 5 byte= Second spacing count ; 6 word= Real spaces/expandable spaces ; 7 word= Spaces before break in extra spaces ; 8 word= -1=Extra to left 0=Extra to right ; 9 word= Micro spaces to add per space ; ; ; Line header status bits (Do not mess with these) ; HD.BAR= ^o1 ; Output change bar HD.VAR= ^o2 ; Enable variable spacing HD.LIN= ^o4 ; Line to output HD.TXD= ^o40 ; Text deferred stat. ; HD.FIG= ^o100 ; Skip optional (not figure) HD.SKP= ^o200 ; Skip count only ; ; Escape sequence options (Do not mess with these) ; ES.LCK= ^o1 ; Sequence is lock/unlock sequence ES.VSP= ^o2 ; Vertical spacing param present ES.HSP= ^o4 ; Horiz spacing param present ES.PSP= ^o10 ; Spacing is permanent change ES.WRD= ^o40 ; Lock till next word ES.CHR= ^o100 ; Lock till next char ES.NUL= ^o200 ; Dummy status ; ; Tab options (Do not mess with) ; TB.R= ^o200 ; Right justify TB.L= ^o100 ; Left justify TB.C= ^o40 ; Center justify TB.CNT= ^o37 ; Ellipses count ; ; Parameters ; REQSIZ= ^o5 ; Maximum nesting of .REQ ; ; Character definitions (should not be messed with) ; BS= ^o10 ; BACKSPACE CHARACTER TAB= ^o11 ; TAB LF= ^o12 ; LIN FEED FF= ^o14 ; FORM FEED CR= ^o15 ; Carriage return character PAGCHR= ^o23 ; Page character TOCX= ^o24 ; Toc entry follows SXCHR= ^o25 ; Subindex entry follows INDX= ^o26 ; Index entry follows REPO= ^o27 ; Repeat on output TABO= ^o30 ; Internal output tab character ELIP= ^o31 ; Internal ellipses output character EOF= ^o32 ; END OF FILE ESC= ^o33 ; ESCAPE CHARACTER ULCHS= ^o34 ; UNDERLINE CHARACTER IN INTERNAL STORAGE CPER= ^o35 ; Marks period char. SPC= ^o40 ; SPACE PD= ^a/./ ; PERIOD. FOR SPECIAL SPACING AFTER PERIOD CMA= ^a/,/ ; COMMA LPUS= ^a/_/ ; LINE-PRINTER UNDERSCORE IN OUTPUT FILE SEMI= ^a/;/ ; SEMICOLON BAR= ^a/|/ ; BAR FOR CHANGE BAR dolar= ^a/$/ undsc= ^a/_/ excl= ^a/!/ zero= ^a/0/ MINUS= ^a/-/ COLON= ^a/:/ SBRA= ^a/[/ SKET= ^a/]/ LBRACE= ^a/{/ RBRACE= ^a/}/ LPAREN= ^a/(/ RPAREN= ^a/)/ PLUS= ^a/+/ PERCNT= ^a/%/ APOSTR= ^a/'/ QUOTES= ^a/"/ CIRCUM= ^a/^/ SLASH= ^a"/" BCKSL= ^a/\/ BRA= ^a// EQUAL= ^a/=/ STARR= ^a/*/ AMPERS= ^a/&/ POUND= ^a/#/ PERCT= ^a/%/ NXS= ^o177 ; NON-EXPANDABLE SPACE (INTERNAL) a= ^o101 ; Complete alphabet Upper case only b= ^o102 c= ^o103 d= ^o104 e= ^o105 f= ^o106 g= ^o107 h= ^o110 i= ^o111 j= ^o112 k= ^o113 l= ^o114 m= ^o115 n= ^o116 o= ^o117 p= ^o120 q= ^o121 r= ^o122 s= ^o123 t= ^o124 u= ^o125 v= ^o126 w= ^o127 x= ^o130 y= ^o131 z= ^o132 ; ; MACRO DEFINITIONS ; ; BIT TEST EQUAL AND BRANCH ; .MACRO BITEQ ARG1,ARG2,BDST BITL ARG1,ARG2 BEQL BDST .ENDM ; ; BIT TEST NOT EQUAL AND BRANCH ; .MACRO BITNE ARG1,ARG2,BDST BITL ARG1,ARG2 BNEQ BDST .ENDM ; ; BIT TEST EQUAL BYTE AND BRANCH ; .MACRO BITEQB ARG1,ARG2,BDST BITB ARG1,ARG2 BEQL BDST .ENDM ; ; BIT TEST NOT EQUAL BYTE AND BRANCH ; .MACRO BITNEB ARG1,ARG2,BDST BITB ARG1,ARG2 BNEQ BDST .ENDM ; ; COMPARE EQUAL AND BRANCH ; .MACRO CMPEQ ARG1,ARG2,BDST CMPL ARG1,ARG2 BEQL BDST .ENDM ; ; COMPARE NOT EQUAL AND BRANCH ; .MACRO CMPNE ARG1,ARG2,BDST CMPL ARG1,ARG2 BNEQ BDST .ENDM ; ; COMPARE EQUAL BYTE AND BRANCH ; .MACRO CMPEQB ARG1,ARG2,BDST CMPB ARG1,ARG2 BEQL BDST .ENDM ; ; COMPARE NOT EQUAL BYTE AND BRANCH ; .MACRO CMPNEB ARG1,ARG2,BDST CMPB ARG1,ARG2 BNEQ BDST .ENDM ; ; TEST EQUAL AND BRANCH ; .MACRO TSTEQ ARG1,BDST TSTL ARG1 BEQL BDST .ENDM ; ; TEST NOT EQUAL AND BRANCH ; .MACRO TSTNE ARG1,BDST TSTL ARG1 BNEQ BDST .ENDM ; ; TEST EQUAL BYTE AND BRANCH ; .MACRO TSTEQB ARG1,BDST TSTB ARG1 BEQL BDST .ENDM ; ; TEST NOT EQUAL BYTE AND BRANCH ; .MACRO TSTNEB ARG1,BDST TSTB ARG1 BNEQ BDST .ENDM ; ; SOB macro ; .macro SOB ARG1,ARG2 SOBGTR ARG1,ARG2 .endm ; ; ASH macro definition ; .macro ASH ARG1,ARG2 ASHL ARG1,ARG2,ARG2 .endm .macro INDXA ARG1 ASHL #2,ARG1,ARG1 ; Convert number to address 0,4 .endm ; ; This defines PDP-11 ASL and ASR It is only an imperfect ; simulation, since carry is always cleared. ; .MACRO ASL ARG1 ASHL #1,ARG1,ARG1 .endm .MACRO ASR ARG1 ASHL #-1,ARG1,ARG1 .endm ; ; Define unsigned divide macro ; .MACRO DIV$,ARG1,ARG2 MOVL ARG1,-(SP) ; Save first arg MOVL ARG2,R0 ; Dividend CLRL R1 EDIV (SP)+,R0,R0,R1 .endm ; ; Multiply ; .macro MUL$,ARG1,ARG2 MULL3 ARG1,ARG2,R1 .endm ; ; Define VAX conversion macros ; .opdef MOVBB ^X90,RB,WB .macro MOVB ARG1,ARG2 .if IDN ARG2 R0 CVTBL ARG1,R0 .mexit .endc .if IDN ARG2 R1 CVTBL ARG1,R1 .mexit .endc .if IDN ARG2 R2 CVTBL ARG1,R2 .mexit .endc .if IDN ARG2 R3 CVTBL ARG1,R3 .mexit .endc .if IDN ARG2 R4 CVTBL ARG1,R4 .mexit .endc .if IDN ARG2 R5 CVTBL ARG1,R5 .mexit .endc MOVBB ARG1,ARG2 .endm .macro MOV ARG1,ARG2 MOVL ARG1,ARG2 .endm .macro ADD ARG1,ARG2 ADDL ARG1,ARG2 .endm .macro SUB ARG1,ARG2 SUBL ARG1,ARG2 .endm .macro CMP ARG1,ARG2 CMPL ARG1,ARG2 .endm .macro BIC ARG1,ARG2 BICL2 ARG1,ARG2 .endm .macro BIS ARG1,ARG2 BISL2 ARG1,ARG2 .endm .MACRO BIT ARG1,ARG2 BITL ARG1,ARG2 .endm .macro INC ARG1 INCL ARG1 .endm .macro DEC ARG1 DECL ARG1 .endm .macro CLR ARG1 CLRL ARG1 .endm .macro TST ARG1 TSTL ARG1 .endm .macro NEG ARG1 MNEGL ARG1,ARG1 .endm .MACRO COM ARG1 MCOML ARG1,ARG1 .ENDM .MACRO COMB ARG1 MCOMB ARG1,ARG1 .ENDM .macro BR ARG1 BRW ARG1 .endm .macro BEQ ARG1 BEQL ARG1 .endm .macro BNE ARG1 BNEQ ARG1 .endm .macro BLT ARG1 BLSS ARG1 .endm .macro BMI ARG1 BLSS ARG1 .endm .macro BGT ARG1 BGTR ARG1 .endm .macro BLE ARG1 BLEQ ARG1 .endm .macro BGE ARG1 BGEQ ARG1 .endm .macro BHI ARG1 BGTRU ARG1 .endm .macro BLO ARG1 BLSSU ARG1 .endm .macro BLOS ARG1 BLEQU ARG1 .endm .macro BHIS ARG1 BGEQU ARG1 .endm .MACRO CALL ARG1 JSB ARG1 .ENDM .MACRO RETURN RSB .ENDM .macro .WORDA ARG1 .long ARG1 .endm .macro .blka ARG1 .blkl ARG1 .endm .macro .code .psect code,EXE,con,nowrt,shr,LONG .endm .macro .vars .psect vars,WRT,con,LONG .endm .macro .const .psect const,con,nowrt,shr,LONG .endm .macro .text .psect TEXT,con,lcl,nowrt,shr,LONG .endm .macro .strng .psect STRING,con,lcl,nowrt,shr,LONG .endm .macro .DSPCH .psect DSPTCH,con,lcl,nowrt,shr,LONG .endm .MACRO .EVEN .ALIGN LONG .ENDM .macro SEC ;Set carry BISPSW #1 .endm .macro CLC ;clear carry BICPSW #1 .endm .macro SEZ ; Set zero BISPSW #4 .endm .macro RAD arg1,arg2,arg3 .LONG <*^o50*^o50>+<*^o50>+ .endm .LIST