From: SMTP%"MACRO32@WKUVX1.BITNET" 21-JUL-1993 12:43:14.37 To: EVERHART CC: Subj: Re: CHMx codes X-ListName: "VMS Internals, MACRO, & BLISS Discussions" Warnings-To: <> Errors-To: MacroMan@WKUVX1.BITNET Sender: MacroMan@WKUVX1.BITNET Date: 21 Jul 1993 12:34:26 -0500 (EST) From: "Brian J. Schenkenberger, VAXman" Reply-To: MACRO32@WKUVX1.BITNET Subject: Re: CHMx codes To: MACRO32 Message-ID: <01H0SYPMZBCM90MVR4@MONMOUTH-ETDL1.ARMY.MIL> X-VMS-To: IN%"@ulkyvm.louisville.edu:MACRO32@WKUVX1.BITNET" MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT >The subject line doesn't say all that much about it. >Can anyone tell me where to find the CHMx codes? >IE. If you see the instruction CHMK #5, where to find out >what routine the 5 refers to. I'm looking specificially >for CHMS codes in this case, but have wanted to know the >CHMK codes before too. I know the CHMS vectors are handled >differently (CTL$GL_CMSUPR?) than the CHMK vectors, but >I can't find any obvious mapping between the numbers and >the routines. I've looked all through the [v55.sys*.lis] >files and don't see any obvious place where it is layed out. The Change mode operands are not fixed under version V5.x.!!!! They could change from reboot to reboot. They are calculated when the system service vector is initialize during bootstrap and the loading of the Loadable Executive Images which support the service function. The change mode operand will become a quadword index into an array known as the 'change mode dispatch' array. Each entry defines the number of arguments to the service, the argument list size, a code for 'disposition' at the completion of the service, and the address of the service routine. The base of this array can not be easily located since the change mode handler itself may be positioned anywhere in the system space. If you really want to associate the change mode operand value with a routine try the following: $ ANALYZE/SYSTEM SDA> READ/EXEC SDA> EXAM/INST EXE$CMODKRNL;40 (or EXE$CMODEXEC) Several instructions into the display you will see a MOVAQ instruction. For example: EXE$CMODKRNL: MOVL (SP)+,R0 EXE$CMODKRNL+00003: BEQL EXE$CMODEXEC+00079 EXE$CMODKRNL+00005: PUSHAB EXE$CMODKRNL+00080 EXE$CMODKRNL+00009: MOVZBL R0,R1 EXE$CMODKRNL+0000C: MOVL @#CTL$GL_PCB,R4 EXE$CMODKRNL+00013: PUSHL FP EXE$CMODKRNL+00015: PUSHL AP EXE$CMODKRNL+00017: MOVAQ BUG$REBOOT+00B41[R1],R1 ^^^^^^^^^^^^^^^^ EXE$CMODKRNL+0001D: CLRQ -(SP) EXE$CMODKRNL+0001F: MOVL SP,FP EXE$CMODKRNL+00022: CMPW R0,BUG$REBOOT+00B31 The underlined portion is the base address of the dispatch table. Each entry is 8 bytes. The IDSM V5.2 manual explains this in chapter 6. BTW- if you have the listings, checkout SYS$DOINIT for starters. BJS- /Brian Schenkenberger/Schenkenberg@Eisner.DECUS.Org/ VMS is Bliss / /VMS Software Support/Vitronics, Inc./Eatontown, NJ/(908) 542-0600/ /Independent Consult./Tmesis Consulting/Jackson, NJ/(908) 363-7551/ /@Monmouth-ETDL1.Army.Mil/CIS: 70253,114/