Article View: alt.sys.pdp10
Article #15GETTAB vs GETAB in T10/T20 and getting sysinfo
From: jayjwa
Date: Sat, 21 Nov 2026 17:26
Date: Sat, 21 Nov 2026 17:26
157 lines
7821 bytes
7821 bytes
I'm working on a project and I need to get some system info. The program
should run under TOPS-10 and TOPS-20 both and is in assembly. I wrote it
for TOPS-10, thinking that the UUOSYM package would handle the support
for T20. This has been mostly true, with exception for GETTAB/GETAB. T20
uses SYSGT/GETAB instead. This has resulted in my using conditional
assembly, depending on what system the program is being built for.
I need the following data points that are fetchable via GETTAB in T10,
but not in T20:
* last reload reason
* system memory size
* number of jobs logged in
According to the MCRM, that info seems like it should be in the SYSTAT
table. I've been looking in the MCRM book for days and I can't find the
place to get this info. Basically, the T10 part of the program works;
the T20 part is missing the above data points or returning incorrect
data in the case of the number of jobs logged in. The real number should
be around a dozen.
Since the program is long and messy, I'll only post the routine that
handles this part of the program (unless the full thing really is needed
to find an answer). Location DEBUG+3 is an example of the wrong data
being returned. I tried "51" and a whole bunch of other table
locations. Nothing in the manual specifically says "number of running
jobs" like it does in the T10 MCR manual.
subttl GETTAB Tables Routine
; Get various data points via GETTAB or GETAB monitor call.
; TOPS-10 and TOPS-20 do not share this info, even with UUOSYM.
; This means we have to fetch the same info in a different way
; depending on the system we're assembling for. Ouch.
getcnf: IFG TOPS10, <
move t1, [%CNWHY] ; Why monitor was reloaded
gettab t1, ; Fetch data point
jrst [ERROUT (%CNWHY)] ; Exit on error
movem t1, rereas ; Stash reload reason
OUTSIX (rereas)
outstr crlf
move t1, [%CNSIZ] ; System memory size in words
gettab t1,
jrst [ERROUT (%CNSIZ)]
movem t1, memsiz ; Stash memory size
outstr [asciz /System memory size (words): /]
move p1, memsiz ; Fetch memsiz
movei p2, 12 ; Decimal output I guess?
push p, p1 ; Push param on stack for itoa
push p, p2 ; Indicate base
pushj p, itoa ; Prints to TTY
outstr crlf
move t1, [%CNLNM] ; Number of jobs logged in
gettab t1,
jrst [ERROUT (%CNLNM)]
movem t1, numjob ; Stash num of jobs logged in
outstr [asciz /Number of jobs logged in: /]
move p1, numjob ; Fetch numjob
movei p2, 12 ; Num jobs output in decimal
push p, p1 ; Push param on stack for itoa
push p, p2 ; Indicate decimal base
pushj p, itoa ; Print to TTY
outstr crlf
move t1, [%CNVER] ; Monitor version number
gettab t1,
jrst [ERROUT (%CNVER)]
movem t1, monver ; Stash monitor version number
outstr [asciz /Monitor version: /]
move p1, monver ; Fetch monver integer
movei p2, 10 ; This is octal, believe it or not
push p, p1 ; Setup itoa
push p, p2 ; Ensure octal output
pushj p, itoa ; Print to TTY
outstr crlf
> ; End of T10-specific code
IFG TOPS20, <
; TOPS-20 uses GETAB%, not GETTAB. See section 2.3.2 MCRM. Table numbers
; are listed via MONSYM (Appendix B-31) or ask SYSGT% for them.
debug: move t1, [sixbit /SYSTAT/] ; Request SYSTAT table number
sysgt%
hrrz t1, t2 ; Load returned table number
hrli t1, 51 ; Number of jobs?
getab% ; Index,, table number
jrst [ERROUT (GETAB)]
movem t1, numjob ; Stash processes
outstr [asciz /Number of jobs logged in: /]
move p1, numjob ; Fetch numjob
movei p2, 12 ; Num jobs output in decimal
push p, p1 ; Push param on stack for itoa
push p, p2 ; Indicate decimal base
pushj p, itoa ; Print to TTY
outstr crlf
setz cx, ; Zero looper index
move t1, [sixbit /SYSVER/] ; Ask for this table number
sysgt% ; SIXBIT name in T1
get.1:! hrrz t1, t2 ; Load table number, zero rest
hrl t1, cx ; Index increments upward
getab% ; Index into table,, table num
jrst [ERROUT (GETAB)] ; If error
movem t1, monver(cx) ; Else stash mon ver ASCIZ
INC (cx)
caige cx, mversz ; Filled monitor name block?
jrst get.1 ; Loop for more otherwise
outstr monver ; Print
> ; End of T20-specific code
popj p, ; Return to caller
Basically, the T20 code block doesn't work correctly (aside from the
monitor version part - I did figure that out) on T20. T10 works.
.exec 10ftch
LINK: Loading
[LNKXCT 10FTCH execution]
""8"" 8"""88 8""""8 8""""8 88 eeeeee
8 8 8 8 8 8 8 8 8
8e 8 8 8eeee8 8eeeee 8 8 8
88 8 8 88 88 eeee 8 8 8
88 8 8 88 e 88 8888 8 8
88 8eeee8 88 8eee88 8888 8eeee8
Active PPN: 30,1
TTY Line: TTY4
POWER
System memory size (words): 105472
Number of jobs logged in: 15
Monitor version: 70400
@exec 10ftch
MACRO: 10ftch
LINK: Loading
[LNKXCT 10FTCH execution]
""8"" 8"""88 8""""8 8""""8 eeee eeeeee
8 8 8 8 8 8 8 8 8
8e 8 8 8eeee8 8eeeee 8 8 8
88 8 8 88 88 eeee eee8 8 8
88 8 8 88 e 88 8 8 8
88 8eeee8 88 8eee88 8eee 8eeee8
Active PPN: 30,1
TTY Line: TTY44
Number of jobs logged in: 284
AMATSU KLH, PANDA TOPS-20 Monitor 7.1(21733)-4
Yeah, that "jobs" data is not correct and I have no idea where to get
the 'last reload reason' nor system memory size from. How to get those 3
data points for last reload, system memory size, and number of jobs
running from within my program?
--
PGP Key ID: 781C A3E2 C6ED 70A6 B356 7AF5 B510 542E D460 5CAE
"The Internet should always be the Wild West!"
Technical Details
Message-ID:
<87ecce9jtt.fsf@atr2.ath.cx>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: jayjwa <jayjwa@atr2.ath.cx.invalid> Newsgroups: alt.sys.pdp10 Subject: GETTAB vs GETAB in T10/T20 and getting sysinfo Date: Sat, 21 Nov 2026 12:26:54 -0500 Organization: Atr2 RG 2026 Message-ID: <87ecce9jtt.fsf@atr2.ath.cx> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: solani.org; logging-data="282782"; mail-complaints-to="abuse@news.solani.org" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:489HOH3WnZ81NW/TOIR8ls1sWzw= sha1:IdhLsKuGOWoRWeeVqjesrtSX5ds= X-User-ID: eJwNycEBwCAMAsCVig1Exmmq2X8Eve/xFfRniAo2exV7LmAmPRLP8u0be8DNksSoz+ENsl0HDqYQjw==