<< LINES .001/.009 ARE RESERVED FOR SYSTEMS INTEGRATION>>               00005000
$control map,code,uslinit                                               00010000
<< miscsegc - module 95 >>                                              00015000
<< hp32002c mpe source c.00.00 >>                                       00020000
<< COPYRIGHT     "(C) COPYRIGHT HEWLETT-PACKARD CO. 1980.           >>  00025000
<<     this program may be used with one computer system at a       >>  00030000
<<     time and shall not otherwise be recorded, transmitted or     >>  00035000
<<     stored in a retrieval system.  copying or other reproduction >>  00040000
<<     of this program except for archival purposes is prohibited   >>  00045000
<<     without the prior written consent of hewlett-packard company.>>  00050000
<< **** note - dollar copyright cannot be used with this module *** >>  00055000
$control segment=miscsegc,main=miscsegc                                 00060000
$control privileged ,map, code                                          00065000
                                                                        00070000
begin                                                                   00075000
                                                                        00080000
                                                               <<jb.iv>>00085000
define asmb=assemble#,                                         <<jb.iv>>00090000
       disable=asmb(sed 0)#,                                   <<jb.iv>>00095000
       enable=asmb(sed 1)#,                                    <<jb.iv>>00100000
       pdisable=asmb(psdb)#,                                   <<jb.iv>>00105000
       penable=asmb(pseb)#,                                    <<jb.iv>>00110000
       exchdb=asmb(xchd 0)#,                                   <<jb.iv>>00115000
       setclock=asmb(sclk)#;                                   <<jb.iv>>00120000
                                                               <<jb.iv>>00125000
define trapoff = push(status);   <<disable trap>>              <<p8731>>00130000
                 tos.(2:1) := 0;                               <<p8731>>00135000
                 set(status)#,                                 <<p8731>>00140000
        trapon = push(status);   <<enable trap>>               <<p8731>>00145000
                 tos.(2:1) := 1;                               <<p8731>>00150000
                 set(status)#;                                 <<p8731>>00155000
                                                               <<p8731>>00160000
integer x=x,                                                   <<jb.iv>>00165000
        s0=s-0,                                                <<jb.iv>>00170000
        s1=s-1,                                                <<jb.iv>>00175000
        s2=s-2,                                                <<jb.iv>>00180000
        s3=s-3,                                                <<jb.iv>>00185000
        s4=s-1,                                                <<jb.iv>>00190000
        s5=s-5;                                                <<jb.iv>>00195000
                                                               <<jb.iv>>00200000
logical ls0=s-0;                                               <<jb.iv>>00205000
                                                               <<jb.iv>>00210000
integer status=q-1;                                            <<jb.iv>>00215000
                                                               <<jb.iv>>00220000
                                                               <<jb.iv>>00225000
equate ccl=1,                                                  <<jb.iv>>00230000
       cce=2,                                                  <<jb.iv>>00235000
       ccg=0;                                                  <<jb.iv>>00240000
                                                               <<jb.iv>>00245000
define cc=status.(6:2)#;                                       <<jb.iv>>00250000
                                                               <<jb.iv>>00255000
                                                               <<jb.iv>>00260000
                                                               <<jb.iv>>00265000
<<fixed cells>>                                                <<jb.iv>>00270000
                                                               <<jb.iv>>00275000
equate cstp=0,                                                 <<jb.iv>>00280000
       cstxp=1,                                                <<jb.iv>>00285000
       dstp=2,                                                 <<jb.iv>>00290000
       ics'qi=5,                                               <<jb.iv>>00295000
       ics'zi=6;                                               <<jb.iv>>00300000
                                                               <<jb.iv>>00305000
                                                               <<jb.iv>>00310000
<<sysglob cells>>                                              <<jb.iv>>00315000
                                                               <<jb.iv>>00320000
                                                               <<jb.iv>>00325000
