.TITLE ASKC ; ; .IDENT /Y07.00/ ; ; ; .ENABL LC ; ; ; Copyright (C) Shell Research Ltd. 1983 ; ; ; The copyright in this computer program and associated user ; instructions contained in this document is the property of ; Shell Research Ltd.. No guarantee is given or may be implied ; as to the adequacy of the program or its suitability for any ; particular purpose and no liability is accepted for any loss ; or damage arising out of its use. ; ; ; ; Version: Y07 ; ; ; Author: R J Carpenter 12-Jul-83 ; ; ; Revised: Ray Carpenter 29-Feb-84 ; ; .page .sbttl code ; ; .globl $askac,iskfs,$askpd ; .psect $ask$ ; askc:: ; iaskc:: call $askac ;call arg. checker clr r0 ;asume failure tstb qmax ;max ie char length, defined ? beq 99$ ;immediate exit if not ; 10$: mov 4(r5),-(sp) ;save users char. addr mov #qlin,4(r5) ;fake user address mov r5,-(sp) ;save input r5 call iskfs ;call appropriate routine mov (sp)+,r5 ;restore original r5 mov (sp)+,4(r5) ;restore original vaiable address tst r0 ;test return status bmi 99$ ;br on error ; mov @10(r5),r0 ;length to pad to call $askpd ;go pad string in qlin mov @10(r5),r2 ;number of bytes to copy mov #qlin,r0 ;input address mov 4(r5),r1 ;recover real output addr. 20$: movb (r0)+,(r1)+ ;copy to user dec r2 ;dec loop counter bne 20$ ;br if not all done ; ; mov ipoint,r0 ;recover string length 99$: return ;return to caller ; ; .end