Trailing-Edge
-
PDP-10 Archives
-
tops10_tools_bb-fp64b-sb
-
10,7/klbpa/klbpa.mac
There are 4 other files named klbpa.mac in the archive. Click here to see a list.
TITLE KLBPA %1(1) KL-10 BACKGROUND PERFORMANCE ANALYSIS CONTROLLER
COMMENT \
Copyright (C) 1979
Digital Equipment Corporation, Maynard, Massachusetts, U.S.A.
This software is furnished under a license and may be used and copyed only
in accordance with the terms of such license and with the inclusion of the
above copyright notice. This software or any other copies thereof may not
be provided or otherwise made available to any other person. No title to
and ownership of the software is hereby transferred.
The information in this software is subject to change without notice and
should not be construed as a commitment by Digital Equipment Corporation.
Digital assumes no responsibility for the use or reliability of its
software on equipment which is not supplied by Digital.
\
;ASSEMBLY INSTRUCTIONS:
;
; .LOAD KLBPA
; .NSSAVE
;
;ASSUMES MACTEN.UNV, JOBDAT.UNV, UUOSYM.UNV, AND SCNMAC.UNV ON UNV:
; SCAN.REL, HELPER.REL, AND WILD.REL ON REL:
SEARCH MACTEN,JOBDAT,UUOSYM,SCNMAC
%%JOBD==%%JOBD ;SHOW VERSION
%%SCNM==%%SCNM ; ..
.REQUE REL:SCAN
.REQUE REL:WILD
.REQUE REL:HELPER
SALL
;VERSION INFORMATION
CSTVER==0 ;CUSTOMER VERSION
MAJVER==1 ;DEC VERSION
MINVER==0 ;DEC MINOR VERSION
EDTVER==1 ;DEC EDIT VERSION
LOC <.JBVER=:137>
EXP <BYTE (3)CSTVER(9)MAJVER(6)MINVER(18)EDTVER>
TWOSEG 600000 ;START FOR "PURE" SEGMENT
RELOC 600000 ;GET THERE
RELOC 0 ;AND INTO "IMPURE" SEGMENT
;REVISION HISTORY
;1 RDH 3-FEB-79
; FIRST CREATED 3-FEB-79
SUBTTL REGISTER DEFINITIONS
T1=1 ;THE USUAL TEMPS
T2=2
T3=3
T4=4
P1=5 ;THE USUAL "PRESERVED"S
P2=6
P3=7
P4=10
P=17 ;AND THE STACK POINTERS
;DEFINE OUR STACK
ND PDLEN,^D20 ;WE'RE A SMALL PROGGIE
SUBTTL "LOW SEG" DATA DEFINITIONS
PDLST: BLOCK PDLEN ;OUR STACK
;SWITCH (COMMAND) LOCS
BOSWT: ;START OF SWITCH AREA TO INITIALIZE
S.CLEA: BLOCK 1 ;.GT. 0 THEN CLEAR OLD COUNTS
S.TICK: BLOCK 1 ;.GT. 0 THEN TICKS PER SAMPLE INTERVAL
EOSWT: BLOCK 1 ;END OF SWITCH AREA TO INITIALIZE
;THE PERF. BLOCK
PRFBLK: BLOCK 4 ;ARG BLOCK FOR PERF.
SUBTTL START UP AND INITIALIZATION
RELOC 600000 ;BACK TO "PURE" CODE
KLBPA: JFCL ;NO CCL (YET ANYWAY)
MOVE P,[IOWD PDLEN,PDLST] ;SETUP THE ALL-IMPORTANT STACK
RESET ;"STOP THE WORLD" - FAILSA
SETZ T1, ;NO CCL COMMANDS, ETC.
PUSHJ P,.ISCAN## ;INITIALIZE SCANER
KLBPA2: SETOM BOSWT ;INITIALIZE SWITCHES TO -1
MOVE T1,[BOSWT,,BOSWT+1] ;BLT POINTER TO
BLT T1,EOSWT ;INITIALIZE ALL SWITCHES
MOVE T1,[4,,[IOWD BPASWL,BPASWN
XWD BPASWD,BPASWM
XWD 0,BPASWP
SIXBIT/KLBPA/]]
PUSHJ P,.VSCAN## ;GO PARSE COMMANDS
HALT .
HALT .
;COMMAND PROCESSORS
;ENABLE/DISABLE CPUN
;CALLED FROM .VSCAN:
;
; MOVX P3,<YES/NO>
; PUSHJ P,SCPU0-SCPU5 OR SCALL
; NEVER
; ALWAYS
;
;ON ERROR A MESSAGE IS ISSUED.
;
;RETURN IS CPOPJ1 ALWAYS
SCPU0: MOVSI T1,0 ;CPU NUMBER
HRRI T1,6(P3) ;NO/YES SETTING
PJRST SCPUN
SCPU1: MOVSI T1,1 ;CPU NUMBER
HRRI T1,6(P3) ;NO/YES SETTING
PJRST SCPUN
SCPU2: MOVSI T1,2 ;CPU NUMBER
HRRI T1,6(P3) ;NO/YES SETTING
PJRST SCPUN
SCPU3: MOVSI T1,3 ;CPU NUMBER
HRRI T1,6(P3) ;NO/YES SETTING
PJRST SCPUN
SCPU4: MOVSI T1,4 ;CPU NUMBER
HRRI T1,6(P3) ;NO/YES SETTING
PJRST SCPUN
SCPU5: MOVSI T1,5 ;CPU NUMBER
HRRI T1,6(P3) ;NO/YES SETTING
PJRST SCPUN
SCALL: MOVX T4,%CNCPU ;GETTAB ENTRY TO
GETTAB T4, ;GET NUMBER OF CPU'S FOR SYSTEM
MOVEI T4,1 ;FAILED???
SCALL2: MOVSI T1,-1(T4) ;GET A CPU NUMBER
HRRI T1,6(P3) ;NO/YES SETTING
PUSHJ P,SCPUN ;TURN OFF/ON THIS CPU
HALT . ;BETTER NOT EVER GET HERE
SOJG T4,SCALL2 ;LOOP FOR ALL CPUS
JRST .POPJ1## ;DONE THEM ALL
SCPUN: MOVEI T2,3 ;LENGTH OF PERF. BLOCK
MOVEM T2,PRFBLK+.PMLEN;SET LENGTH
MOVX T2,PM.KL ;KL ONLY (THAT WE KNOW ABOUT)
MOVEM T2,PRFBLK+.PMCPU;SET IN CPU TYPES WORD
HLLZ T2,T1 ;CPU NUMBER
SKIPLE S.CLEA ;WANT TO CLEAR OLD VALUES FIRST?
TXO T2,PM.CLR ;YES
MOVEM T2,PRFBLK+.PMMOD;SET CPU NUMBER AND FLAGS WORD
SKIPG T2,S.TICK ;GET SAMPLING INTERVAL
MOVX T2,AD.TIC ;NONE SPECIFIED
; MOVEM T2,PRFBLK+.PMTIC;SET INTERVAL
MOVEM T2,PRFBLK+3 ;SET INTERVAL (WAITING FOR UUOSYM)
HRLZ T2,T1 ;FUNCTION OFF/ON
HRRI T2,PRFBLK ;ADDRESS OF FUNCTION CONTROL BLOCK
MOVE T1,[1,,T2] ;ADDRESS OF FUNCTION BLOCK LIST
PERF. T1, ;TURN OFF/ON
CAIA ;FAILED
JRST .POPJ1## ;SUCCESS
;ISSUE ERROR MESSAGE
OUTSTR [ASCIZ\? Cant turn o\] ;FIRST PART OF MESSAGE
HLRZ T2,T2 ;FUNCTION CODE
CAIN T2,6 ;TURN OFF?
OUTSTR [ASCIZ\ff\] ;YES
CAIN T2,7 ;TURN ON?
OUTSTR [ASCIZ\n\] ;YES
OUTSTR [ASCIZ\ CPU\] ;MORE MESSAGE
HLRZ T2,PRFBLK+.PMMOD;GET CPU NUMBER
ADDI T2,"0" ;ASCIIZE
OUTCHR T2 ;IDENTIFY WHICH CPU
OUTSTR [ASCIZ\; (\] ;START TEXT EXPLANATION
OUTSTR @ERRTAB(T1) ;CAP OFF MESSAGE
OUTSTR [ASCIZ\
\]
JRST .POPJ1## ;AND RETURN
;ERROR MESSAGES FOR PERF. FAILURE
ERRTAB: [ASCIZ\0) Unknown\]
[ASCIZ\1) Incorrect cpu specification\]
[ASCIZ\2) Non-existant cpu\]
[ASCIZ\3) Improper mode\]
[ASCIZ\4) Meter not setup\]
[ASCIZ\5) Meter in use\]
[ASCIZ\6) Meter is running\]
[ASCIZ\7) Bad job number\]
[ASCIZ\10) Meter not running\]
[ASCIZ\11) Function not implemented\]
[ASCIZ\12) Incorrect function code\]
[ASCIZ\13) Requires privileges\]
;THE COMMANDS -- FIRST DEFAULTS AND MAXIMUMS
DM TIC,^D60,1,1
;THE COMMANDS -- NAMES AND PROCESSORS
DEFINE SWTCHS,<
SN ALL,<*P,<7777B11+SCALL>>,FS.NFS
SN CLEAR,S.CLEA,FS.NFS
SN CPU0,<*P,<7777B11+SCPU0>>,FS.NFS
SN CPU1,<*P,<7777B11+SCPU1>>,FS.NFS
SN CPU2,<*P,<7777B11+SCPU2>>,FS.NFS
SN CPU3,<*P,<7777B11+SCPU3>>,FS.NFS
SN CPU4,<*P,<7777B11+SCPU4>>,FS.NFS
SN CPU5,<*P,<7777B11+SCPU5>>,FS.NFS
SP TICKS,S.TICK,.SWDEC##,TIC,FS.NFS
> ;END OF SWTCHS MACRO
;EXPAND SWITCHES
DOSCAN(BPASW)
END KLBPA