.TITLE CMDDSP ... DBSMNG pass commands to KMON program .IDENT /300783/ .ENABL LC ; ; ; Written by Ray Di Marco ; 10-Dec-82 ; ; ; Version 101283/02 ; ; ;---------------------------------------------------------------------------- ; ; This is the main module for the CMDDSP program. CMDDSP allows a DBSMNG ; application menu to pass commands to the RT-11 or TSX-plus keyboard ; monitor for execution. The commands are passed from the application ; menu to CMDDSP via DBSMNG's Core Common area. CMDDSP can only be executed ; as part of a DBSMNG CUSP chain. The following lines in a MENU Format ; file ; ; $CLB:CMDDSP$$ ; invoke CMDDSP Cusp ; $IBYE$$ ; log of user ; ; can be used to log off a TSX-plus user. ; ; .SBTTL Modifications ; ; 30-Jul-83 add in RSTS/E support ; .SBTTL Declarations ; .MCALL .PRINT,.EXIT ; RT-11 emts ; JSW = 44 ; address Job Status Word J.CHN = 400 ; JSW chained to bit J.CMD = 4000 ; JSW command for KMON bit CC.CMD = 546 ; holds ^RCMD if commands in CC CC.PNT = 550 ; points to commands ; .PSECT CODE ; open code area ; ====== ==== ; .MACRO ABORT CND,TXT,?.A,?.B,?.C,?.D .IIF NB,CND, B'CND .B JMP .D .B': .PRINT #'.C .EXIT .C': .ASCIZ /CMDDSP-fatal-/|'TXT'|/!/ .EVEN .D': .ENDM ABORT ; ; .SBTTL Code ; ; CMDDSP can only be invoked from MENU as part of a CUSP Chain; insure that ; have been chained to and that MENU has setup required data structures. ; ST: BIT #J.CHN,@#JSW ; insure chained to ABORT EQ, CMP #^RCMD,@#CC.CMD ; insure CC initialized ABORT NE, TSTB @CC.PNT ; insure CC loaded ABORT MI, ; ; Copy commands setup by MENU in core-common into RT-11's command passing ; area if under RT11, or into CCLBUF if under RSTS/E. ; MOV @#CC.PNT,R0 ; R0 = fetch pointer MOV #512,R1 ; R1 = store pointer MOV @#54,R5 ; R5 -> RMON MOV 374(R5),R5 ; USR size = 0? BNE 1100$ ; no --> under RT-11 MOV #CCLBUF,R1 ; yes -> under RSTS/E 1100$: MOVB (R0)+,(R1)+ ; copy data BMI 2000$ ; exit if hit EOD CMP R0,#1000 ; reached EOB? BLO 1100$ ; no --> loop ABORT , ; ; Terminate command string and test to see if under RSTS/E or RT11 ; 2000$: CLRB -(R1) ; insure buffer terminated TST R5 ; under RSTS/E? BEQ 5000$ ; yes -> skip ; ; Pass control to RT11's KMON to execute commands. ; SUB #512,R1 ; R1 = number command bytes MOV R1,@#510 ; setup for KMON BIS #J.CMD,@#JSW ; indicate command CLR R0 ; setup for KMON .EXIT ; pass control to KMON ; ; Pass control to RSTS/E CCL interpretor ; 5000$: MOV #CCLBUF,R0 ; R0 -> CCL EMT 367 ; pass control to RSTS/E ABORT , CCLBUF: .BLKB 200. .END ST