.title GETID Get identifier from the command line .ident /V1.00/ .sbttl Documentation ; ; This subroutine will get an identifier from the ; command line, based on the label in the command tables. ; It will then take that text and get its integer value ; from the PARSE_UIC subroutine. ; ; For the AUTH_ID (IAF) package ; ; Eric F. Richards ; 22-Apr-86 ; Gould OSD VAXcluster VMS V4.3 ; .sbttl Macros, constants and other insiginificant stuff .enable suppression ; make listings cleaner .disable traceback, debug ; hands off w/debugger $ssdef ; Define system service codes .macro clrsp space, fill=#0 ; macro for clearing space subl space, sp ; on stack for a data area. movc5 #0, (sp), fill, - ; data area is init'd to space, (sp) ; nulls by this macro .endm clrsp ; that's it! bufsiz = 80 ; size of internal character buffer idlabel = 4 ; offset for input label descriptor retid = 8 ; offset for writing back the ID numargs = 2 ; the number of arguments to accept .sbttl Main code .psect $code, exe, long, nowrt, pic, shr .entry getid, ^m cmpb (ap), #numargs ; did we get all of the arguments? bgequ 10$ ; if so, keep going movzwl #ss$_insfarg, r0 ; return error brb done ; get out 10$: clrsp #bufsiz ; build a character buffer on the stack pushl sp ; build a descriptor for it pushl #bufsiz ; ...size of the string movl sp, r5 ; save a ptr to the character descr pushl r5 ; write length of text ID here pushl r5 ; write text ID here pushl idlabel(ap) ; read the label from here calls #3, g^cli$get_value ; read the text from the command line blbc r0, done ; on error get out pushl retid(ap) ; write the longword ID here pushl r5 ; read the text ID buffer here calls #2, parse_uic ; translate from text to longword done: ret ; all done, go home .end ; that's it!