1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
.title LDRUTIL - Obtain ucb for assigned channel
.ident /LDRUTIL V1.0/
; LDRUTIL - VMS UCB LDR bit utility library
;
; TECSys Development, Inc., April 1998
;
; This file may be copied under the terms and conditions of version 2
; of the GNU General Public License, as published by the Free
; Software Foundation (Cambridge, Massachusetts).
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
;
;
.link "sys$system:sys.stb"/selective_search
.library /sys$share:lib/
.NTYPE ...IS_IT_ALPHA,R22 ;Get the type of R22
...IS_IT_ALPHA = <...IS_IT_ALPHA@-4&^XF>-5
.IIF EQ,...IS_IT_ALPHA, ALPHA=1
$ssdef
$ucbdef
$ccbdef
$chfdef
$dcdef
$devdef
$pcbdef
.psect $$code,exe,rd,nowrt,shr
.IF NDF,ALPHA
.entry finducb,^m<r2,r3,r4,r5,r6,r7,r8,r9> ;Find UCB address from channel
.IFF
.call_entry, 2,home_args=TRUE,-
preserve=<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11>,-
output=<r0,r1>,-
label=finducb
.endc
movzwl 4(AP),r0 ;prep to find UCB
jsb g^IOC$VERIFYCHAN ;callable from user mode!
blbc r0,20$
movl CCB$L_UCB(r1),@8(AP) ;save UCB address
movzbl #1,r0
20$: ret
.IF NDF,ALPHA
.entry __setldr,^m<r2,r3,r4,r5,r6,r7,r8,r9> ;Find UCB address from channel
.IFF
.call_entry, 2,home_args=TRUE,-
preserve=<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11>,-
output=<r0,r1>,-
label=__setldr
.endc
movl 4(AP),r1
bisl #DEV$M_LDR,UCB$L_DEVCHAR2(r1)
movzbl #1,r0
ret
.IF NDF,ALPHA
.entry _setldr,^m<r2,r3,r4,r5,r6,r7,r8,r9> ;Find UCB address from channel
.IFF
.call_entry, 2,home_args=TRUE,-
preserve=<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11>,-
output=<r0,r1>,-
label=_setldr
.endc
$cmkrnl_s -
routin = __setldr,-
arglst = (AP)
ret
.IF NDF,ALPHA
.entry __clrldr,^m<r2,r3,r4,r5,r6,r7,r8,r9> ;Find UCB address from channel
.IFF
.call_entry, 2,home_args=TRUE,-
preserve=<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11>,-
output=<r0,r1>,-
label=__clrldr
.endc
movl 4(AP),r1
bicl #DEV$M_LDR,UCB$L_DEVCHAR2(r1)
movzbl #1,r0
ret
.IF NDF,ALPHA
.entry _clrldr,^m<r2,r3,r4,r5,r6,r7,r8,r9> ;Find UCB address from channel
.IFF
.call_entry, 2,home_args=TRUE,-
preserve=<r2,r3,r4,r5,r6,r7,r8,r9,r10,r11>,-
output=<r0,r1>,-
label=_clrldr
.endc
$cmkrnl_s -
routin = __clrldr,-
arglst = (AP)
ret
.end
|