equate sysbase=%1000,                                          <<jb.iv>>00330000
       slix=1,                                                 <<jb.iv>>00335000
       syssl=sysbase+slix,                                     <<jb.iv>>00340000
       dstix=2,                                                <<jb.iv>>00345000
       sysdst=sysbase+dstix,                                   <<jb.iv>>00350000
       pcbix=3,                                                <<jb.iv>>00355000
       syspcb=sysbase+pcbix,                                   <<jb.iv>>00360000
       lpdtix=%10,                                             <<jb.iv>>00365000
       syslpdt=sysbase+lpdtix,                                 <<jb.iv>>00370000
       cstxblkix=%51;                                          <<c9076>>00375000
                                                               <<jb.iv>>00380000
<<table pointers (lst access)>>                                <<jb.iv>>00385000
                                                               <<jb.iv>>00390000
integer pointer sl=slix,                                       <<jb.iv>>00395000
                dst=dstix,                                     <<jb.iv>>00400000
                pcb=pcbix,                                     <<jb.iv>>00405000
                lpdt=lpdtix,                                   <<jb.iv>>00410000
                cstxblk=cstxblkix;                             <<c9076>>00415000
$include inclst                                                         00420000
$include inclpcb5                                              <<06652>>00425000
                                                               <<jb.iv>>00430000
$include inclobj                                               <<c9076>>00435000
$include incldrq                                               <<c9076>>00440000
$include inclcdef                                              <<c9076>>00445000
$include inclldr                                               <<c9076>>00450000
                                                               <<jb.iv>>00455000
equate memovrflow=0, <<abortprocess codes>>                    <<jb.iv>>00460000
       makepresioerr=1;                                        <<jb.iv>>00465000
                                                               <<jb.iv>>00470000
                                                                        00475000
<<------------------------------------------------------------------->> 00480000
                                                                        00485000
double procedure attachio(p1,p2,p3,p4,p5,p6,p7,p8,p9);                  00490000
   value p1,p2,p3,p4,p5,p6,p7,p8,p9;                                    00495000
   integer p1,p2,p3,p4,p5,p6,p7,p8,p9;                                  00500000
   option external;                                                     00505000
                                                                        00510000
<<------------------------------------------------------------------->> 00515000
                                                                        00520000
procedure sysbreak;option external;                                     00525000
                                                                        00530000
<<------------------------------------------------------------------->> 00535000
                                                                        00540000
procedure terminate;option external;                                    00545000
                                                                        00550000
<<------------------------------------------------------------------->> 00555000
                                                                        00560000
                                                               <<jb.iv>>00565000
procedure queueonsegment(segident);                            <<jb.iv>>00570000
value segident;                                                <<jb.iv>>00575000
logical segident;                                              <<jb.iv>>00580000
option external;                                               <<jb.iv>>00585000
                                                               <<jb.iv>>00590000
                                                               <<jb.iv>>00595000
procedure help;                                                <<jb.iv>>00600000
option external;                                               <<jb.iv>>00605000
procedure crash'(why);                                         <<jb.iv>>00610000
value why;                                                     <<jb.iv>>00615000
integer why;                                                   <<jb.iv>>00620000
option external;                                               <<jb.iv>>00625000
                                                               <<jb.iv>>00630000
                                                                        00635000
comment  this function is called to monitor and/or collect              00640000
         performance measurement data;                                  00645000
procedure suddendeath(n);                                      <<jb.iv>>00650000
value n;                                                       <<jb.iv>>00655000
integer n;                                                     <<jb.iv>>00660000
option external;                                               <<jb.iv>>00665000
                                                               <<jb.iv>>00670000
integer procedure convextlabeltodeltap(plabel);                <<jb.iv>>00675000
value plabel;                                                  <<jb.iv>>00680000
integer plabel;                                                <<jb.iv>>00685000
option external;                                               <<jb.iv>>00690000
                                                               <<jb.iv>>00695000
procedure wait(waitf,specialinfo);                             <<jb.iv>>00700000
value waitf,specialinfo;                                       <<jb.iv>>00705000
integer waitf,specialinfo;                                     <<jb.iv>>00710000
option external;                                               <<jb.iv>>00715000
                                                               <<jb.iv>>00720000
