.title SET_LOGICAL .ident /01.2/ ;******************************************************************************* ;* Set_logical * ;* This routine is intended to set all the necessary logical names for * ;* correct user context switch. * ;******************************************************************************* ; .library /SYS$LIBRARY:LIB.MLB/ ; $psldef $lnmdef ; .psect lnm_data, noexe, pic, noshr, wrt ;+ ; Data for logical name redefinition ;- proc_direc: .ascid /LNM$PROCESS_DIRECTORY/ group_log: .ascid /LNM$GROUP/ job_table: .ascid /LNM$JOB/ proc_table: .ascid /LNM$PROCESS_TABLE/ sys_disk: .ascid /SYS$DISK/ sys_scratch: .ascid /SYS$SCRATCH/ sys_login: .ascid /SYS$LOGIN/ sys_login_dev: .ascid /SYS$LOGIN_DEVICE/ krnl_mode: .byte PSL$C_KERNEL krnl_mode_str: .ascid /KERNEL/ exec_mode: .byte PSL$C_EXEC exec_mode_str: .ascid /EXECUTIVE/ supr_mode: .byte PSL$C_SUPER supr_mode_str: .ascid /SUPERVISOR/ user_mode: .byte PSL$C_USER user_mode_str: .ascid /USER/ lnm_item: lnm_buf_len: .word 16 .word LNM$_STRING lnm_buf_adr: .address group_table .address retlength .long 0 ; End of item list lnm_ctrl_str: .ascid /LNM$GROUP_!6OL/ grp_tab_des: .long 16 .address group_table group_table: .byte 32[16] retlength: .long 0 ; Dummy return length ; ; ; .psect lnm_code, exe, pic, shr, nowrt ; .entry set_logical, ^m ; movl 4(ap), r11 ; Save the device string movl 8(ap), r10 ; Save the default directory str movl 12(ap), r9 ; Save the group ; pushl r9 pushab grp_tab_des pushab lnm_buf_len pushab lnm_ctrl_str calls #4, g^sys$fao ; Format the group table name ; $crelnm_s - tabnam = proc_direc, - lognam = group_log, - acmode = krnl_mode, - itmlst = lnm_item ; Redefine group table in KRNL blbs r0, 10$ ; pushl r0 pushal krnl_mode_str pushal group_log pushl #2 pushl #SETUSER_CRELNMFAIL calls #5, g^lib$signal ; 10$: movw (r10), lnm_buf_len ; Move home dir into item list movl 4(r10), lnm_buf_adr ; - for the following logicals $crelnm_s - tabnam = job_table, - lognam = sys_login, - acmode = exec_mode, - itmlst = lnm_item ; Define SYS$LOGIN in EXEC blbs r0, 20$ ; pushl r0 pushal exec_mode_str pushal sys_login pushl #2 pushl #SETUSER_CRELNMFAIL calls #5, g^lib$signal ; 20$: $crelnm_s - tabnam = job_table, - lognam = sys_scratch, - acmode = exec_mode, - itmlst = lnm_item ; Define SYS$SCRATCH in EXEC blbs r0, 30$ ; pushl r0 pushal exec_mode_str pushal sys_scratch pushl #2 pushl #SETUSER_CRELNMFAIL calls #5, g^lib$signal ; 30$: movw (r11), lnm_buf_len ; Move home device into itm_list movl 4(r11), lnm_buf_adr ; - for the following logicals $crelnm_s - tabnam = job_table, - lognam = sys_login_dev, - acmode = exec_mode, - itmlst = lnm_item ; Define SYS$LOGIN_DEVICE in EXEC blbs r0, 40$ ; pushl r0 pushal exec_mode_str pushal sys_login_dev pushl #2 pushl #SETUSER_CRELNMFAIL calls #5, g^lib$signal ; 40$: $crelnm_s - tabnam = proc_table, - lognam = sys_disk, - acmode = exec_mode, - itmlst = lnm_item ; Define SYS$DISK in EXEC blbs r0, 50$ ; pushl r0 pushal exec_mode_str pushal sys_disk pushl #2 pushl #SETUSER_CRELNMFAIL calls #5, g^lib$signal ; 50$: $crelnm_s - tabnam = proc_table, - lognam = sys_disk, - acmode = supr_mode, - itmlst = lnm_item ; Define SYS$DISK in SUPER blbs r0, 60$ ; pushl r0 pushal supr_mode_str pushal sys_disk pushl #2 pushl #SETUSER_CRELNMFAIL calls #5, g^lib$signal ; 60$: movl #1, r0 ; We completed successfully ret ; .end