.title impath ;+ ; subroutine impath(buf) ;- .psect st_impath_data rel,con,gbl,noexe,wrt,rd,pic,noshr,usr,novec,long spath: .asciz "~usr/" .asciz "~bin/" .byte 10,0 spathl=.-spath buf=4 path=5 ; same as PATH in ~bin/symbols dtype: .long path ; desire tooldr in pathname format .psect st_pure_code rel,con,lcl,exe,nowrt,rd,pic,shr,usr,novec,long .entry impath ^m movl buf(ap),r2 ; destination address clrb (r2)+ ; EOS => search cwd first pushal dtype ; desire pathname format pushl r2 ; buffer for tooldr calls #2,tooldr ; fetch tools directory info 20$: tstb (r2)+ ; at end of tools directory yet? bneq 20$ ; NO moval spath,r1 ; source array address movl #spathl,r0 ; length of array 10$: movb (r1)+,(r2)+ ; copy character sobgtr r0,10$ ; do again ret .end