procedure impede(who);                                         <<jb.iv>>00725000
value who;                                                     <<jb.iv>>00730000
integer who;                                                   <<jb.iv>>00735000
option external;                                               <<jb.iv>>00740000
                                                               <<jb.iv>>00745000
procedure clear'psif(pcbpt,flag);                              <<jb.iv>>00750000
value pcbpt,flag;                                              <<jb.iv>>00755000
integer pcbpt;                                                 <<jb.iv>>00760000
logical flag;                                                  <<jb.iv>>00765000
option external;                                               <<jb.iv>>00770000
procedure abort(a,b,c);                                        <<jb.iv>>00775000
value a,b,c;                                                   <<jb.iv>>00780000
integer a,b,c;                                                 <<jb.iv>>00785000
option external;                                               <<jb.iv>>00790000
                                                               <<06954>>00795000
double procedure mappedcsttophycst(plabl,pinp);                <<06954>>00800000
   value plabl,pinp;                                           <<06954>>00805000
   integer plabl,pinp;                                         <<06954>>00810000
   option external;                                            <<06954>>00815000
                                                               <<jb.iv>>00820000
integer procedure family(pin,lastpin);                                  00825000
value pin,lastpin;                                                      00830000
integer pin,lastpin;                                                    00835000
option privileged,uncallable;                                           00840000
                                                                        00845000
comment: returns a member of the sub tree such that                     00850000
         ,if called iteratively, using the last value returned          00855000
         as pin, the entire sub tree can be described.                  00860000
         the last element is given by family=lastpin.                   00865000
         uncallable.                                                    00870000
      ;                                                                 00875000
                                                                        00880000
begin                                                                   00885000
integer                                                        <<06652>>00890000
   pcbpt;                                                      <<06652>>00895000
                                                               <<06652>>00900000
pcbpt := pin * pcbsize;                                        <<06652>>00905000
if soninfo <> 0 then                                           <<06652>>00910000
   family := soninfo/pcbsize                                   <<06652>>00915000
else                                                           <<06652>>00920000
   if brotherinfo <> 0 then                                    <<06652>>00925000
      family := brotherinfo/pcbsize                            <<06652>>00930000
   else                                                        <<06652>>00935000
      if pin = lastpin then                                    <<06652>>00940000
         family := lastpin                                     <<06652>>00945000
      else                                                     <<06652>>00950000
         begin                                                 <<06652>>00955000
         do                                                    <<06652>>00960000
            pcbpt := fatherinfo                                <<06652>>00965000
         until fatherinfo/pcbsize = logical(lastpin) or        <<06652>>00970000
               brotherinfo  = 0;                               <<06652>>00975000
         family := if brotherinfo <> 0 then                    <<06652>>00980000
                      brotherinfo/pcbsize                      <<06652>>00985000
                   else                                        <<06652>>00990000
                      lastpin;                                 <<06652>>00995000
         end;                                                  <<06652>>01000000
                                                               <<06652>>01005000
