.title getmsg ; ; this routine implements the following interface ; ; n = getmsg(buf) ; ; a rcv$t macro call is attempted first. If this fails, oldmak is ; called to getmcr of prompt for arguments ; .mcall tcsmc$ tcsmc$ ; mcall other TCS macros ap=%5 buf=2 sdb: sdbdf$ ,255. ; send data block pblk: .byte 1,0 ; parameter block for oldmak call .blkw 1 getmsg:: rcv$t #sdb,buf(ap) ; receive arguments bcs getold ; c set => go call oldmak mov buf(ap),r1 ; buffer address mov r1,r2 ; mov (r1)+,r0 ; place count in r0 mov r0,r3 ; beq trmn8 ; if == 0, terminate string 10$: movb (r1)+,(r2)+ ; copy character sob r3,10$ ; do next one trmn8: clrb (r2) ; terminate with 0-byte br done getold: mov buf(ap),pblk+2 ; build Fortran call block call oldmak ; GMCR or prompt done: return .end