1 .title LDRUTIL - Obtain ucb for assigned channel
3 ; LDRUTIL - VMS UCB LDR bit utility library
5 ; TECSys Development, Inc., April 1998
7 ; This file may be copied under the terms and conditions of version 2
8 ; of the GNU General Public License, as published by the Free
9 ; Software Foundation (Cambridge, Massachusetts).
11 ; This program is distributed in the hope that it will be useful,
12 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ; GNU General Public License for more details.
16 ; You should have received a copy of the GNU General Public License
17 ; along with this program; if not, write to the Free Software
18 ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
21 .link "sys$system:sys.stb"/selective_search
22 .library /sys$share:lib/
24 .NTYPE ...IS_IT_ALPHA,R22 ;Get the type of R22
25 ...IS_IT_ALPHA = <...IS_IT_ALPHA@-4&^XF>-5
26 .IIF EQ,...IS_IT_ALPHA, ALPHA=1
36 .psect $$code,exe,rd,nowrt,shr
38 .entry finducb,^m<r2,r3,r4,r5,r6,r7,r8,r9> ;Find UCB address from channel
40 .call_entry, 2,home_args=TRUE,-
41 preserve=<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11>,-
45 movzwl 4(AP),r0 ;prep to find UCB
46 jsb g^IOC$VERIFYCHAN ;callable from user mode!
48 movl CCB$L_UCB(r1),@8(AP) ;save UCB address
53 .entry __setldr,^m<r2,r3,r4,r5,r6,r7,r8,r9> ;Find UCB address from channel
55 .call_entry, 2,home_args=TRUE,-
56 preserve=<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11>,-
61 bisl #DEV$M_LDR,UCB$L_DEVCHAR2(r1)
66 .entry _setldr,^m<r2,r3,r4,r5,r6,r7,r8,r9> ;Find UCB address from channel
68 .call_entry, 2,home_args=TRUE,-
69 preserve=<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11>,-
79 .entry __clrldr,^m<r2,r3,r4,r5,r6,r7,r8,r9> ;Find UCB address from channel
81 .call_entry, 2,home_args=TRUE,-
82 preserve=<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11>,-
87 bicl #DEV$M_LDR,UCB$L_DEVCHAR2(r1)
92 .entry _clrldr,^m<r2,r3,r4,r5,r6,r7,r8,r9> ;Find UCB address from channel
94 .call_entry, 2,home_args=TRUE,-
95 preserve=<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11>,-