.NLIST ; ; REVISED BY: Chris Doran, Sira Ltd ; ; DATE: Dec-83/Jan-84 ; ; MODIFICATIONS: ; Put code in PSECT TITLE, so that it can be found in FTB's map. ; Add macro definitions for EIS instructions, defined only if ; M$$EIS isn't (in LB:[11,10]RSCMX.MAC). ; Add optional addend/subtrahend argument to INCRxx and DECRxx ; macros, to allow for changes of STEP. ; Declare subroutine name in CASE .GLOBL to stop the stupid ; assembler using op-code value for ADD, XOR, etc instead ; of a subroutine address!!! ; ; 18-APR-84 Scott Smith, Telex Computer Products ; Included global symbols from LB:[11,10]RSCMX.MAC ; and included LBLDF$ module from LB:[1,1]EXEMC.MLB. ; These are included here so that the two files in ; question will not have to be complied with each module ; when building on an RSX system and so there will be no ; question where to look for these symbols and module ; when building on a VMS system. ; ; TCI=0 ; Define to include TCI format, comment out to exclude it TASK=0 ; Define to include TASK format, comment out to exclude it TCP=0 ; Define for Telex Computer Products defaults for file ; extentions and widths VMS=0 ; Define if assembling to run under VMS compatibility mode ; ; If you are building HEX on a VMS system, uncomment the previous line and ; the folowing sections of code. ; ; ; T$$RPR=0 ; Include global defines from RSX-11M's [11,10]RSXMC.MAC. P$$OFF=0 S$$TOP=0 M$$EIS=0 A$$CLI=4. ; ; The next section of code is the LBLDF$ module from [1,1]EXEMC.MLB on ; a mapped RSX-11M V4.1 system. It is included here since EXEMC.MLB is ; not available under VMS. ; .MACRO LBLDF$ L,B ; .ASECT .=0 R$LNAM:'L'.BLKW 2 R$LSA:'L' .BLKW 1 R$LHGV:'L'.BLKW 1 R$LMXV:'L'.BLKW 1 R$LLDZ:'L'.BLKW 1 R$LMXZ:'L'.BLKW 1 R$LOFF:'L'.BLKW 1 R$LWND:'L'.BLKW 1 R$LSEG:'L'.BLKW 1 R$LFLG:'L'.BLKW 1 R$LDAT:'L'.BLKW 3 R$LSIZ:'L'.BLKW 0 LD$ACC='B'100000 LD$RSV='B'040000 LD$CLS='B'020000 LD$SUP='B'000010 LD$REL='B'000004 .=0 L$BTSK:'L'.BLKW 2 L$BPAR:'L'.BLKW 2 L$BSA:'L' .BLKW 1 L$BHGV:'L'.BLKW 1 L$BMXV:'L'.BLKW 1 L$BLDZ:'L'.BLKW 1 L$BMXZ:'L'.BLKW 1 L$BOFF:'L'.BLKW 1 L$BWND:'L'.BLKB 1 L$BSYS:'L'.BLKB 1 L$BSEG:'L'.BLKW 1 L$BFLG:'L'.BLKW 1 L$BDAT:'L'.BLKW 3 L$BLIB:'L'.BLKW <7.*>+1 L$BPRI:'L'.BLKW 1 L$BXFR:'L'.BLKW 1 L$BEXT:'L'.BLKW 1 L$BSGL:'L'.BLKW 1 L$BHRB:'L'.BLKW 1 L$BBLK:'L'.BLKW 1 L$BLUN:'L'.BLKW 1 L$BROB:'L'.BLKW 1 L$BROL:'L'.BLKW 1 .BLKW <512.-.>/2 L$BASG:'L'.BLKW 0 $LBXL='B'<8.*> TS$PIC='B'100000 TS$NHD='B'040000 TS$ACP='B'020000 TS$PMD='B'010000 TS$SLV='B'004000 TS$NSD='B'002000 TS$PRV='B'000400 TS$CMP='B'000200 TS$CHK='B'000100 TS$RES='B'000040 TS$IOP='B'000020 TS$SUP='B'000010 TS$XHR='B'000004 TS$NXH='B'000002 .PSECT .MACRO LBLDF$ X,Y .ENDM .ENDM ; ; End of code borrowed from RSX ; .MACRO ALWAYS IDENT TITLE DESC .TITLE TITLE IDENT .SBTTL TITLE - DESC .SBTTL .SBTTL LAST EDIT: IDENT .SBTTL .SBTTL .IDENT/IDENT/ .ENABL LC,GBL .PSECT TITLE,I,RO .MACRO GVNUM .ASCII/IDENT/ .ENDM .ENDM .MACRO PUSH X .IF B CLR-(6) .IFF MOV X,-(6) .ENDC .ENDM .MACRO POP X .IF B TST(6)+ .IFF MOV(6)+,X .ENDC .ENDM .MACRO KEY KEYWRD K'KEYWRD:: .ASCIZ \KEYWRD\ .ENDM .MACRO CASE CMD,?LBL MOV #K'CMD,R1 CALL MATCH BNE LBL .GLOBL CMD CALL CMD JMP 50$ LBL: .ENDM .MACRO GETKEY KEYWRD MOV #K'KEYWRD,R1 CALL MATCH .ENDM .MACRO DEFM NAME,MSG .NCHR X,NAME .IF LE X-3 NAME:: .ASCII <15>\MSG\ NAME'LEN == .-NAME .IFF .ERROR ; TOO MANY CHARACTERS IN NAME .ENDC .ENDM .MACRO OUTPUT NAME,LN .NCHR X,NAME .IF LE X-3 MOV #NAME,OUTDIR+Q.IOPL .IF B MOV #NAME'LEN,OUTDIR+Q.IOPL+2 .IFF MOV LN,OUTDIR+Q.IOPL+2 .ENDC DIR$ #OUTDIR .IFF .ERROR ; TOO MANY CHARACTERS IN NAME .ENDC .ENDM .MACRO .BLKL SIZE .IF NB .BLKW 2*SIZE .IFF .BLKW 2 .ENDC .ENDM .MACRO CLRL PLACE CLR PLACE CLR PLACE+2 .ENDM .MACRO SETNZ ADDR MOV SP,ADDR .ENDM .MACRO INCR12,ADDEND=#1 ADD ADDEND,R1 ADC R2 .ENDM .MACRO INCR34,ADDEND=#1 ADD ADDEND,R3 ADC R4 .ENDM .MACRO DECR12,SUBRND=#1 SUB SUBRND,R1 SBC R2 .ENDM .MACRO DECR34,SUBRND=#1 SUB SUBRND,R3 SBC R4 .ENDM .IF NDF M$$EIS ; Define some EIS instruction equivalents. Substitutions are sufficient for ; HEX, but by no means general-purpose. ; Caution: this SOB macro destroys flags, the real instruction doesn't. .MACRO SOB REG,DEST DEC REG BNE DEST .ENDM SOB ; SRC.XOR.DEST = (SRC.NAND.DEST).OR.(DEST.NAND.SRC) .MACRO XOR SRC,DEST MOV SRC,-(SP) BIC DEST,@SP BIC SRC,DEST BIS (SP)+,DEST .ENDM XOR ; The following instructions are replaced in-line, and should therefore never ; be used directly. .MACRO MUL SRC,DEST .ERROR ; MUL USED IN NON-EIS CODE .ENDM MUL .MACRO DIV SRC,DEST .ERROR ; DIV USED IN NON-EIS CODE .ENDM DIV ; Expand ASH. Only the special case ASH #-4 is supported, although others ; could easily be added: .MACRO ASH COUNT,REG .IF IDN,COUNT,#-4 .REPT 4 ; Shift out lo 4 bits ASR REG .ENDR .IFF .ERROR ; ASH COUNT not implemented .ENDC .ENDM ASH .ENDC ; M$$EIS .NLIST BEX,CND,TOC,SYM .LIST