.TITLE MUNG - MUNG EXECUTIVE FOR ASN .IDENT -010000- ;+ ; Abstract: MUNG ; ; This program will alter the IAS V3.0 Executive for a ; multi-user system to allow the assignable device ; feature (ASN) to work. ; ; Operating procedures: ; ; This program is operated by typing: ; ; PDS> RUN MUNG ; ; The system will not be harmed by running the program ; a second time after the first time. ; ; Limitations: ; ; Extremely system-specific. It will only work on ; IAS V3.0. Timesharing systems will have some unusual ; interactions with device management: if SY0: is ; reassigned with ASN rather than with device management, ; the current version will use the redirection from ; ASN rather than that from device management. This ; limitation would not be difficult to fix, but might ; require some thought as to what would be the least ; obtuse approach as seen by the user. ; This will only work for timesharing tasks, and so ; this will not work at all on a real-time only system. ; ; Written: 30-Jan-80, -1.0.0-, Bruce C. Wright ; Modified: ; Verified: ;- .MCALL EXIT$S,QIOW$,DIR$ .ENABL LC ; V.DN = 2 V.UN = 4 V.LDN = 6 V.LUN = 10 ; MUNG:: CMP ..FDEV+20,JSRCOD ; Has the patch already been made? BEQ PATERR ; Yes, report error. MOV #/8.,R3 ; Get routine size in 8-word units CALL @#..PICV ; Pick a node without accounting BCS ERR ; Skip on error. MOV R4,JSRCOD+2 ; Set the node address. MOV #CODE,R1 ; Get code address. MOV #CODLEN,R2 ; Get length of code. 10$: MOV (R1)+,(R4)+ ; Move in the code to node SOB R2,10$ ; Loop over the code. MOV #..FDEV+20,R0 ; Point to ..FDEV code. MOV #JSRCOD,R1 ; Get JSR code MOV #JSRLEN,R2 ; And length. MOV @#PS.EXP,-(SP) ; Save ps BIS #340,@#PS.EXP ; Set pri = 7 20$: MOV (R1)+,(R0)+ ; Move in the JSR code SOB R2,20$ ; and loop over the code. MOV (SP)+,@#PS.EXP ; Restore PS EXIT$S ; and exit the system. ERR: MOV #ERRBUF,QIO+Q.IOPL ; Set buffer addr MOV #ERRLEN,QIO+Q.IOPL+2 ; and length BR DO.QIO PATERR: MOV #PATBUF,QIO+Q.IOPL ; Set buffer addr MOV #PATLEN,QIO+Q.IOPL+2 ; And length DO.QIO: DIR$ #QIO ; Report error. EXIT$S ; And leave. QIO: QIOW$ IO.WVB,5,5,,,,<0,0,40> ERRBUF: .ASCII /MUNG -- Can't pick node/ ERRLEN = .-ERRBUF PATBUF: .ASCII /MUNG -- How can I mung a munged system?/ PATLEN = .-PATBUF .EVEN CODE: MOV A.TI(R0),R5 ; Get the task's TI BIT #UC.MNT!UC.F11,U.C1(R5) ; Does it have anything there? BNE 10$ ; Yes - return. ADD #U.VA,R5 ; Get to the volume extension pointer. 5$: MOV (R5),R5 ; Get to next item in list. BEQ 10$ ; Leave if no more. CMP V.DN(R5),2(SP) ; Is name = requested device? BNE 5$ ; No - next entry. CMP V.UN(R5),4(SP) ; Is Unit number = requested device? BNE 5$ ; No - next entry. MOV V.LDN(R5),2(SP) ; Get the logical assignment MOV V.LUN(R5),4(SP) ; ditto BR CODE ; And loop. 10$: TST A.JN(R0) ; Execute the replaced instruction. RETURN ; and return to ..FDEV CODLEN = <.-CODE>/2 JSRCOD: JSR PC,@#..GIAS ; Call IASCOM dummy routine JSRLEN = <.-JSRCOD>/2 .END MUNG