.TITLE CSISV .IDENT /V3.2/ ; ;+ ; ; CSISV - Create switch value descriptor table entry. ; ; Provides FORTRAN access to the system command string ; interpreter routines. (See also CSI.MAC and CSISW.MAC.) ; ; CALL CSISV (VTABLE,TYPE,LENGTH,LOCATN) ; ; VTABLE = Switch value table on first call or offset in ; switch value table on subsequent calls. Allow ; two words per entry (one entry per call) plus a ; one word trailer for the entire table. ; TYPE = ASCII character indicating the type of switch value: ; "A" = ASCII ; "N" = Numeric (same as OCTAL) ; "O" = OCTAL ; "D" = DECIMAL ; An illegal TYPE is treated as OCTAL. ; LENGTH = Length of LOCATN, in bytes. LENGTH must be ; present, but it is used only for ASCII values. ; All other value types are forced to 2 bytes. ; LOCATN = Variable or array to hold value. Numeric, OCTAL, ; and DECIMAL locations must be word aligned. ; ;- ; .PSECT CSISV,RO CSISV:: ; ; Process switch value table parameters ; MOV (R5)+,R4 ; Get argument count (not used) MOV (R5)+,R1 ; Get addr of switch value table MOVB @(R5)+,R4 ; Get switch type CMPB R4,#'A ; ASCII value? BNE 20$ ; If NE, no MOVB #1,(R1)+ ; Yes, set ASCII flag MOVB @(R5),(R1)+ ; and maximum string length BR 50$ ; Exit to common code 20$: CMPB R4,#'D ; DECIMAL value? BNE 30$ ; If NE, no MOVB #3,(R1)+ ; Yes, set DECIMAL flag BR 40$ ; and set length to 2 30$: MOVB #2,(R1)+ ; Must be OCTAL or numeric 40$: MOVB #2,(R1)+ ; and set length to 2 ; ; Common exit ; 50$: MOV 2(R5),(R1)+ ; Store addr of receiving location CLR (R1) ; Show this is the end of the table RETURN ; Return to caller .END