;-*-macro-*- .title spoolset setup buffer for a call to symbiont manager .ident /01/ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; spoolset setup buffer for call to symbiont manager ; ; ; ; usage log = spoolset (file_spec, buffer) ; ; where spoolset returns the rms status code ; ; file_spec is any legal vms file specification ; ; (no wild cards, please) ; ; buffer is the area of the buffer send to the ; ; symbiont manager that holds the devname ; ; through the filename. ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; eos = 0 .psect spool_data, lcl, noexe, noshr, con, pic, rel, wrt esasiz = 180 esablk: .blkb esasiz ; esa for wild card searches rsasiz = 180 ; the rsa is passed in, it is assumed rsablk: .blkb rsasiz ; to be 180 bytes long namblk: $nam esa = esablk, ess = esasiz, rsa = rsablk, rss = rsasiz fabblk: $fab nam = namblk .psect spoolset, con, exe, lcl, pic, rel, shr, nowrt .entry spoolset, ^m movl 4(ap), r2 ; pull in the string spec movl r2, fabblk+fab$l_fna ; load in file name locc #eos, #rsasiz, (r2) ; calculate its length subl3 r0, #rsasiz, fabblk+fab$b_fns ; load in the length $parse fab = fabblk ; parse it blbc r0, 30$ $search fab = fabblk ; search for the files blbc r0, 30$ movl r0, r5 ; save rms status movl 8(ap), r2 ; the buffer fo the result movl #namblk+nam$t_dvi, r3 ; device name movq (r3)+,(r2)+ ; a hack to replace a single movq (r3),(r2)+ ; movo (no emulator this way) movw namblk+nam$w_fid_num, (r2)+ ; file id movw namblk+nam$w_fid_seq, (r2)+ movw namblk+nam$w_fid_rvn, (r2)+ movw namblk+nam$w_did_num, (r2)+ ; directory id movw namblk+nam$w_did_seq, (r2)+ movw namblk+nam$w_did_rvn, (r2)+ movl #rsablk, r3 locc #^a']', #180, (r3) ; find end of directory spec incb r1 ; point to beyond the ']' clrl r4 subb3 r3, r1, r4 ; find length of dev and dir subb3 r4, namblk+nam$b_rsl, r4 ; find lenght of filename movb r4, (r2)+ ; pass it out 10$: movb (r1)+,(r2)+ ; move over filename sobgeq r4,10$ movl r5, r0 ; restore rms status 30$: ret .end