.TITLE GMCR Get MCR Command Line .IDENT "V1.2" .ENABL LC .PSECT C$CODE ;+ ; Index GMCR Get MCR Command Line ; ; Usage ; *********************** ; *** NON RE-ENTRANT *** ; *********************** ; ; #include ; char *cmdlin; /* Must be a pointer */ ; ; cmdlin = gmcr(); ; ; ; Description ; ; This function departs from the usual CX library convention ; of keeping the functions re-entrant. The GMCR$ directive ; itself is non-reentrant; the DPB receives the actual command ; line, the address of which is passed to the caller unless ; there was an error. ; ; Notes ; ; Returns address of first byte of command line or NULL if failed. ; ; $DSW contains character count of gotten cmd line if success, else ; the DSW error code. See the appropriate Exec Reference Manual. ; ; [end] ;- ; Edits: ; V1.0 12-Jun-80 RBD Initial Edit ; V1.1 20-Oct-82 RBD Change P-Sections. Fix documentation. ; V1.2 19-Jan-87 JMC Change .psect for I/D space. ; .mcall gmcr$ dir$ .psect c$data,d ;1.2 gmcrb: gmcr$ ;Make the DPB and buffer. .psect c$code gmcr:: mov #g.mcrb,r0 ;Assume success, return buffer pointer. dir$ #gmcrb ;Give it a try bcc 10$ clr r0 ;Failed, return NULL pointer. 10$: return .end