end; << procedure family >>                                    <<06652>>01010000
<<thiscpu detects the current type of cpu in execution>>       <<01.02>>01015000
<<and returns a value:                                >>       <<01.02>>01020000
<<       0  if series i                               >>       <<01.02>>01025000
<<       1  if series ii                              >>       <<01.02>>01030000
<<       2  if toothpick                              >>       <<01.02>>01035000
<<       3  if series iii                             >>       <<rk2mb>>01040000
<<       4  if icf/44                                 >>                01045000
<<       5  if icf/55                                 >>                01050000
integer procedure thiscpu;                                     <<01.02>>01055000
  option privileged;   << this procedure should be callable. >><<01891>>01060000
  begin                                                        <<01.02>>01065000
    integer x=x;                                               <<01.02>>01070000
    tos:=0;         <<initialize return (series i)>>           <<01.02>>01075000
    tos:=-1;        <<test flag - illegal bank #  >>           <<01.02>>01080000
    push(db);       <<1 word on series i          >>           <<01.02>>01085000
                    <<2 words on series ii/toothpick>>         <<01.02>>01090000
    del;            <<don't need db address       >>           <<01.02>>01095000
    if tos <> -1 then <<was bank # pushed?        >>           <<01.02>>01100000
      begin         <<yes - not series i          >>           <<01.02>>01105000
        del;        <<delete test flag            >>           <<01.02>>01110000
        del;        <<delete return value         >>           <<rk2mb>>01115000
        assemble(con %020362); <<get microcode cpu #>>         <<01.02>>01120000
        x:=tos;                                                <<rk2mb>>01125000
        if x=1 then tos:=1 <<series ii>                        <<rk2mb>>01130000
          else if x=2 then tos:=3 <<series iii>>               <<rk2mb>>01135000
            else if x= 8 then tos:=2 <<series 33>>            <<icf55>> 01140000
              else if x= 3 then tos:=4 <<icf/44>>                       01145000
                else if x=4 then tos:=5 <<icf/55>>                      01150000
                  else if x=5 then tos:=6 <<series 37>>        <<c8288>>01155000
                    else suddendeath(13); <<bad micro return>> <<c8288>>01160000
                                                               <<rk2mb>>01165000
      end;                                                     <<01.02>>01170000
    thiscpu:=tos;  <<return value>>                            <<01.02>>01175000
  end;    << end thiscpu >>                                    <<01.02>>01180000
                                                                        01185000
                                                                        01190000
                                                                        01195000
                                                                        01200000
                                                                        01205000
integer procedure get'dsdevice (ldev);                          <<3.00>>01210000
comment:  this procedure retrieves entries from the             <<3.00>>01215000
          dsdevice table. (in the ds global dataseg)            <<3.00>>01220000
          functional return:                                    <<3.00>>01225000
            -2 = no dslines configured                          <<3.00>>01230000
            -1 = illegal ldev passed                            <<3.00>>01235000
             0 = non ds related device                          <<3.00>>01240000
             1 = ds related cs device                           <<3.00>>01245000
             2 = ds device                                      <<3.00>>01250000
             3 = ds pseudo terminal;                            <<3.00>>01255000
                                                                <<3.00>>01260000
value ldev;                                                     <<3.00>>01265000
integer ldev;                                                   <<3.00>>01270000
option privileged,uncallable <<,unreadable>>;                   <<3.00>>01275000
begin                                                           <<3.00>>01280000
equate  base'word    =  %2;                                     <<3.00>>01285000
pointer sysdb        =  %0,                                     <<3.00>>01290000
        dst'base     =  %2;                                     <<3.00>>01295000
integer pointer lpdt = %10;                                     <<3.00>>01300000
define  devtype      = (12:4)        #,                         <<3.00>>01305000
        dst'size     = dst'base(1)   #,                         <<3.00>>01310000
        numldevs     = lpdt(0)#,                               <<06676>>01315000
        dsglobaldst  = sysdb(%320)   #;                         <<3.00>>01320000
integer dsglobal'bank,dsglobal'base,table'base;                 <<3.00>>01325000
                                                                <<3.00>>01330000
if dsglobaldst = 0 then                                         <<3.00>>01335000
   begin                                                        <<3.00>>01340000
   get'dsdevice := -2;                                          <<3.00>>01345000
   return;                                                      <<3.00>>01350000
   end;                                                         <<3.00>>01355000
                                                                <<3.00>>01360000
