🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: vmsnet.internals
Article #321

Re: Program code to SET UIC

#321
From: Arne Vajhxj
Date: Thu, 01 Oct 1992 19:51
36 lines
2100 bytes
> 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.

Both contain unnecesarry code, because

        .ENTRY  XXXXXX,^M<>
        MOVL    UIC,PCB$L_UIC(R4)
        MOVL    #SS$_NORMAL,R0
        RET

is sufficient since R4 contains the PCB address (see the documentation of
SYS$CMKRNL !).

                                                          Arne

Arne Vajhxj                             local DECNET:  KO::ARNE
Computer Department                     PSI:           PSI%23831001304030::ARNE
Business School of Southern Denmark     Internet:      ARNE@KO.HHS.DK
Technical Details
Message-ID: <01GPG4UNCG8Y8WW0G4@kopc.hhs.dk>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!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!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!news.service.uci.edu!unogate!mvb.saic.com!macro32
From: Arne Vajhxj <ARNE@ko.hhs.dk>
Newsgroups: vmsnet.internals
Subject: Re: Program code to SET UIC
Message-ID: <01GPG4UNCG8Y8WW0G4@kopc.hhs.dk>
Date: 01 Oct 1992 20:51:52 +0100
Organization: Macro32<==>Vmsnet.Internals Gateway
X-Gateway-Source-Info: Mailing List
Lines: 37