.title system ;+ ; integer function system(buf) ; ; this routine spawns the command line found in buf to MCR... ; This task will not wait for the child to complete ; The DSW of the system call is returned ; ;- .mcall spwn$s .psect $r.rod,con,ro,rel,lcl,d mcr: .rad50 /MCR.../ .psect $r.roi,con,ro,rel,lcl,i .enabl lsb ap=%5 buf=2 system:: mov buf(ap),r1 ; place buffer address in r1 mov #-1,r0 ; initialize counter 10$: inc r0 ; increment counter tstb (r1)+ ; at end of string yet? bne 10$ ; NO mov buf(ap),r1 ; address of buffer spwn$s #mcr,,,,,,,,r1,r0,#0 ; spawn task mov @#$dsw,r0 ; return directive status word return .end