🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: vmsnet.internals
Article #302

RE: Program code to SET UIC

#302
From: GAVRON
Date: Wed, 30 Sep 1992 18:00
48 lines
2212 bytes
Date sent:  30-SEP-1992 10:57:55


>I need to write a little routine to change UIC for an arbitrary, captive
>user.  Fortunately, INFO-VAX has been following this for the last few days,
>and has produced the following CMKRNL routines:
>
>(1)     .ENTRY  KERNEL, ^M<R2,R3,R4>            ;Save our registers
>        JSB     SMP$GET_CURPCB                  ;Get ther current PCB
>        MOVL    NEWUIC,PCB$L_UIC(R4)            ;Tweak its little UIC
>        MOVZWL  #SS$_NORMAL,R0                  ;Return happy
>        RET                                     ; as a little bird
>
>(2)     .ENTRY  CMKRTN, ^M<>                    ;Registers, what registers
>        MOVL    G^CTL$GL_PCB,R0                 ;GET THE PCB ADDRESS
>        MOVL    UIC, PCB$L_UIC(R0)              ;GET THE NEW UIC
>        MOVL    #SS$_NORMAL,R0                  ;SET OK RETURN CODE
>        RET                                     ;BACK
>
>Personally, I like (2) best, since I cannot see what the hell happens
>when I JSB to SMP$GET_CURPCB (what with no listings or fiche).
>
>I throw this out to the MACRO32 list for ideas and comments.

SMP$GET_CURPCB is an undocumented could-go-away-at-any-time entry point.
However, I would rewrite the second piece of code as:

        .entry  setuic,^m<>
        movl    uic,pcb$l_uic(r4)
        movl    #ss$_normal,r0
        ret

        Note: SYS$CMKRNL automatically puts the PCB address in R4

>Thanks in advance,
>
>
> Louis B. Moore                      Internet: lbmoore@tchden.org
> Systems Programmer                  Phone:    +1 303 837 2513
> The Children's Hospital of Denver   Denver, Colorado USA 80218


        Ehud

--
Ehud Gavron        (EG76)
gavron@vesta.sunquest.com
"The world bores you when you're cool."
Technical Details
Message-ID: <920930110024.8b@VESTA.SUNQUEST.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!spool.mu.edu!olivea!decwrl!sdd.hp.com!usc!news.service.uci.edu!unogate!mvb.saic.com!macro32

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!spool.mu.edu!olivea!decwrl!sdd.hp.com!usc!news.service.uci.edu!unogate!mvb.saic.com!macro32
From: GAVRON@VESTA.SUNQUEST.COM
Newsgroups: vmsnet.internals
Subject: RE: Program code to SET UIC
Message-ID: <920930110024.8b@VESTA.SUNQUEST.COM>
Date: 30 Sep 92 18:00:24 GMT
Organization: Macro32<==>Vmsnet.Internals Gateway
Lines: 48
X-Gateway-Source-Info: Mailing List