.TITLE GCII Get CLI Information .IDENT "V1.1" .ENABL LC .PSECT C$CODE ;+ ; Index GCII Get CLI Information ; ; Usage ; ; #include ; #include ; struct gcibuf clidat; /* CLI info buffer */ ; rad50 clinam[2]; /* RAD50 CLI name (optional) */ ; char *tiname; /* TI: Device name string */ ; word tiunit; /* TI: Unit number */ ; word status; /* Returned DSW */ ; ; status = gcii(&clidat, clinam, tiname, tiunit); ; ; Notes: ; Terminal and CLI names are optional. Do not specify ; both. See the notes in the Executive Manual. ; ; This directive takes the TI: device name as a string, ; rather than 2 ASCII characters packed into a word. ; ; [end] ;- ; Edits: ; V1.0 30-Aug-82 RBD Initial Edit ; V1.1 20-Oct-82 RBD Change P-Sections. Fix documentation. ; .mcall gcii$s gcii:: mov sp,r0 ; r0 --> calling stack mov r2,-(sp) ; Save R2 clr r2 ; Do move bytes unsigned mov 6(r0),r1 ; r1 --> device name string beq 10$ ; (no TI: name) bisb 1(r1),r2 ; Get high byte of device name swab r2 ; Move it into place bisb (r1),r2 ; Get low byte 10$: gcii$s 2(r0),#40,4(r0),r2,10(r0) mov (sp)+,r2 ; Restore r2 mov $dsw,r0 ; Return DSW return .end