;*; Updated on 06-Dec-91 at 10:40 AM by Michele Tonti; edit time: 0:00:10 ;*************************** AMUS Program Label ****************************** ; Filename: PARSE.M68 Date: 12/6/91 ; Category: UTIL Hash Code: 747-453-676-151 Version: ; Initials: KUNI/AM Name: RENE S. HOLLAN ; Company: UDISCO LTD. Telephone #: 5144818107 ; Related Files: ; Min. Op. Sys.: Expertise Level: ; Special: ; Description: This routine parses valid options from the command line. Valid ; options begin after the output filename and are preceeded with a slash(/) ; ;***************************************************************************** ; PARSE - parse options on command line ; ===================================== ; ; This routine parses valid options from the command line. Valid options ; start after the output file name. Each option is preceeded by a slash (/). ; ; Entry - A2 --> command line after program name ; A0 --> impure area ; ; Edit History ; ------------ ; ; 14 October 1986 ; Coding starts. /RSH ; ; PARSE: BYP ; skip over blanks and tabs TRM ; end of line? BEQ 90$ ; yup - finished parsing CMPB (A2)+,#SLASH ; parameter follows? BNE 80$ ; nope CMPB (A2)+,#'C ; inter-character time? BEQ 10$ ; yup! CMPB -1(A2),#'J ; inter-screen time? BEQ 20$ ; yup! CMPB -1(A2),#'R ; repeat option? BNE 80$ ; nope - error BSET #F$REPT,FLAG(A0) ; yup - set repeat option BR PARSE 80$: TYPECR EXIT 10$: CMPB (A2)+,#': ; is there a colon? BNE 12$ ; nope GTDEC ; get inter-character delay BR 14$ 12$: MOV #1000./120.,D1 ; assume 1200 baud screen write rate LEA A2,-1(A2) ; backtrack 14$: MOV D1,CHARD(A0) ; save inter-character delay BR PARSE ; and continue parsing 20$: CMP (A2)+,#': ; is there a colon? BNE 22$ ; nope GTDEC ; get inter-character delay BR 24$ 22$: CLR D1 ; screen delay is 'infinite' COM D1 ; ... LEA A2,-1(A2) ; backtrack 24$: MOV D1,SCRND(A0) ; save inter-screen delay BR PARSE .