.title appred ;+ ; subroutine appred(int, c, file, buf) ;- ap=%5 int=2 c=4 file=6 buf=10 .psect $r.roi,con,ro,rel,lcl,i .enabl lsb appred:: mov buf(ap),r1 ; address of buffer 10$: tstb (r1)+ ; find end of string bne 10$ ; ... tstb -(r1) ; went one too far movb #' ,(r1)+ ; copy a blank movb @c(ap),(r1)+ ; copy c movb @c(ap),(r1)+ ; copy c mov file(ap),r0 ; address of file spec 20$: movb (r0)+,(r1)+ ; copy characters of file spec bne 20$ ; until EOS has been copied call close ; close the file return .end