if 1 <= ldev <= numldevs then                                   <<3.00>>01365000
   begin                                                        <<3.00>>01370000
   trapoff;  <<to prevent interger overflow>>                  <<p8731>>01375000
   dsglobal'bank := dst'base (dst'size*dsglobaldst+2);         <<01877>>01380000
   dsglobal'base := dst'base (dst'size*dsglobaldst+3);          <<3.00>>01385000
                                                                <<3.00>>01390000
<< get the dsdevice base from the dataseg header  >>            <<3.00>>01395000
                                                                <<3.00>>01400000
   tos := dsglobal'bank;                                        <<3.00>>01405000
   tos := dsglobal'base+base'word;                              <<3.00>>01410000
   assemble (lsea);                                             <<3.00>>01415000
                                                                <<3.00>>01420000
<< dsdevice table offset is now on top of stack   >>            <<3.00>>01425000
                                                                <<3.00>>01430000
   table'base := tos;                                           <<3.00>>01435000
   tos := dsglobal'bank;                                        <<3.00>>01440000
   tos := dsglobal'base+table'base+ldev;                        <<3.00>>01445000
   assemble (lsea);                                             <<3.00>>01450000
   get'dsdevice := tos.devtype;                                 <<3.00>>01455000
   end                                                          <<3.00>>01460000
else                                                            <<3.00>>01465000
   get'dsdevice := -1;                                          <<3.00>>01470000
end;  << get'dsdevice >>                                        <<3.00>>01475000
integer procedure wheres'db;                                   <<06954>>01480000
option privileged,uncallable;                                  <<06954>>01485000
                                                               <<06954>>01490000
comment  to determine where db is currently pointing.  this    <<06954>>01495000
         procedure  returns  information  to  the  calling     <<06954>>01500000
         procedure via the function return and condition code  <<06954>>01505000
         as follows:                                           <<06954>>01510000
                                                               <<06954>>01515000
         current              function          condition code <<06954>>01520000
          db at:               return:            returned:    <<06954>>01525000
                                                               <<06954>>01530000
         stack                stack dst #            cce       <<06954>>01535000
         extra data segment     xdst #               ccg       <<06954>>01540000
         absolute memory      %077777 (=pascal nil)  ccl       <<06954>>01545000
                                                               <<06954>>01550000
         tables accessed:                                      <<06954>>01555000
            pcb - current entry,                               <<06954>>01560000
                     word dbxdsinfowordnum, fields             <<06954>>01565000
                       absdbflag   = absolute db bit           <<06954>>01570000
                       xdsdstfield = xds number                <<06954>>01575000
                     word stkinfowordnum, fields               <<06954>>01580000
                       stkdstfield = stack dst #               <<06954>>01585000
                  the current entry in the pcb is accessed     <<06954>>01590000
                  via low core word 4, equated to cpcb.        <<06954>>01595000
                                                               <<06954>>01600000
;                                                              <<06954>>01605000
                                                               <<06954>>01610000
begin                            <<procedure wheres'db>>       <<06954>>01615000
                                                               <<06954>>01620000
logical pcbpt;                   <<peg onto include file>>     <<06954>>01625000
                                                               <<06954>>01630000
pcbpt := curprc;                                               <<06954>>01635000
if lpcb(pcbpt+dbxdsinfowordnum).absdbflag then<<test adb bit>> <<06954>>01640000
  begin                      <<db at absolute memory>>         <<06954>>01645000
  cc := ccl;                                                   <<06954>>01650000
  wheres'db := %077777;                                        <<06954>>01655000
  end                                                          <<06954>>01660000
else begin                                                     <<06954>>01665000
  wheres'db := spcbxdsdst;                                     <<06954>>01670000
  if = then                                                    <<06954>>01675000
    begin                <<db at stack>>                       <<06954>>01680000
    wheres'db := spcbstkdst;                                   <<06954>>01685000
    cc := cce;                                                 <<06954>>01690000
    end                                                        <<06954>>01695000
  else  cc := ccg;        <<db at xdst >>                      <<06954>>01700000
  end                                                          <<06954>>01705000
                                                               <<06954>>01710000
end;    <<procedure wheres'db>>                                <<06954>>01715000
$page                                                          <<06954>>01720000
integer procedure stack'dst;                                   <<06954>>01725000
option privileged,uncallable;                                  <<06954>>01730000
                                                               <<06954>>01735000
comment  returns the stack dst number for the current process. <<06954>>01740000
                                                               <<06954>>01745000
         tables accessed:                                      <<06954>>01750000
            pcb:  current entry                                <<06954>>01755000
                                                               <<06954>>01760000
;                                                              <<06954>>01765000
                                                               <<06954>>01770000
begin                                                          <<06954>>01775000
logical pcbpt;             <<to peg onto include file>>        <<06954>>01780000
                                                               <<06954>>01785000
pcbpt := curprc;                                               <<06954>>01790000
stack'dst := spcbstkdst;                                       <<06954>>01795000
end;       << procedure stack'dst>>                            <<06954>>01800000
$page                                                          <<06954>>01805000
integer procedure dst'size (dstn);                             <<06954>>01810000
value dstn;                                                    <<06954>>01815000
integer dstn;                                                  <<06954>>01820000
option privileged,uncallable;                                  <<06954>>01825000
                                                               <<06954>>01830000
comment  returns the size of the specified dst.                <<06954>>01835000
                                                               <<06954>>01840000
         input:  dstn = dst number of data segment whose size  <<06954>>01845000
                        is to be returned.                     <<06954>>01850000
                                                               <<06954>>01855000
         function return:  true size in words of the data      <<06954>>01860000
                           segment.                            <<06954>>01865000
                                                               <<06954>>01870000
       condition code return:                                  <<06954>>01875000
             cce - request granted                             <<06954>>01880000
             ccg - dstn is an unassigned dst number            <<06954>>01885000
             ccl - dstn is not within valide dst number range  <<06954>>01890000
                                                               <<06954>>01895000
         tables accessed:                                      <<06954>>01900000
            dst:  dst entry for data segment number dstn,      <<06954>>01905000
                  word 0.(3:13) = size/4.                      <<06954>>01910000
;                                                              <<06954>>01915000
                                                               <<06954>>01920000
begin                                                          <<06954>>01925000
                                                               <<06954>>01930000
  if 1 <= dstn <= dst(0) then            << dstn is in range >><<06954>>01935000
    begin                                                      <<06954>>01940000
      dst'size := dst(dstn&lsl(2)).datasizefield&lsl(2);       <<06954>>01945000
      if <> then                                               <<06954>>01950000
        cc := cce                                              <<06954>>01955000
      else cc := ccg;                                          <<06954>>01960000
    end                                                        <<06954>>01965000
  else cc := ccl;                                              <<06954>>01970000
end;       << procedure dst'size >>                            <<06954>>01975000
$page                                                          <<06954>>01980000
integer procedure max'dst'size( dstn);                         <<06954>>01985000
   value   dstn;                                               <<06954>>01990000
   integer dstn;                                               <<06954>>01995000
   option privileged,uncallable;                               <<06954>>02000000
                                                               <<06954>>02005000
<<***********************************************>>            <<06954>>02010000
<< returns the maximum size in words of the dst  >>            <<06954>>02015000
<<   cce - request granted                       >>            <<06954>>02020000
<<   ccg - dstn is an unassigned dst                           <<06954>>02025000
<<   ccl - dstn is not within valid dst range    >>            <<06954>>02030000
<<***********************************************>>            <<06954>>02035000
                                                               <<06954>>02040000
begin                                                          <<06954>>02045000
   if ( 0 <= dstn <= dst(0) ) then                             <<06954>>02050000
      if dst(dstn&lsl(2)) <> %100000 then                      <<06954>>02055000
         begin                                                 <<06954>>02060000
            cc:=cce;                                           <<06954>>02065000
            max'dst'size := dst(dstn&lsl(2)+1).vmalloc         <<06954>>02070000
         end                                                   <<06954>>02075000
      else cc:=ccg                                             <<06954>>02080000
   else cc:=ccl;                                               <<06954>>02085000
end;                                                           <<06954>>02090000
$page                                                          <<06954>>02095000
logical procedure get'sys'priv (cstn);                         <<06954>>02100000
value cstn;                                                    <<06954>>02105000
integer cstn;                                                  <<06954>>02110000
option privileged,uncallable;                                  <<06954>>02115000
                                                               <<06954>>02120000
comment  determines if the specified code segment (cstn) is    <<06954>>02125000
         privileged code and if it is system code.  this       <<06954>>02130000
         information is found in the cst or cstx entry for     <<06954>>02135000
         the code segment.  if cstn is an sl segment then the  <<06954>>02140000
         cst is accessed.  if cstn is a program segment then   <<06954>>02145000
         the cstx is accessed.  within a cst or cstx entry:    <<06954>>02150000
              word 0.(1:1) = privileged bit                    <<06954>>02155000
              word 1.(6:1) = system code bit.                  <<06954>>02160000
                                                               <<06954>>02165000
         input:  cstn.(8:8) = code segment number of interest. <<06954>>02170000
                 cstn.(0:1) = mapping flag.                    <<06954>>02175000
                                                               <<06954>>02180000
         function return word:                                 <<06954>>02185000
              (0:14) = 0                                       <<06954>>02190000
              (14:1) = 1 if system code, else 0                <<06954>>02195000
              (15:1) = 1 if privileged,  else 0                <<06954>>02200000
                                                               <<06954>>02205000
         tables accessed:   cst                                <<06954>>02210000
                            cstx.                              <<06954>>02215000
                                                               <<06954>>02220000
         (note:  processes without cstxs should not call this  <<06954>>02225000
          procedure with mapping flag equal to 0.)             <<06954>>02230000
                                                               <<06954>>02235000
;                                                              <<06954>>02240000
begin               <<procedure get'sys'priv>>                 <<06954>>02245000
                                                               <<06954>>02250000
logical privbit,    <<privileged  bit from cst/cstx entry>>    <<06954>>02255000
        sysbit;     <<system code bit from cst/cstx entry>>    <<06954>>02260000
integer cstbase;    <<base of cst/cstx depending on cstn type>><<06954>>02265000
                                                               <<06954>>02270000
get'sys'priv := 0;           << initialize. >>                 <<06954>>02275000
tos := mappedcsttophycst (cstn,0);                             <<06954>>02280000
if <> then                                                     <<06954>>02285000
  begin                                                        <<06954>>02290000
    cc:=ccl;                                                   <<06954>>02295000
    return;                                                    <<06954>>02300000
  end;                                                         <<06954>>02305000
if s1.(0:4) = objidsltype then   << sl segment, use cst >>     <<06954>>02310000
  begin                                                        <<06954>>02315000
    if sl(s0*4) = %100000 then                                 <<06954>>02320000
      begin                                                    <<06954>>02325000
        cc:=ccg;                                               <<06954>>02330000
        return;                                                <<06954>>02335000
      end;                                                     <<06954>>02340000
    privbit := sl(s0*4).privmodeflag;                          <<06954>>02345000
    sysbit := sl(s0*4+1).systemflag;                           <<06954>>02350000
  end                                                          <<06954>>02355000
else                                                           <<06954>>02360000
  begin                                                        <<06954>>02365000
    pdisable;                                                  <<06954>>02370000
    if dst(cstxblk(s0.(4:12))) = %100000 then                  <<06954>>02375000
      begin                                                    <<06954>>02380000
        cc:=ccg;                                               <<06954>>02385000
        penable;                                               <<06954>>02390000
        return;                                                <<06954>>02395000
      end;                                                     <<06954>>02400000
    privbit := dst(cstxblk(s0.(4:12))).privmodeflag;           <<06954>>02405000
    sysbit  := dst(cstxblk(s0.(4:12))+1).systemflag;           <<06954>>02410000
    penable;                                                   <<06954>>02415000
  end;                                                         <<06954>>02420000
get'sys'priv.(14:1) := sysbit;                                 <<06954>>02425000
get'sys'priv.(15:1) := privbit;                                <<06954>>02430000
                                                               <<06954>>02435000
end;                <<procedure get'sys'priv>>                 <<06954>>02440000
$control segment=main                                          <<06954>>02445000
end.                                                           <<06954>>02450000
