; Lynx Scoreboard Script ; ; Copyright (c) 1995-1997 Lynx System Developers, Inc. ; ; Written by Kirk Sigel ; ; adapted to sort on index instead of lane by Todd Chamoy 4/19/01 ; ; Notes: ; + Empty lines and lines that start with a semicolon are ignored. ; + Lines that start with two semicolons indicate a section header. ; They must be one of the following: ; ;;Initialization ; ;;TimeRunning ; ;;TimeStopped ; ;;TimeGun ; ;;TimeBreak ; ;;TimeUpdate ; ;;Wind ; ;;TimeOfDay ; ;;ResultsHeader ; ;;ResultsTrailer ; ;;Result ; Sections may be omitted, appear in any order, and occur more than once. ; + Format lines must begin with a value indicating which variable ; they want to access. The special code \00 indicates that no variable ; is being requested. If a variable is requested it will be inserted where ; a '%s' printf style format specifier appears. There can only be one '%s' ; specifier in lines requesting a variable and no other printf format ; specifiers may appear. Remember, lines requesting a variable are used as ; a printf format string and therefore must behave as such. Lines not ; requesting variables (code \00) can do whatever they want as these ; lines are not fed to a printf statement. ; + Arbitrary 8 bit values are entered as \hh where h is a lowercase hex ; digit. Note that h must be lowercase. ; + Format lines can have the following commands embedded in them. ; Note that only 10 registers (indexed 0-9) are currently implemented. ; \U\hh Set the 'U' value to hh. It is reset after the next command. ; \Ui\hh Set the 'U' value to register[hh]. ; \X\hh Set the 'X' value to hh. It is reset after the next command. ; \Xi\hh Set the 'X' value to register[hh]. ; \=\hh register[hh] = {register[U]|X|1} (assign) ; \*\hh register[hh] = register[hh] * {register[U]|X|1} (multiply) ; \/\hh register[hh] = register[hh] / {register[U]|X|1} (divide) ; \#\hh register[hh] = register[hh] # {register[U]|X|1} (modulus) ; \+\hh register[hh] = register[hh] + {register[U]|X|1} (add) ; \-\hh register[hh] = register[hh] - {register[U]|X|1} (subtract) ; \<\hh register[hh] = register[hh] << {register[U]|X|1} (shift left) ; \>\hh register[hh] = register[hh] >> {register[U]|X|1} (shift right) ; \&\hh register[hh] = register[hh] & {register[U]|X|1} (bit and) ; \|\hh register[hh] = register[hh] | {register[U]|X|1} (bit or) ; \^\hh register[hh] = register[hh] ^ {register[U]|X|1} (bit xor) ; \~\hh register[hh] = ~register[hh] (bit invert) ; \F\hh register[hh] = The result of running Function {U|0} on the ; next {X|} characters. ; \U\00 IDS checksum. ; \U\01 XOR checksum. register[hh] is used as the seed value. ; \O\hh Output register[hh] as an {X|1} byte value using method {U|0}. ; \U\00 Binary little-endian (Intel byte order). ; \U\01 Binary big-endian (Motorola byte order). ; \U\02 ASCII text right justified space padded. ; \U\03 ASCII text right justified zero padded. ; \U\04 ASCII text left justified space padded. ; \U\05 ASCII text left justified zero padded. ; \S\hh Scan the next {X|1} bytes into register[hh] using method {U|0}. ; \U\00 ASCII text base 10. ; \U\01 Binary little-endian (Intel byte order). ; \U\02 Binary big-endian (Motorola byte order). ; \P\hh Run Procedure hh on the next {X|} characters. ; \P\00 Reverse characters. ; \P\01 Convert characters to Colorado Time format. Register[1] ; is the current character position on entry and the ; next character position on exit. ; \P\02 Convert characters to Daktronics AllSport format. ; \B\hh Delete {register[U]|hh} (to beginning of line if zero) characters ; before the cursor or until the string contains X characters. ; \D\hh Delete {register[U]|hh} (to end of line if zero) characters ; at the cursor or until the string contains X characters. ; \I\hh Insert {register[U]|hh} spaces at the cursor or until the string ; contains X characters. ; \Ic\hh Insert {register[U]|hh} {X's|spaces} at the cursor. ; \L\hh Move the cursor {register[U]|hh} positions to the left (to the ; beginning of the line if zero). ; \R\hh Move the cursor {register[U]|hh} positions to the right (to the ; end of the line if zero). ; Note that numbers 0 thru 9 can be entered directly for single character ; embedded commands. For example, '\U\04' is the same as '\U4' and ; '\=\01' is the same as '\=1'. ; + Be very careful about whitespace in each format line. Characters other ; than '%s' specifiers and embedded commands and values will be sent ; exactly as they appear on the line. This means, for instance, that using ; tabs to make a line 'look right' in you favorite editor will cause ; tabs to be sent to the scoreboard instead of the equivalent number of ; spaces (probably not what you wanted). ; ; The format lines follow. ;;Initialization ; This is sent once to initialize the scoreboard. ; Line codes: ; \00 No variable \00\0c ;;TimeRunning ; This is sent approximately 10 times per second. ; Line codes: ; \00 No variable ; \01 Time ; Setting register[0] to 1 in a format line will cause that line and ; subsequent lines to only be sent once per second (when the second's ; digit changes) instead of approximately 10 times per second. Setting ; register[0] to 0 will resume normal operation for remaining lines. \01\01\06\081 \02 %12.12s\L9\B3 ;;TimeStopped ; This is sent when the time is stopped by a beam break. ; Line codes are identical to the TimeRunning line codes. \01\01\06\081 \02 %12.12s\L9\B3 ;;TimeOfDay \01\=0\01\06\081 \02 %12.12s\B4 \L9\B3 ;;ResultsHeader ; This is sent once each time the scoreboard is updated with results. It ; is sent before any result lines are sent. ; Line codes: ; \00 No variable ; \01 OFFICIAL/UNOFFICIAL string ; \02 Event name ; \03 Wind ; \04 Event number ; \05 Round number ; \06 Heat number ; \07 AUTO/MANUAL start type ; \08 Number of participants ;;ResultsTrailer ; This is sent once each time the scoreboard is updated with results. It ; is sent after all result lines are sent. ; Line codes are identical to the ResultsHeader line codes. \00\01\06\08 \00\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a\0a ; Event number \04%4.4s\L3\B1\R0 ; Heat number \06%3.3s\R0 ;;Result ; This is sent once for each result line displayed on the scoreboard. ; Line codes: ; \00 No variable ; \01 Place ; \02 Lane ; \03 Id ; \04 Name ; \05 Affiliation ; \06 Time ; Register[0] is initialized with the index of the current result line and ; will range from 0 through . ; \00\01\06\08 ; Initialize register[2] to "Index 11" \00\X\0b\=2 ; register[2]=Index \00\U3\O0\L1\S2\R0\B1 ; Output register[2] of 0ah \00\X\0a\U2\Ic0 ; Lane \02%2.2s\L1\B1\R1\20\02\20 ; Place \01%2.2s\L1\B1\R1\20 ; Time \06%12.12s\L9\B3\R0F