├── README.md ├── include ├── mod.h ├── golay.h └── ale_symbol_library.h ├── src ├── CMakeLists.txt ├── mod_tb.c ├── mod.c └── golay.c ├── CMakeLists.txt ├── ale_symbol_library.m └── LICENSE /README.md: -------------------------------------------------------------------------------- 1 | # ale_modulator 2 | MIL-STD-188-141B ALE compatible modulation / encoding routines in C 3 | -------------------------------------------------------------------------------- /include/mod.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Devin Butterfield 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | * 17 | */ 18 | #ifndef MOD_H 19 | #define MOD_H 20 | 21 | /* ALE word types (preambles); first 3 MSBs of ALE word */ 22 | #define ALE_WORD_TYPE_THRU 1 23 | #define ALE_WORD_TYPE_TO 2 24 | #define ALE_WORD_TYPE_CMD 6 25 | #define ALE_WORD_TYPE_FROM 4 26 | #define ALE_WORD_TYPE_TIS 5 27 | #define ALE_WORD_TYPE_TWAS 3 28 | #define ALE_WORD_TYPE_DATA 0 29 | #define ALE_WORD_TYPE_REP 7 30 | #define ALE_WORD_LEN 24 31 | #define ALE_TX_WORD_LEN 49 32 | #define ALE_TA_MS 392 33 | 34 | int build_address_words(int type, char *address, unsigned int *words, int *len); 35 | int mod(unsigned int *words, int len, short *samples); 36 | int scanning_sound(int scan_time_ms, int resp_req, char *address, short *samples); 37 | 38 | #endif -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ## CMakeLists.txt --- 2 | ## 3 | ###################################################################### 4 | 5 | ## Commentary: 6 | ## 7 | ## 8 | ## 9 | ###################################################################### 10 | 11 | ## Change Log: 12 | ## 13 | ## 14 | ###################################################################### 15 | ## 16 | ## *This program is free software; you can redistribute it and/or 17 | ## modify it under the terms of the GNU General Public License as 18 | ## published by the Free Software Foundation; either version 3, or 19 | ## (at your option) any later version. 20 | ## 21 | ## This program is distributed in the hope that it will be useful, 22 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 23 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24 | ## General Public License for more details. 25 | ## 26 | ## You should have received a copy of the GNU General Public License 27 | ## along with this program; see the file COPYING. If not, write to 28 | ## the Free Software Foundation, Inc., 51 Franklin Street, Fifth 29 | ## Floor, Boston, MA 02110-1301, USA. 30 | ## 31 | ###################################################################### 32 | 33 | ## Code: 34 | 35 | include_directories("${CMAKE_SOURCE_DIR}/include") 36 | 37 | add_executable( 38 | mod_tb mod_tb.c mod.c golay.c 39 | ) 40 | 41 | # target_link_libraries (mod_tb m) 42 | 43 | ###################################################################### 44 | -------------------------------------------------------------------------------- /include/golay.h: -------------------------------------------------------------------------------- 1 | /* -*- c -*- 2 | * 3 | * Copyright (C) 2000 - 2001 4 | * Charles Brain (chbrain@dircon.co.uk) 5 | * Ilkka Toivanen (pile@aimo.kareltek.fi) 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | * 21 | * File: 22 | * golay.h - Table lookup headers of extended Golay (24,12) Code 23 | * 24 | * Version: 25 | * $Revision: 1.1.1.1 $ 26 | * 27 | * Date: 28 | * $Date: 2001/05/23 20:19:50 $ 29 | * 30 | * Author: 31 | * Charles Brain 32 | * Ilkka Toivanen 33 | * 34 | * History: 35 | * $Log: golay.h,v $ 36 | * Revision 1.1.1.1 2001/05/23 20:19:50 pile 37 | * Initial version for sourceforge.net 38 | * 39 | * Revision 0.0.1.1 2001/05/17 07:03:58 pile 40 | * LinuxALE 41 | * 42 | */ 43 | 44 | #ifndef __GOLAY_H__ 45 | #define __GOLAY_H__ 46 | 47 | unsigned long golay_encode(unsigned int data); 48 | unsigned int golay_decode(unsigned long code, unsigned int *errors); 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ## CMakeLists.txt --- 2 | ## 3 | ###################################################################### 4 | 5 | ## Commentary: 6 | ## 7 | ## 8 | ## 9 | ###################################################################### 10 | 11 | ## Change Log: 12 | ## 13 | ## 14 | ###################################################################### 15 | ## 16 | ## *This program is free software; you can redistribute it and/or 17 | ## modify it under the terms of the GNU General Public License as 18 | ## published by the Free Software Foundation; either version 3, or 19 | ## (at your option) any later version. 20 | ## 21 | ## This program is distributed in the hope that it will be useful, 22 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 23 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24 | ## General Public License for more details. 25 | ## 26 | ## You should have received a copy of the GNU General Public License 27 | ## along with this program; see the file COPYING. If not, write to 28 | ## the Free Software Foundation, Inc., 51 Franklin Street, Fifth 29 | ## Floor, Boston, MA 02110-1301, USA. 30 | ## 31 | ###################################################################### 32 | 33 | ## Code: 34 | cmake_minimum_required(VERSION 2.6) 35 | project(ale_modulator) 36 | 37 | set(MOD_VERSION_MAJOR 0) 38 | set(MOD_VERSION_MINOR 1) 39 | set(CMAKE_CXX_FLAGS "-Wall -O2") 40 | #set(CMAKE_CC_FLAGS "-g -fmudflap -fmudflapth -funwind-tables") 41 | set(CMAKE_CC_FLAGS "-Wall -O2") 42 | #set(CMAKE_EXE_LINKER_FLAGS "-static") 43 | set(CMAKE_INSTALL_PREFIX "/usr") 44 | 45 | add_subdirectory(src) 46 | 47 | # install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/etc/modem_backend.conf" DESTINATION /etc) 48 | 49 | ###################################################################### 50 | -------------------------------------------------------------------------------- /src/mod_tb.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Devin Butterfield 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | * 17 | */ 18 | /* 19 | * tests for mod functions 20 | */ 21 | 22 | #include 23 | #include 24 | #include 25 | #include "mod.h" 26 | #include "ale_symbol_library.h" 27 | 28 | /* 29 | * Notes: 30 | * 31 | * ALE Sounding protocol example 32 | * 33 | * Assuming scanning rate of 2 ch / second, and 9 channels -> 4500ms scan time 34 | * TRW: triple redundant word 35 | * TWAS: 36 | * 37 | * 38 | * <-- TRW TWAS Scanning Sound -------------------------------------> <-- Redundant Sound: 2xTa (complete addr twice) --------------> 39 | * [TWAS KD6][TWAS KD6][TWAS KD6][DATA DRS][DATA DRS][DATA DRS] x6 ... [TWAS KD6][TWAS KD6][TWAS KD6] [DATA DRS][DATA DRS][DATA DRS] x2 40 | * 41 | * The scanning sound must be nxTa >= 4500ms = 6xTa! So send [TWAS KD6][TWAS KD6][TWAS KD6][DATA DRS][DATA DRS][DATA DRS] x 6 42 | * Then send the redundant conclusion section: [TWAS KD6][TWAS KD6][TWAS KD6][DATA DRS][DATA DRS][DATA DRS] x 2 43 | */ 44 | 45 | int main() 46 | { 47 | char *test_address = "KD6DRS"; 48 | char *test_address2 = "KD6DRS012345678"; 49 | char *test_address_odd = "KD6DR"; 50 | char *test_address_bad = "KD6DRS0123456789"; 51 | int ret; 52 | unsigned int words[5]; 53 | int encoded_len; 54 | int result_type; 55 | int i; 56 | char *type_str[] = { 57 | "DATA", //0 58 | "THRU", //1 59 | "TO" , //2 60 | "TWAS", //3 61 | "FROM", //4 62 | "TIS" , //5 63 | "CMD" , //6 64 | "REP" , //7 65 | }; 66 | char c1,c2,c3; 67 | short mod_samples[ALE_SYMBOL_SIZE * ALE_TX_WORD_LEN]; 68 | int fd; 69 | 70 | ///////////////////////////////////////////////////// 71 | // TEST THE ADDRESS WORD ENCODER 72 | ///////////////////////////////////////////////////// 73 | 74 | printf("TEST build_address_words...\n"); 75 | ret = build_address_words(ALE_WORD_TYPE_TWAS, test_address, words, &encoded_len); 76 | if (ret) { 77 | printf("FAILED (ret = %d)\n", ret); 78 | } 79 | if (encoded_len != 2) { 80 | printf("FAILED (encoded_len = %d, expecting 2)\n", encoded_len); 81 | } 82 | // expect encoded word 0: TWAS KD6; 3 4b 44 36 83 | // expect encoded word 1: DATA DRS; 0 44 52 83 84 | for (i = 0; i < encoded_len; i++) { 85 | result_type = (words[i] >> 21) & 0x07; 86 | c1 = (words[i] >> 14) & 0x7f; 87 | c2 = (words[i] >> 7) & 0x7f; 88 | c3 = (words[i] >> 0) & 0x7f; 89 | printf("%s %c %c %c\n", type_str[result_type], c1, c2, c3); 90 | } 91 | printf("encoded_len = %d, 0x%x 0x%x\n", encoded_len, words[0], words[1]); 92 | printf("PASS\n"); 93 | 94 | // test LONG address 95 | printf("TEST LONG build_address_words...\n"); 96 | ret = build_address_words(ALE_WORD_TYPE_TWAS, test_address2, words, &encoded_len); 97 | if (ret) { 98 | printf("FAILED (ret = %d)\n", ret); 99 | } 100 | if (encoded_len != 5) { 101 | printf("FAILED (encoded_len = %d, expecting 5)\n", encoded_len); 102 | } 103 | for (i = 0; i < encoded_len; i++) { 104 | result_type = (words[i] >> 21) & 0x07; 105 | c1 = (words[i] >> 14) & 0x7f; 106 | c2 = (words[i] >> 7) & 0x7f; 107 | c3 = (words[i] >> 0) & 0x7f; 108 | printf("%s %c %c %c\n", type_str[result_type], c1, c2, c3); 109 | } 110 | printf("PASS\n"); 111 | 112 | // test odd address 113 | printf("TEST ODD build_address_words...\n"); 114 | ret = build_address_words(ALE_WORD_TYPE_TWAS, test_address_odd, words, &encoded_len); 115 | if (ret) { 116 | printf("FAILED (ret = %d)\n", ret); 117 | } 118 | if (encoded_len != 2) { 119 | printf("FAILED (encoded_len = %d, expecting 2)\n", encoded_len); 120 | } 121 | for (i = 0; i < encoded_len; i++) { 122 | result_type = (words[i] >> 21) & 0x07; 123 | c1 = (words[i] >> 14) & 0x7f; 124 | c2 = (words[i] >> 7) & 0x7f; 125 | c3 = (words[i] >> 0) & 0x7f; 126 | printf("%s %c %c %c\n", type_str[result_type], c1, c2, c3); 127 | } 128 | printf("PASS\n"); 129 | 130 | // test invalid length 131 | ret = build_address_words(ALE_WORD_TYPE_TWAS, test_address_bad, words, &encoded_len); 132 | if (ret) { 133 | printf("PASS (ret = %d)\n", ret); 134 | } else { 135 | printf("FAILED to reject bad address\n"); 136 | } 137 | 138 | ////////////////////////////////////////////////////////// 139 | // Test the modulator 140 | ////////////////////////////////////////////////////////// 141 | ret = build_address_words(ALE_WORD_TYPE_TWAS, test_address, words, &encoded_len); 142 | if (ret) { 143 | printf("build_address_words() FAILED (ret = %d)\n", ret); 144 | return -1; 145 | } 146 | 147 | fd = open("mod.raw", O_WRONLY | O_CREAT, 0664); 148 | if (fd < 0) { 149 | perror("open"); 150 | return -1; 151 | } 152 | 153 | i = mod(words, encoded_len, mod_samples); 154 | while (i < encoded_len) { 155 | ret = write(fd, mod_samples, ALE_SYMBOL_SIZE*ALE_TX_WORD_LEN*sizeof(short)); 156 | if (ret < ALE_SYMBOL_SIZE*ALE_TX_WORD_LEN*sizeof(short)) { 157 | perror("write"); 158 | return 0; 159 | } 160 | i = mod(words, encoded_len, mod_samples); 161 | } 162 | close(fd); 163 | 164 | printf("BEGIN SOUNDING\n"); 165 | /////////////////////////////////////////////////////// 166 | // Now test sounding 167 | /////////////////////////////////////////////////////// 168 | fd = open("sound.raw", O_WRONLY | O_CREAT | O_TRUNC, 0664); 169 | if (fd < 0) { 170 | perror("open"); 171 | return -1; 172 | } 173 | while (scanning_sound(4200, 0, test_address2, mod_samples)) { 174 | ret = write(fd, mod_samples, ALE_SYMBOL_SIZE*ALE_TX_WORD_LEN*sizeof(short)); 175 | if (ret < ALE_SYMBOL_SIZE*ALE_TX_WORD_LEN*sizeof(short)) { 176 | perror("write"); 177 | return 0; 178 | } 179 | } 180 | close(fd); 181 | 182 | return 0; 183 | } -------------------------------------------------------------------------------- /ale_symbol_library.m: -------------------------------------------------------------------------------- 1 | % 2 | % MATLAB script to generate the ALE symbol library according to 3 | % MIL-STD-188-141B. 4 | % 5 | 6 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 7 | % generate 750 Hz tone with zero initial phase and sufficient magnitude for 8 | % around 0.8 amplitude in time domain 9 | fd_in_i = zeros(1,64); 10 | fd_in_q = zeros(1,64); 11 | 12 | fd_in_i(7) = 26; 13 | fd_in_q(7) = 0; 14 | fd_in_i(59) = 26; 15 | fd_in_q(59) = 0; 16 | 17 | % make complex vector for the IFFT 18 | fd_in = complex(fd_in_i, fd_in_q); 19 | 20 | % do the iFFT 21 | td_out_750 = ifft(fd_in); 22 | 23 | figure(1); 24 | plot(real(td_out_750) + imag(td_out_750)); 25 | 26 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 27 | % generate 1000 Hz tone with zero initial phase 28 | fd_in_i = zeros(1,64); 29 | fd_in_q = zeros(1,64); 30 | 31 | fd_in_i(9) = 26; 32 | fd_in_q(9) = 0; 33 | fd_in_i(57) = 26; 34 | fd_in_q(57) = 0; 35 | 36 | % make complex vector for the IFFT 37 | fd_in = complex(fd_in_i, fd_in_q); 38 | 39 | % do the iFFT 40 | td_out_1000 = ifft(fd_in); 41 | 42 | figure(2); 43 | plot(real(td_out_1000) + imag(td_out_1000)); 44 | 45 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 46 | % generate 1250 Hz tone with zero initial phase 47 | fd_in_i = zeros(1,64); 48 | fd_in_q = zeros(1,64); 49 | 50 | fd_in_i(11) = 26; 51 | fd_in_q(11) = 0; 52 | fd_in_i(55) = 26; 53 | fd_in_q(55) = 0; 54 | 55 | % make complex vector for the IFFT 56 | fd_in = complex(fd_in_i, fd_in_q); 57 | 58 | % do the iFFT 59 | td_out_1250 = ifft(fd_in); 60 | 61 | % figure(3); 62 | % plot(real(td_out_1250) + imag(td_out_1250)); 63 | 64 | fd_in_i = zeros(1,64); 65 | fd_in_q = zeros(1,64); 66 | 67 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 68 | % generate 1500 Hz tone with zero initial phase 69 | fd_in_i(13) = 26; 70 | fd_in_q(13) = 0; 71 | fd_in_i(53) = 26; 72 | fd_in_q(53) = 0; 73 | 74 | % make complex vector for the IFFT 75 | fd_in = complex(fd_in_i, fd_in_q); 76 | 77 | % do the iFFT 78 | td_out_1500 = ifft(fd_in); 79 | 80 | figure(4); 81 | plot(real(td_out_1500) + imag(td_out_1500)); 82 | 83 | fd_in_i = zeros(1,64); 84 | fd_in_q = zeros(1,64); 85 | 86 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 87 | % generate 1750 Hz tone with zero initial phase 88 | fd_in_i(15) = 26; 89 | fd_in_q(15) = 0; 90 | fd_in_i(51) = 26; 91 | fd_in_q(51) = 0; 92 | 93 | % make complex vector for the IFFT 94 | fd_in = complex(fd_in_i, fd_in_q); 95 | 96 | % do the iFFT 97 | td_out_1750 = ifft(fd_in); 98 | 99 | figure(5); 100 | plot(real(td_out_1750) + imag(td_out_1750)); 101 | 102 | fd_in_i = zeros(1,64); 103 | fd_in_q = zeros(1,64); 104 | 105 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 106 | % generate 2000 Hz tone with zero initial phase 107 | fd_in_i(17) = 26; 108 | fd_in_q(17) = 0; 109 | fd_in_i(49) = 26; 110 | fd_in_q(49) = 0; 111 | 112 | % make complex vector for the IFFT 113 | fd_in = complex(fd_in_i, fd_in_q); 114 | 115 | % do the iFFT 116 | td_out_2000 = ifft(fd_in); 117 | 118 | figure(6); 119 | plot(real(td_out_2000) + imag(td_out_2000)); 120 | 121 | fd_in_i = zeros(1,64); 122 | fd_in_q = zeros(1,64); 123 | 124 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 125 | % generate 2250 Hz tone with zero initial phase 126 | fd_in_i(19) = 26; 127 | fd_in_q(19) = 0; 128 | fd_in_i(47) = 26; 129 | fd_in_q(47) = 0; 130 | 131 | % make complex vector for the IFFT 132 | fd_in = complex(fd_in_i, fd_in_q); 133 | 134 | % do the iFFT 135 | td_out_2250 = ifft(fd_in); 136 | 137 | figure(7); 138 | plot(real(td_out_2250) + imag(td_out_2250)); 139 | 140 | fd_in_i = zeros(1,64); 141 | fd_in_q = zeros(1,64); 142 | 143 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 144 | % generate 2500 Hz tone with zero initial phase 145 | fd_in_i(21) = 26; 146 | fd_in_q(21) = 0; 147 | fd_in_i(45) = 26; 148 | fd_in_q(45) = 0; 149 | 150 | % make complex vector for the IFFT 151 | fd_in = complex(fd_in_i, fd_in_q); 152 | 153 | % do the iFFT 154 | td_out_2500 = ifft(fd_in); 155 | 156 | 157 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 158 | % generate the c-header 159 | 160 | fid = fopen('ale_symbol_library.h','w'); 161 | fprintf(fid,'/*\n'); 162 | fprintf(fid,' * ALE Symbol library\n'); 163 | fprintf(fid,' *\n'); 164 | fprintf(fid,' * Generated by ale_symbol_library.m according to MIL-STD-188-141B.\n'); 165 | fprintf(fid,' * Copyright (C) 2017 Devin Butterfield (dbutter@wireless.net)\n\n'); 166 | fprintf(fid,' * This program is free software; you can redistribute it and/or modify\n'); 167 | fprintf(fid,' * it under the terms of the GNU General Public License as published by\n'); 168 | fprintf(fid,' * the Free Software Foundation; either version 2 of the License, or\n'); 169 | fprintf(fid,' * (at your option) any later version.\n'); 170 | fprintf(fid,' *\n'); 171 | fprintf(fid,' * This program is distributed in the hope that it will be useful,\n'); 172 | fprintf(fid,' * but WITHOUT ANY WARRANTY; without even the implied warranty of\n'); 173 | fprintf(fid,' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n'); 174 | fprintf(fid,' * GNU General Public License for more details.\n'); 175 | fprintf(fid,' *\n'); 176 | fprintf(fid,' * You should have received a copy of the GNU General Public License\n'); 177 | fprintf(fid,' * along with this program; if not, write to the Free Software\n'); 178 | fprintf(fid,' * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n'); 179 | fprintf(fid,' */\n\n'); 180 | fprintf(fid,'#ifndef _ALE_SYMBOL_LIBRARY_H\n'); 181 | fprintf(fid,'#define _ALE_SYMBOL_LIBRARY_H\n\n'); 182 | fprintf(fid,'#define ALE_SYMBOL_COUNT %d\n',8); 183 | fprintf(fid,'#define ALE_SYMBOL_SIZE %d\n\n',length(td_out_750)); 184 | fprintf(fid,'/* max signal amplitude: %f */\n\n', max(td_out_750)); 185 | fprintf(fid,'#define ALE_SYMBOL_LIBRARY { \\\n'); 186 | fprintf(fid,' {\\\n'); 187 | fprintf(fid,' %d,\\\n',int16(td_out_750 * 2^15)); 188 | fprintf(fid,' },\\\n'); 189 | fprintf(fid,' {\\\n'); 190 | fprintf(fid,' %d,\\\n',int16(td_out_1000 * 2^15)); 191 | fprintf(fid,' },\\\n'); 192 | fprintf(fid,' {\\\n'); 193 | fprintf(fid,' %d,\\\n',int16(td_out_1500 * 2^15)); 194 | fprintf(fid,' },\\\n'); 195 | fprintf(fid,' {\\\n'); 196 | fprintf(fid,' %d,\\\n',int16(td_out_1250 * 2^15)); 197 | fprintf(fid,' },\\\n'); 198 | fprintf(fid,' {\\\n'); 199 | fprintf(fid,' %d,\\\n',int16(td_out_2500 * 2^15)); 200 | fprintf(fid,' },\\\n'); 201 | fprintf(fid,' {\\\n'); 202 | fprintf(fid,' %d,\\\n',int16(td_out_2250 * 2^15)); 203 | fprintf(fid,' },\\\n'); 204 | fprintf(fid,' {\\\n'); 205 | fprintf(fid,' %d,\\\n',int16(td_out_1750 * 2^15)); 206 | fprintf(fid,' },\\\n'); 207 | fprintf(fid,' {\\\n'); 208 | fprintf(fid,' %d,\\\n',int16(td_out_2000 * 2^15)); 209 | fprintf(fid,' },\\\n'); 210 | fprintf(fid,'};\n\n'); 211 | fprintf(fid,'#endif/*_ALE_SYMBOL_LIBRARY_H*/\n'); 212 | 213 | 214 | fclose(fid); -------------------------------------------------------------------------------- /src/mod.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2017 Devin Butterfield 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | * 17 | */ 18 | /* 19 | * Functions for encoding ALE messages 20 | */ 21 | 22 | #include 23 | #include 24 | #include "ale_symbol_library.h" 25 | #include "mod.h" 26 | #include "golay.h" 27 | 28 | const int ale_symbol_library[ALE_SYMBOL_COUNT][ALE_SYMBOL_SIZE] = ALE_SYMBOL_LIBRARY; 29 | 30 | /* 31 | * Build array of address words from the given null terminated string. 32 | * type: one of the supported ALE Address type words. 33 | * address: null terminated address character string. 34 | * words: pointer to output word buffer, MUST be at least 5 integers long 35 | * len: pointer to int variable to store output buffer length 36 | * 37 | * returns 0 on success, -1 on error. 38 | */ 39 | int build_address_words(int type, char *address, unsigned int *words, int *len) 40 | { 41 | int i,j; 42 | int alen; 43 | int word; 44 | int next_type = ALE_WORD_TYPE_DATA; 45 | 46 | *len = 0; 47 | switch (type) { 48 | case ALE_WORD_TYPE_THRU: 49 | /* XXX FIXME: ALE THRU type not handled */ 50 | printf("not implemented!\n"); 51 | return -1; 52 | case ALE_WORD_TYPE_TO: 53 | case ALE_WORD_TYPE_TIS: 54 | case ALE_WORD_TYPE_TWAS: 55 | case ALE_WORD_TYPE_FROM: 56 | alen = strlen(address); 57 | if (alen > 15) { 58 | printf("address must be less than 15 characters!\n"); 59 | return -1; 60 | } 61 | word = (type << 21); 62 | for (i = 0; i < 5; i++) { 63 | for (j = 2; j >= 0; j--) { 64 | if (*address) { 65 | word |= (*address << (7*j)); 66 | address++; 67 | } else { 68 | word |= ('@' << (7*j)); 69 | } 70 | } 71 | *words = word; 72 | words++; 73 | *len = *len + 1; 74 | 75 | word = (next_type << 21); 76 | next_type = (next_type == ALE_WORD_TYPE_DATA) ? ALE_WORD_TYPE_REP : ALE_WORD_TYPE_DATA; 77 | 78 | if (*address == 0) { 79 | break; 80 | } 81 | } 82 | break; 83 | default: 84 | printf("invalid address word type %d\n", type); 85 | return -1; 86 | } 87 | return 0; 88 | } 89 | 90 | /* 91 | * Given an array of encoded words, and specified length, 92 | * perform FEC encoding, interleaving, tripling, and modulation. 93 | * 94 | * words: array of encoded ALE words 95 | * len: length of word array 96 | * samples: pointer to buffer big enough to store 3136 samples (for modulated triple redundant word) 97 | * 98 | * Stores samples of modulated triple redundant word (49 symbols X 64 samples each; 3136) 99 | * in buffer pointed to by "samples". 100 | * 101 | * Returns word index. Must be called with same words and len and new samples buffers until return == len. 102 | */ 103 | #define TESTING 104 | 105 | int mod(unsigned int *words, int len, short *samples) 106 | { 107 | unsigned int codeA; 108 | unsigned int codeB; 109 | static int word_idx = 0; 110 | unsigned int half_wordA; 111 | unsigned int half_wordB; 112 | int i,j,k; 113 | unsigned char bits[ALE_TX_WORD_LEN]; 114 | int sym; 115 | 116 | #ifdef TESTING 117 | static FILE *test_in = 0; 118 | static FILE *test_out_golden = 0; 119 | if (!test_in) { 120 | test_in = fopen("test_in.dat","w"); 121 | if (test_in == NULL) { 122 | printf("error opening test_in.dat\n"); 123 | } 124 | } 125 | if (!test_out_golden) { 126 | test_out_golden = fopen("test_out_golden.dat","w"); 127 | if (test_out_golden == NULL) { 128 | printf("error opening test_out_golden.dat\n"); 129 | } 130 | } 131 | 132 | // fprintf(test_in, "%d\n", words[word_idx]); 133 | #endif 134 | 135 | /* word B from bottom 12 bits */ 136 | half_wordB = words[word_idx] & 0xfff; 137 | codeB = golay_encode(half_wordB); 138 | 139 | /* word A from top 12 bits */ 140 | half_wordA = (words[word_idx] >> 12) & 0xfff; 141 | codeA = golay_encode(half_wordA); 142 | 143 | codeB = codeB ^ 0xFFF; 144 | 145 | printf("0x%x 0x%x\n",codeA, codeB); 146 | 147 | /* interleave */ 148 | j = 0; 149 | for (i = ALE_WORD_LEN-1; i >= 0; i--) { 150 | bits[j++] = (codeA >> i) & 1; 151 | bits[j++] = (codeB >> i) & 1; 152 | } 153 | bits[j] = 0; // stuff bit 154 | 155 | /* triple the words with 1 stuff bit each and modulate into 49 symbols */ 156 | j = 0; 157 | for (i = 0; i < ALE_TX_WORD_LEN; i++) { 158 | sym = bits[j] << 2; 159 | j = (j+1)%ALE_TX_WORD_LEN; 160 | 161 | sym |= bits[j] << 1; 162 | j = (j+1)%ALE_TX_WORD_LEN; 163 | 164 | sym |= bits[j] << 0; 165 | j = (j+1)%ALE_TX_WORD_LEN; 166 | 167 | 168 | #ifdef TESTING 169 | fprintf(test_in, "%d\n", sym); 170 | #endif 171 | // #ifdef TESTING 172 | // fprintf(test_out_golden, "%d\n", sym); 173 | // fflush(test_in); 174 | // fflush(test_out_golden); 175 | // #endif 176 | // memcpy(samples, ale_symbol_library[sym], ALE_SYMBOL_SIZE*sizeof(short)); 177 | for (k=0; k> 8; 179 | fprintf(test_out_golden, "%d\n",ale_symbol_library[sym][k]); 180 | } 181 | // samples+=ALE_SYMBOL_SIZE; 182 | } 183 | 184 | #ifdef TESTING 185 | fflush(test_in); 186 | fflush(test_out_golden); 187 | #endif 188 | 189 | word_idx++; 190 | if (word_idx == len) { 191 | word_idx = 0; 192 | return len; 193 | } 194 | return word_idx; 195 | } 196 | 197 | /* 198 | * Given the specified scan time in millisenconds, whether a reponse is requested/allowed, 199 | * and the specified address, generate samples for transmission. This function should be 200 | * called repeatedly with same first 3 args, but new samples buffer, until it returns 0. 201 | * Each call returns 3136 samples (one complete modulated triple-redundant word). 202 | * 203 | * scan_time_ms: expected scan time in ms (used to calcualted scanning sound phase duration) 204 | * resp_req: boolean to indicate the type of sounding (TIS or TWAS) 205 | * address: station address for sounding (15 or less characters) in a null terminated string 206 | * samples: pointer to a buffer large enough to store 49 symbols (3136 samples) 207 | * 208 | * Returns 1 until complete set of symbols have been generated, then returns 0. 209 | */ 210 | int scanning_sound(int scan_time_ms, int resp_req, char *address, short *samples) 211 | { 212 | static int ss_time = 0; 213 | static int encoded_len = 0; 214 | static int redundant_sound = 0; 215 | static unsigned int words[5]; 216 | static int type; 217 | int ret; 218 | int i; 219 | 220 | /* need to do this initialization only once per sounding */ 221 | if (!encoded_len) { 222 | type = resp_req ? ALE_WORD_TYPE_TIS : ALE_WORD_TYPE_TWAS; 223 | ret = build_address_words(type, address, words, &encoded_len); 224 | if (ret) { 225 | printf("build_address_words() FAILED (ret = %d)\n", ret); 226 | return -1; 227 | } 228 | // for (i = 0; i < encoded_len; i++){ 229 | // printf("%d = <<%d,%d,%d>>\n",words[i], (words[i]>>0)&0xff,(words[i]>>8)&0xff,(words[i]>>16)&0xff); 230 | // } 231 | } 232 | 233 | /* Ta is 392ms, scanning sound time must be n*Ta >= scan_time_ms */ 234 | if (ss_time <= scan_time_ms) { 235 | i = mod(words, encoded_len, samples); 236 | if (i >= encoded_len) { 237 | ss_time += (ALE_TA_MS*encoded_len); // count time 238 | } 239 | return 1; 240 | } 241 | 242 | /* then redundant sound time is 2xTa */ 243 | if (redundant_sound < 2) { 244 | i = mod(words, encoded_len, samples); 245 | if (i >= encoded_len) { 246 | redundant_sound++; 247 | } 248 | return 1; 249 | } 250 | 251 | /* all done cleanup */ 252 | ss_time = encoded_len = redundant_sound = 0; 253 | return 0; 254 | } -------------------------------------------------------------------------------- /include/ale_symbol_library.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ALE Symbol library 3 | * 4 | * Generated by ale_symbol_library.m according to MIL-STD-188-141B. 5 | * Copyright (C) 2017 Devin Butterfield (dbutter@wireless.net) 6 | 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | */ 21 | 22 | #ifndef _ALE_SYMBOL_LIBRARY_H 23 | #define _ALE_SYMBOL_LIBRARY_H 24 | 25 | #define ALE_SYMBOL_COUNT 8 26 | #define ALE_SYMBOL_SIZE 64 27 | 28 | /* max signal amplitude: 0.812500 */ 29 | 30 | #define ALE_SYMBOL_LIBRARY { \ 31 | {\ 32 | 6815744,\ 33 | 5667084,\ 34 | 2608272,\ 35 | -1329686,\ 36 | -4819459,\ 37 | -6684781,\ 38 | -6296926,\ 39 | -3786624,\ 40 | 0,\ 41 | 3786624,\ 42 | 6296926,\ 43 | 6684781,\ 44 | 4819459,\ 45 | 1329686,\ 46 | -2608272,\ 47 | -5667084,\ 48 | -6815744,\ 49 | -5667084,\ 50 | -2608272,\ 51 | 1329686,\ 52 | 4819459,\ 53 | 6684781,\ 54 | 6296926,\ 55 | 3786624,\ 56 | 0,\ 57 | -3786624,\ 58 | -6296926,\ 59 | -6684781,\ 60 | -4819459,\ 61 | -1329686,\ 62 | 2608272,\ 63 | 5667084,\ 64 | 6815744,\ 65 | 5667084,\ 66 | 2608272,\ 67 | -1329686,\ 68 | -4819459,\ 69 | -6684781,\ 70 | -6296926,\ 71 | -3786624,\ 72 | 0,\ 73 | 3786624,\ 74 | 6296926,\ 75 | 6684781,\ 76 | 4819459,\ 77 | 1329686,\ 78 | -2608272,\ 79 | -5667084,\ 80 | -6815744,\ 81 | -5667084,\ 82 | -2608272,\ 83 | 1329686,\ 84 | 4819459,\ 85 | 6684781,\ 86 | 6296926,\ 87 | 3786624,\ 88 | 0,\ 89 | -3786624,\ 90 | -6296926,\ 91 | -6684781,\ 92 | -4819459,\ 93 | -1329686,\ 94 | 2608272,\ 95 | 5667084,\ 96 | },\ 97 | {\ 98 | 6815744,\ 99 | 4819459,\ 100 | 0,\ 101 | -4819459,\ 102 | -6815744,\ 103 | -4819459,\ 104 | 0,\ 105 | 4819459,\ 106 | 6815744,\ 107 | 4819459,\ 108 | 0,\ 109 | -4819459,\ 110 | -6815744,\ 111 | -4819459,\ 112 | 0,\ 113 | 4819459,\ 114 | 6815744,\ 115 | 4819459,\ 116 | 0,\ 117 | -4819459,\ 118 | -6815744,\ 119 | -4819459,\ 120 | 0,\ 121 | 4819459,\ 122 | 6815744,\ 123 | 4819459,\ 124 | 0,\ 125 | -4819459,\ 126 | -6815744,\ 127 | -4819459,\ 128 | 0,\ 129 | 4819459,\ 130 | 6815744,\ 131 | 4819459,\ 132 | 0,\ 133 | -4819459,\ 134 | -6815744,\ 135 | -4819459,\ 136 | 0,\ 137 | 4819459,\ 138 | 6815744,\ 139 | 4819459,\ 140 | 0,\ 141 | -4819459,\ 142 | -6815744,\ 143 | -4819459,\ 144 | 0,\ 145 | 4819459,\ 146 | 6815744,\ 147 | 4819459,\ 148 | 0,\ 149 | -4819459,\ 150 | -6815744,\ 151 | -4819459,\ 152 | 0,\ 153 | 4819459,\ 154 | 6815744,\ 155 | 4819459,\ 156 | 0,\ 157 | -4819459,\ 158 | -6815744,\ 159 | -4819459,\ 160 | 0,\ 161 | 4819459,\ 162 | },\ 163 | {\ 164 | 6815744,\ 165 | 2608272,\ 166 | -4819459,\ 167 | -6296926,\ 168 | 0,\ 169 | 6296926,\ 170 | 4819459,\ 171 | -2608272,\ 172 | -6815744,\ 173 | -2608272,\ 174 | 4819459,\ 175 | 6296926,\ 176 | 0,\ 177 | -6296926,\ 178 | -4819459,\ 179 | 2608272,\ 180 | 6815744,\ 181 | 2608272,\ 182 | -4819459,\ 183 | -6296926,\ 184 | 0,\ 185 | 6296926,\ 186 | 4819459,\ 187 | -2608272,\ 188 | -6815744,\ 189 | -2608272,\ 190 | 4819459,\ 191 | 6296926,\ 192 | 0,\ 193 | -6296926,\ 194 | -4819459,\ 195 | 2608272,\ 196 | 6815744,\ 197 | 2608272,\ 198 | -4819459,\ 199 | -6296926,\ 200 | 0,\ 201 | 6296926,\ 202 | 4819459,\ 203 | -2608272,\ 204 | -6815744,\ 205 | -2608272,\ 206 | 4819459,\ 207 | 6296926,\ 208 | 0,\ 209 | -6296926,\ 210 | -4819459,\ 211 | 2608272,\ 212 | 6815744,\ 213 | 2608272,\ 214 | -4819459,\ 215 | -6296926,\ 216 | 0,\ 217 | 6296926,\ 218 | 4819459,\ 219 | -2608272,\ 220 | -6815744,\ 221 | -2608272,\ 222 | 4819459,\ 223 | 6296926,\ 224 | 0,\ 225 | -6296926,\ 226 | -4819459,\ 227 | 2608272,\ 228 | },\ 229 | {\ 230 | 6815744,\ 231 | 3786624,\ 232 | -2608272,\ 233 | -6684781,\ 234 | -4819459,\ 235 | 1329686,\ 236 | 6296926,\ 237 | 5667084,\ 238 | 0,\ 239 | -5667084,\ 240 | -6296926,\ 241 | -1329686,\ 242 | 4819459,\ 243 | 6684781,\ 244 | 2608272,\ 245 | -3786624,\ 246 | -6815744,\ 247 | -3786624,\ 248 | 2608272,\ 249 | 6684781,\ 250 | 4819459,\ 251 | -1329686,\ 252 | -6296926,\ 253 | -5667084,\ 254 | 0,\ 255 | 5667084,\ 256 | 6296926,\ 257 | 1329686,\ 258 | -4819459,\ 259 | -6684781,\ 260 | -2608272,\ 261 | 3786624,\ 262 | 6815744,\ 263 | 3786624,\ 264 | -2608272,\ 265 | -6684781,\ 266 | -4819459,\ 267 | 1329686,\ 268 | 6296926,\ 269 | 5667084,\ 270 | 0,\ 271 | -5667084,\ 272 | -6296926,\ 273 | -1329686,\ 274 | 4819459,\ 275 | 6684781,\ 276 | 2608272,\ 277 | -3786624,\ 278 | -6815744,\ 279 | -3786624,\ 280 | 2608272,\ 281 | 6684781,\ 282 | 4819459,\ 283 | -1329686,\ 284 | -6296926,\ 285 | -5667084,\ 286 | 0,\ 287 | 5667084,\ 288 | 6296926,\ 289 | 1329686,\ 290 | -4819459,\ 291 | -6684781,\ 292 | -2608272,\ 293 | 3786624,\ 294 | },\ 295 | {\ 296 | 6815744,\ 297 | -2608272,\ 298 | -4819459,\ 299 | 6296926,\ 300 | 0,\ 301 | -6296926,\ 302 | 4819459,\ 303 | 2608272,\ 304 | -6815744,\ 305 | 2608272,\ 306 | 4819459,\ 307 | -6296926,\ 308 | 0,\ 309 | 6296926,\ 310 | -4819459,\ 311 | -2608272,\ 312 | 6815744,\ 313 | -2608272,\ 314 | -4819459,\ 315 | 6296926,\ 316 | 0,\ 317 | -6296926,\ 318 | 4819459,\ 319 | 2608272,\ 320 | -6815744,\ 321 | 2608272,\ 322 | 4819459,\ 323 | -6296926,\ 324 | 0,\ 325 | 6296926,\ 326 | -4819459,\ 327 | -2608272,\ 328 | 6815744,\ 329 | -2608272,\ 330 | -4819459,\ 331 | 6296926,\ 332 | 0,\ 333 | -6296926,\ 334 | 4819459,\ 335 | 2608272,\ 336 | -6815744,\ 337 | 2608272,\ 338 | 4819459,\ 339 | -6296926,\ 340 | 0,\ 341 | 6296926,\ 342 | -4819459,\ 343 | -2608272,\ 344 | 6815744,\ 345 | -2608272,\ 346 | -4819459,\ 347 | 6296926,\ 348 | 0,\ 349 | -6296926,\ 350 | 4819459,\ 351 | 2608272,\ 352 | -6815744,\ 353 | 2608272,\ 354 | 4819459,\ 355 | -6296926,\ 356 | 0,\ 357 | 6296926,\ 358 | -4819459,\ 359 | -2608272,\ 360 | },\ 361 | {\ 362 | 6815744,\ 363 | -1329686,\ 364 | -6296926,\ 365 | 3786624,\ 366 | 4819459,\ 367 | -5667084,\ 368 | -2608272,\ 369 | 6684781,\ 370 | 0,\ 371 | -6684781,\ 372 | 2608272,\ 373 | 5667084,\ 374 | -4819459,\ 375 | -3786624,\ 376 | 6296926,\ 377 | 1329686,\ 378 | -6815744,\ 379 | 1329686,\ 380 | 6296926,\ 381 | -3786624,\ 382 | -4819459,\ 383 | 5667084,\ 384 | 2608272,\ 385 | -6684781,\ 386 | 0,\ 387 | 6684781,\ 388 | -2608272,\ 389 | -5667084,\ 390 | 4819459,\ 391 | 3786624,\ 392 | -6296926,\ 393 | -1329686,\ 394 | 6815744,\ 395 | -1329686,\ 396 | -6296926,\ 397 | 3786624,\ 398 | 4819459,\ 399 | -5667084,\ 400 | -2608272,\ 401 | 6684781,\ 402 | 0,\ 403 | -6684781,\ 404 | 2608272,\ 405 | 5667084,\ 406 | -4819459,\ 407 | -3786624,\ 408 | 6296926,\ 409 | 1329686,\ 410 | -6815744,\ 411 | 1329686,\ 412 | 6296926,\ 413 | -3786624,\ 414 | -4819459,\ 415 | 5667084,\ 416 | 2608272,\ 417 | -6684781,\ 418 | 0,\ 419 | 6684781,\ 420 | -2608272,\ 421 | -5667084,\ 422 | 4819459,\ 423 | 3786624,\ 424 | -6296926,\ 425 | -1329686,\ 426 | },\ 427 | {\ 428 | 6815744,\ 429 | 1329686,\ 430 | -6296926,\ 431 | -3786624,\ 432 | 4819459,\ 433 | 5667084,\ 434 | -2608272,\ 435 | -6684781,\ 436 | 0,\ 437 | 6684781,\ 438 | 2608272,\ 439 | -5667084,\ 440 | -4819459,\ 441 | 3786624,\ 442 | 6296926,\ 443 | -1329686,\ 444 | -6815744,\ 445 | -1329686,\ 446 | 6296926,\ 447 | 3786624,\ 448 | -4819459,\ 449 | -5667084,\ 450 | 2608272,\ 451 | 6684781,\ 452 | 0,\ 453 | -6684781,\ 454 | -2608272,\ 455 | 5667084,\ 456 | 4819459,\ 457 | -3786624,\ 458 | -6296926,\ 459 | 1329686,\ 460 | 6815744,\ 461 | 1329686,\ 462 | -6296926,\ 463 | -3786624,\ 464 | 4819459,\ 465 | 5667084,\ 466 | -2608272,\ 467 | -6684781,\ 468 | 0,\ 469 | 6684781,\ 470 | 2608272,\ 471 | -5667084,\ 472 | -4819459,\ 473 | 3786624,\ 474 | 6296926,\ 475 | -1329686,\ 476 | -6815744,\ 477 | -1329686,\ 478 | 6296926,\ 479 | 3786624,\ 480 | -4819459,\ 481 | -5667084,\ 482 | 2608272,\ 483 | 6684781,\ 484 | 0,\ 485 | -6684781,\ 486 | -2608272,\ 487 | 5667084,\ 488 | 4819459,\ 489 | -3786624,\ 490 | -6296926,\ 491 | 1329686,\ 492 | },\ 493 | {\ 494 | 6815744,\ 495 | 0,\ 496 | -6815744,\ 497 | 0,\ 498 | 6815744,\ 499 | 0,\ 500 | -6815744,\ 501 | 0,\ 502 | 6815744,\ 503 | 0,\ 504 | -6815744,\ 505 | 0,\ 506 | 6815744,\ 507 | 0,\ 508 | -6815744,\ 509 | 0,\ 510 | 6815744,\ 511 | 0,\ 512 | -6815744,\ 513 | 0,\ 514 | 6815744,\ 515 | 0,\ 516 | -6815744,\ 517 | 0,\ 518 | 6815744,\ 519 | 0,\ 520 | -6815744,\ 521 | 0,\ 522 | 6815744,\ 523 | 0,\ 524 | -6815744,\ 525 | 0,\ 526 | 6815744,\ 527 | 0,\ 528 | -6815744,\ 529 | 0,\ 530 | 6815744,\ 531 | 0,\ 532 | -6815744,\ 533 | 0,\ 534 | 6815744,\ 535 | 0,\ 536 | -6815744,\ 537 | 0,\ 538 | 6815744,\ 539 | 0,\ 540 | -6815744,\ 541 | 0,\ 542 | 6815744,\ 543 | 0,\ 544 | -6815744,\ 545 | 0,\ 546 | 6815744,\ 547 | 0,\ 548 | -6815744,\ 549 | 0,\ 550 | 6815744,\ 551 | 0,\ 552 | -6815744,\ 553 | 0,\ 554 | 6815744,\ 555 | 0,\ 556 | -6815744,\ 557 | 0,\ 558 | },\ 559 | }; 560 | 561 | #endif/*_ALE_SYMBOL_LIBRARY_H*/ 562 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /src/golay.c: -------------------------------------------------------------------------------- 1 | /* -*- c -*- 2 | * 3 | * Copyright (C) 2000 - 2001 4 | * Charles Brain (chbrain@dircon.co.uk) 5 | * Ilkka Toivanen (pile@aimo.kareltek.fi) 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 | * 21 | * File: 22 | * golay.c - Table lookup implementation of extended Golay (24,12) Code 23 | * 24 | * Version: 25 | * $Revision: 1.1.1.1 $ 26 | * 27 | * Date: 28 | * $Date: 2001/05/23 20:19:50 $ 29 | * 30 | * Author: 31 | * Charles Brain 32 | * Ilkka Toivanen 33 | * 34 | * History: 35 | * $Log: golay.c,v $ 36 | * Revision 1.1.1.1 2001/05/23 20:19:50 pile 37 | * Initial version for sourceforge.net 38 | * 39 | * Revision 0.0.1.1 2001/05/17 07:09:33 pile 40 | * LinuxALE 41 | * 42 | */ 43 | 44 | #include 45 | #include "golay.h" 46 | 47 | /* 48 | * the following array uses the 12 bit data as the index and returns 49 | * the parity value. 50 | * 51 | */ 52 | 53 | const unsigned int encode_table[]={ 54 | 0x000,0x5C7,0xB8D,0xE4A,0x2DE,0x719,0x953,0xC94, 55 | 0x5BC,0x07B,0xE31,0xBF6,0x762,0x2A5,0xCEF,0x928, 56 | 0xB78,0xEBF,0x0F5,0x532,0x9A6,0xC61,0x22B,0x7EC, 57 | 0xEC4,0xB03,0x549,0x08E,0xC1A,0x9DD,0x797,0x250, 58 | 0x337,0x6F0,0x8BA,0xD7D,0x1E9,0x42E,0xA64,0xFA3, 59 | 0x68B,0x34C,0xD06,0x8C1,0x455,0x192,0xFD8,0xA1F, 60 | 0x84F,0xD88,0x3C2,0x605,0xA91,0xF56,0x11C,0x4DB, 61 | 0xDF3,0x834,0x67E,0x3B9,0xF2D,0xAEA,0x4A0,0x167, 62 | 0x66D,0x3AA,0xDE0,0x827,0x4B3,0x174,0xF3E,0xAF9, 63 | 0x3D1,0x616,0x85C,0xD9B,0x10F,0x4C8,0xA82,0xF45, 64 | 0xD15,0x8D2,0x698,0x35F,0xFCB,0xA0C,0x446,0x181, 65 | 0x8A9,0xD6E,0x324,0x6E3,0xA77,0xFB0,0x1FA,0x43D, 66 | 0x55A,0x09D,0xED7,0xB10,0x784,0x243,0xC09,0x9CE, 67 | 0x0E6,0x521,0xB6B,0xEAC,0x238,0x7FF,0x9B5,0xC72, 68 | 0xE22,0xBE5,0x5AF,0x068,0xCFC,0x93B,0x771,0x2B6, 69 | 0xB9E,0xE59,0x013,0x5D4,0x940,0xC87,0x2CD,0x70A, 70 | 0xCD9,0x91E,0x754,0x293,0xE07,0xBC0,0x58A,0x04D, 71 | 0x965,0xCA2,0x2E8,0x72F,0xBBB,0xE7C,0x036,0x5F1, 72 | 0x7A1,0x266,0xC2C,0x9EB,0x57F,0x0B8,0xEF2,0xB35, 73 | 0x21D,0x7DA,0x990,0xC57,0x0C3,0x504,0xB4E,0xE89, 74 | 0xFEE,0xA29,0x463,0x1A4,0xD30,0x8F7,0x6BD,0x37A, 75 | 0xA52,0xF95,0x1DF,0x418,0x88C,0xD4B,0x301,0x6C6, 76 | 0x496,0x151,0xF1B,0xADC,0x648,0x38F,0xDC5,0x802, 77 | 0x12A,0x4ED,0xAA7,0xF60,0x3F4,0x633,0x879,0xDBE, 78 | 0xAB4,0xF73,0x139,0x4FE,0x86A,0xDAD,0x3E7,0x620, 79 | 0xF08,0xACF,0x485,0x142,0xDD6,0x811,0x65B,0x39C, 80 | 0x1CC,0x40B,0xA41,0xF86,0x312,0x6D5,0x89F,0xD58, 81 | 0x470,0x1B7,0xFFD,0xA3A,0x6AE,0x369,0xD23,0x8E4, 82 | 0x983,0xC44,0x20E,0x7C9,0xB5D,0xE9A,0x0D0,0x517, 83 | 0xC3F,0x9F8,0x7B2,0x275,0xEE1,0xB26,0x56C,0x0AB, 84 | 0x2FB,0x73C,0x976,0xCB1,0x025,0x5E2,0xBA8,0xE6F, 85 | 0x747,0x280,0xCCA,0x90D,0x599,0x05E,0xE14,0xBD3, 86 | 0xC76,0x9B1,0x7FB,0x23C,0xEA8,0xB6F,0x525,0x0E2, 87 | 0x9CA,0xC0D,0x247,0x780,0xB14,0xED3,0x099,0x55E, 88 | 0x70E,0x2C9,0xC83,0x944,0x5D0,0x017,0xE5D,0xB9A, 89 | 0x2B2,0x775,0x93F,0xCF8,0x06C,0x5AB,0xBE1,0xE26, 90 | 0xF41,0xA86,0x4CC,0x10B,0xD9F,0x858,0x612,0x3D5, 91 | 0xAFD,0xF3A,0x170,0x4B7,0x823,0xDE4,0x3AE,0x669, 92 | 0x439,0x1FE,0xFB4,0xA73,0x6E7,0x320,0xD6A,0x8AD, 93 | 0x185,0x442,0xA08,0xFCF,0x35B,0x69C,0x8D6,0xD11, 94 | 0xA1B,0xFDC,0x196,0x451,0x8C5,0xD02,0x348,0x68F, 95 | 0xFA7,0xA60,0x42A,0x1ED,0xD79,0x8BE,0x6F4,0x333, 96 | 0x163,0x4A4,0xAEE,0xF29,0x3BD,0x67A,0x830,0xDF7, 97 | 0x4DF,0x118,0xF52,0xA95,0x601,0x3C6,0xD8C,0x84B, 98 | 0x92C,0xCEB,0x2A1,0x766,0xBF2,0xE35,0x07F,0x5B8, 99 | 0xC90,0x957,0x71D,0x2DA,0xE4E,0xB89,0x5C3,0x004, 100 | 0x254,0x793,0x9D9,0xC1E,0x08A,0x54D,0xB07,0xEC0, 101 | 0x7E8,0x22F,0xC65,0x9A2,0x536,0x0F1,0xEBB,0xB7C, 102 | 0x0AF,0x568,0xB22,0xEE5,0x271,0x7B6,0x9FC,0xC3B, 103 | 0x513,0x0D4,0xE9E,0xB59,0x7CD,0x20A,0xC40,0x987, 104 | 0xBD7,0xE10,0x05A,0x59D,0x909,0xCCE,0x284,0x743, 105 | 0xE6B,0xBAC,0x5E6,0x021,0xCB5,0x972,0x738,0x2FF, 106 | 0x398,0x65F,0x815,0xDD2,0x146,0x481,0xACB,0xF0C, 107 | 0x624,0x3E3,0xDA9,0x86E,0x4FA,0x13D,0xF77,0xAB0, 108 | 0x8E0,0xD27,0x36D,0x6AA,0xA3E,0xFF9,0x1B3,0x474, 109 | 0xD5C,0x89B,0x6D1,0x316,0xF82,0xA45,0x40F,0x1C8, 110 | 0x6C2,0x305,0xD4F,0x888,0x41C,0x1DB,0xF91,0xA56, 111 | 0x37E,0x6B9,0x8F3,0xD34,0x1A0,0x467,0xA2D,0xFEA, 112 | 0xDBA,0x87D,0x637,0x3F0,0xF64,0xAA3,0x4E9,0x12E, 113 | 0x806,0xDC1,0x38B,0x64C,0xAD8,0xF1F,0x155,0x492, 114 | 0x5F5,0x032,0xE78,0xBBF,0x72B,0x2EC,0xCA6,0x961, 115 | 0x049,0x58E,0xBC4,0xE03,0x297,0x750,0x91A,0xCDD, 116 | 0xE8D,0xB4A,0x500,0x0C7,0xC53,0x994,0x7DE,0x219, 117 | 0xB31,0xEF6,0x0BC,0x57B,0x9EF,0xC28,0x262,0x7A5, 118 | 0xD2B,0x8EC,0x6A6,0x361,0xFF5,0xA32,0x478,0x1BF, 119 | 0x897,0xD50,0x31A,0x6DD,0xA49,0xF8E,0x1C4,0x403, 120 | 0x653,0x394,0xDDE,0x819,0x48D,0x14A,0xF00,0xAC7, 121 | 0x3EF,0x628,0x862,0xDA5,0x131,0x4F6,0xABC,0xF7B, 122 | 0xE1C,0xBDB,0x591,0x056,0xCC2,0x905,0x74F,0x288, 123 | 0xBA0,0xE67,0x02D,0x5EA,0x97E,0xCB9,0x2F3,0x734, 124 | 0x564,0x0A3,0xEE9,0xB2E,0x7BA,0x27D,0xC37,0x9F0, 125 | 0x0D8,0x51F,0xB55,0xE92,0x206,0x7C1,0x98B,0xC4C, 126 | 0xB46,0xE81,0x0CB,0x50C,0x998,0xC5F,0x215,0x7D2, 127 | 0xEFA,0xB3D,0x577,0x0B0,0xC24,0x9E3,0x7A9,0x26E, 128 | 0x03E,0x5F9,0xBB3,0xE74,0x2E0,0x727,0x96D,0xCAA, 129 | 0x582,0x045,0xE0F,0xBC8,0x75C,0x29B,0xCD1,0x916, 130 | 0x871,0xDB6,0x3FC,0x63B,0xAAF,0xF68,0x122,0x4E5, 131 | 0xDCD,0x80A,0x640,0x387,0xF13,0xAD4,0x49E,0x159, 132 | 0x309,0x6CE,0x884,0xD43,0x1D7,0x410,0xA5A,0xF9D, 133 | 0x6B5,0x372,0xD38,0x8FF,0x46B,0x1AC,0xFE6,0xA21, 134 | 0x1F2,0x435,0xA7F,0xFB8,0x32C,0x6EB,0x8A1,0xD66, 135 | 0x44E,0x189,0xFC3,0xA04,0x690,0x357,0xD1D,0x8DA, 136 | 0xA8A,0xF4D,0x107,0x4C0,0x854,0xD93,0x3D9,0x61E, 137 | 0xF36,0xAF1,0x4BB,0x17C,0xDE8,0x82F,0x665,0x3A2, 138 | 0x2C5,0x702,0x948,0xC8F,0x01B,0x5DC,0xB96,0xE51, 139 | 0x779,0x2BE,0xCF4,0x933,0x5A7,0x060,0xE2A,0xBED, 140 | 0x9BD,0xC7A,0x230,0x7F7,0xB63,0xEA4,0x0EE,0x529, 141 | 0xC01,0x9C6,0x78C,0x24B,0xEDF,0xB18,0x552,0x095, 142 | 0x79F,0x258,0xC12,0x9D5,0x541,0x086,0xECC,0xB0B, 143 | 0x223,0x7E4,0x9AE,0xC69,0x0FD,0x53A,0xB70,0xEB7, 144 | 0xCE7,0x920,0x76A,0x2AD,0xE39,0xBFE,0x5B4,0x073, 145 | 0x95B,0xC9C,0x2D6,0x711,0xB85,0xE42,0x008,0x5CF, 146 | 0x4A8,0x16F,0xF25,0xAE2,0x676,0x3B1,0xDFB,0x83C, 147 | 0x114,0x4D3,0xA99,0xF5E,0x3CA,0x60D,0x847,0xD80, 148 | 0xFD0,0xA17,0x45D,0x19A,0xD0E,0x8C9,0x683,0x344, 149 | 0xA6C,0xFAB,0x1E1,0x426,0x8B2,0xD75,0x33F,0x6F8, 150 | 0x15D,0x49A,0xAD0,0xF17,0x383,0x644,0x80E,0xDC9, 151 | 0x4E1,0x126,0xF6C,0xAAB,0x63F,0x3F8,0xDB2,0x875, 152 | 0xA25,0xFE2,0x1A8,0x46F,0x8FB,0xD3C,0x376,0x6B1, 153 | 0xF99,0xA5E,0x414,0x1D3,0xD47,0x880,0x6CA,0x30D, 154 | 0x26A,0x7AD,0x9E7,0xC20,0x0B4,0x573,0xB39,0xEFE, 155 | 0x7D6,0x211,0xC5B,0x99C,0x508,0x0CF,0xE85,0xB42, 156 | 0x912,0xCD5,0x29F,0x758,0xBCC,0xE0B,0x041,0x586, 157 | 0xCAE,0x969,0x723,0x2E4,0xE70,0xBB7,0x5FD,0x03A, 158 | 0x730,0x2F7,0xCBD,0x97A,0x5EE,0x029,0xE63,0xBA4, 159 | 0x28C,0x74B,0x901,0xCC6,0x052,0x595,0xBDF,0xE18, 160 | 0xC48,0x98F,0x7C5,0x202,0xE96,0xB51,0x51B,0x0DC, 161 | 0x9F4,0xC33,0x279,0x7BE,0xB2A,0xEED,0x0A7,0x560, 162 | 0x407,0x1C0,0xF8A,0xA4D,0x6D9,0x31E,0xD54,0x893, 163 | 0x1BB,0x47C,0xA36,0xFF1,0x365,0x6A2,0x8E8,0xD2F, 164 | 0xF7F,0xAB8,0x4F2,0x135,0xDA1,0x866,0x62C,0x3EB, 165 | 0xAC3,0xF04,0x14E,0x489,0x81D,0xDDA,0x390,0x657, 166 | 0xD84,0x843,0x609,0x3CE,0xF5A,0xA9D,0x4D7,0x110, 167 | 0x838,0xDFF,0x3B5,0x672,0xAE6,0xF21,0x16B,0x4AC, 168 | 0x6FC,0x33B,0xD71,0x8B6,0x422,0x1E5,0xFAF,0xA68, 169 | 0x340,0x687,0x8CD,0xD0A,0x19E,0x459,0xA13,0xFD4, 170 | 0xEB3,0xB74,0x53E,0x0F9,0xC6D,0x9AA,0x7E0,0x227, 171 | 0xB0F,0xEC8,0x082,0x545,0x9D1,0xC16,0x25C,0x79B, 172 | 0x5CB,0x00C,0xE46,0xB81,0x715,0x2D2,0xC98,0x95F, 173 | 0x077,0x5B0,0xBFA,0xE3D,0x2A9,0x76E,0x924,0xCE3, 174 | 0xBE9,0xE2E,0x064,0x5A3,0x937,0xCF0,0x2BA,0x77D, 175 | 0xE55,0xB92,0x5D8,0x01F,0xC8B,0x94C,0x706,0x2C1, 176 | 0x091,0x556,0xB1C,0xEDB,0x24F,0x788,0x9C2,0xC05, 177 | 0x52D,0x0EA,0xEA0,0xB67,0x7F3,0x234,0xC7E,0x9B9, 178 | 0x8DE,0xD19,0x353,0x694,0xA00,0xFC7,0x18D,0x44A, 179 | 0xD62,0x8A5,0x6EF,0x328,0xFBC,0xA7B,0x431,0x1F6, 180 | 0x3A6,0x661,0x82B,0xDEC,0x178,0x4BF,0xAF5,0xF32, 181 | 0x61A,0x3DD,0xD97,0x850,0x4C4,0x103,0xF49,0xA8E, 182 | 0xF92,0xA55,0x41F,0x1D8,0xD4C,0x88B,0x6C1,0x306, 183 | 0xA2E,0xFE9,0x1A3,0x464,0x8F0,0xD37,0x37D,0x6BA, 184 | 0x4EA,0x12D,0xF67,0xAA0,0x634,0x3F3,0xDB9,0x87E, 185 | 0x156,0x491,0xADB,0xF1C,0x388,0x64F,0x805,0xDC2, 186 | 0xCA5,0x962,0x728,0x2EF,0xE7B,0xBBC,0x5F6,0x031, 187 | 0x919,0xCDE,0x294,0x753,0xBC7,0xE00,0x04A,0x58D, 188 | 0x7DD,0x21A,0xC50,0x997,0x503,0x0C4,0xE8E,0xB49, 189 | 0x261,0x7A6,0x9EC,0xC2B,0x0BF,0x578,0xB32,0xEF5, 190 | 0x9FF,0xC38,0x272,0x7B5,0xB21,0xEE6,0x0AC,0x56B, 191 | 0xC43,0x984,0x7CE,0x209,0xE9D,0xB5A,0x510,0x0D7, 192 | 0x287,0x740,0x90A,0xCCD,0x059,0x59E,0xBD4,0xE13, 193 | 0x73B,0x2FC,0xCB6,0x971,0x5E5,0x022,0xE68,0xBAF, 194 | 0xAC8,0xF0F,0x145,0x482,0x816,0xDD1,0x39B,0x65C, 195 | 0xF74,0xAB3,0x4F9,0x13E,0xDAA,0x86D,0x627,0x3E0, 196 | 0x1B0,0x477,0xA3D,0xFFA,0x36E,0x6A9,0x8E3,0xD24, 197 | 0x40C,0x1CB,0xF81,0xA46,0x6D2,0x315,0xD5F,0x898, 198 | 0x34B,0x68C,0x8C6,0xD01,0x195,0x452,0xA18,0xFDF, 199 | 0x6F7,0x330,0xD7A,0x8BD,0x429,0x1EE,0xFA4,0xA63, 200 | 0x833,0xDF4,0x3BE,0x679,0xAED,0xF2A,0x160,0x4A7, 201 | 0xD8F,0x848,0x602,0x3C5,0xF51,0xA96,0x4DC,0x11B, 202 | 0x07C,0x5BB,0xBF1,0xE36,0x2A2,0x765,0x92F,0xCE8, 203 | 0x5C0,0x007,0xE4D,0xB8A,0x71E,0x2D9,0xC93,0x954, 204 | 0xB04,0xEC3,0x089,0x54E,0x9DA,0xC1D,0x257,0x790, 205 | 0xEB8,0xB7F,0x535,0x0F2,0xC66,0x9A1,0x7EB,0x22C, 206 | 0x526,0x0E1,0xEAB,0xB6C,0x7F8,0x23F,0xC75,0x9B2, 207 | 0x09A,0x55D,0xB17,0xED0,0x244,0x783,0x9C9,0xC0E, 208 | 0xE5E,0xB99,0x5D3,0x014,0xC80,0x947,0x70D,0x2CA, 209 | 0xBE2,0xE25,0x06F,0x5A8,0x93C,0xCFB,0x2B1,0x776, 210 | 0x611,0x3D6,0xD9C,0x85B,0x4CF,0x108,0xF42,0xA85, 211 | 0x3AD,0x66A,0x820,0xDE7,0x173,0x4B4,0xAFE,0xF39, 212 | 0xD69,0x8AE,0x6E4,0x323,0xFB7,0xA70,0x43A,0x1FD, 213 | 0x8D5,0xD12,0x358,0x69F,0xA0B,0xFCC,0x186,0x441, 214 | 0x3E4,0x623,0x869,0xDAE,0x13A,0x4FD,0xAB7,0xF70, 215 | 0x658,0x39F,0xDD5,0x812,0x486,0x141,0xF0B,0xACC, 216 | 0x89C,0xD5B,0x311,0x6D6,0xA42,0xF85,0x1CF,0x408, 217 | 0xD20,0x8E7,0x6AD,0x36A,0xFFE,0xA39,0x473,0x1B4, 218 | 0x0D3,0x514,0xB5E,0xE99,0x20D,0x7CA,0x980,0xC47, 219 | 0x56F,0x0A8,0xEE2,0xB25,0x7B1,0x276,0xC3C,0x9FB, 220 | 0xBAB,0xE6C,0x026,0x5E1,0x975,0xCB2,0x2F8,0x73F, 221 | 0xE17,0xBD0,0x59A,0x05D,0xCC9,0x90E,0x744,0x283, 222 | 0x589,0x04E,0xE04,0xBC3,0x757,0x290,0xCDA,0x91D, 223 | 0x035,0x5F2,0xBB8,0xE7F,0x2EB,0x72C,0x966,0xCA1, 224 | 0xEF1,0xB36,0x57C,0x0BB,0xC2F,0x9E8,0x7A2,0x265, 225 | 0xB4D,0xE8A,0x0C0,0x507,0x993,0xC54,0x21E,0x7D9, 226 | 0x6BE,0x379,0xD33,0x8F4,0x460,0x1A7,0xFED,0xA2A, 227 | 0x302,0x6C5,0x88F,0xD48,0x1DC,0x41B,0xA51,0xF96, 228 | 0xDC6,0x801,0x64B,0x38C,0xF18,0xADF,0x495,0x152, 229 | 0x87A,0xDBD,0x3F7,0x630,0xAA4,0xF63,0x129,0x4EE, 230 | 0xF3D,0xAFA,0x4B0,0x177,0xDE3,0x824,0x66E,0x3A9, 231 | 0xA81,0xF46,0x10C,0x4CB,0x85F,0xD98,0x3D2,0x615, 232 | 0x445,0x182,0xFC8,0xA0F,0x69B,0x35C,0xD16,0x8D1, 233 | 0x1F9,0x43E,0xA74,0xFB3,0x327,0x6E0,0x8AA,0xD6D, 234 | 0xC0A,0x9CD,0x787,0x240,0xED4,0xB13,0x559,0x09E, 235 | 0x9B6,0xC71,0x23B,0x7FC,0xB68,0xEAF,0x0E5,0x522, 236 | 0x772,0x2B5,0xCFF,0x938,0x5AC,0x06B,0xE21,0xBE6, 237 | 0x2CE,0x709,0x943,0xC84,0x010,0x5D7,0xB9D,0xE5A, 238 | 0x950,0xC97,0x2DD,0x71A,0xB8E,0xE49,0x003,0x5C4, 239 | 0xCEC,0x92B,0x761,0x2A6,0xE32,0xBF5,0x5BF,0x078, 240 | 0x228,0x7EF,0x9A5,0xC62,0x0F6,0x531,0xB7B,0xEBC, 241 | 0x794,0x253,0xC19,0x9DE,0x54A,0x08D,0xEC7,0xB00, 242 | 0xA67,0xFA0,0x1EA,0x42D,0x8B9,0xD7E,0x334,0x6F3, 243 | 0xFDB,0xA1C,0x456,0x191,0xD05,0x8C2,0x688,0x34F, 244 | 0x11F,0x4D8,0xA92,0xF55,0x3C1,0x606,0x84C,0xD8B, 245 | 0x4A3,0x164,0xF2E,0xAE9,0x67D,0x3BA,0xDF0,0x837, 246 | 0x2B9,0x77E,0x934,0xCF3,0x067,0x5A0,0xBEA,0xE2D, 247 | 0x705,0x2C2,0xC88,0x94F,0x5DB,0x01C,0xE56,0xB91, 248 | 0x9C1,0xC06,0x24C,0x78B,0xB1F,0xED8,0x092,0x555, 249 | 0xC7D,0x9BA,0x7F0,0x237,0xEA3,0xB64,0x52E,0x0E9, 250 | 0x18E,0x449,0xA03,0xFC4,0x350,0x697,0x8DD,0xD1A, 251 | 0x432,0x1F5,0xFBF,0xA78,0x6EC,0x32B,0xD61,0x8A6, 252 | 0xAF6,0xF31,0x17B,0x4BC,0x828,0xDEF,0x3A5,0x662, 253 | 0xF4A,0xA8D,0x4C7,0x100,0xD94,0x853,0x619,0x3DE, 254 | 0x4D4,0x113,0xF59,0xA9E,0x60A,0x3CD,0xD87,0x840, 255 | 0x168,0x4AF,0xAE5,0xF22,0x3B6,0x671,0x83B,0xDFC, 256 | 0xFAC,0xA6B,0x421,0x1E6,0xD72,0x8B5,0x6FF,0x338, 257 | 0xA10,0xFD7,0x19D,0x45A,0x8CE,0xD09,0x343,0x684, 258 | 0x7E3,0x224,0xC6E,0x9A9,0x53D,0x0FA,0xEB0,0xB77, 259 | 0x25F,0x798,0x9D2,0xC15,0x081,0x546,0xB0C,0xECB, 260 | 0xC9B,0x95C,0x716,0x2D1,0xE45,0xB82,0x5C8,0x00F, 261 | 0x927,0xCE0,0x2AA,0x76D,0xBF9,0xE3E,0x074,0x5B3, 262 | 0xE60,0xBA7,0x5ED,0x02A,0xCBE,0x979,0x733,0x2F4, 263 | 0xBDC,0xE1B,0x051,0x596,0x902,0xCC5,0x28F,0x748, 264 | 0x518,0x0DF,0xE95,0xB52,0x7C6,0x201,0xC4B,0x98C, 265 | 0x0A4,0x563,0xB29,0xEEE,0x27A,0x7BD,0x9F7,0xC30, 266 | 0xD57,0x890,0x6DA,0x31D,0xF89,0xA4E,0x404,0x1C3, 267 | 0x8EB,0xD2C,0x366,0x6A1,0xA35,0xFF2,0x1B8,0x47F, 268 | 0x62F,0x3E8,0xDA2,0x865,0x4F1,0x136,0xF7C,0xABB, 269 | 0x393,0x654,0x81E,0xDD9,0x14D,0x48A,0xAC0,0xF07, 270 | 0x80D,0xDCA,0x380,0x647,0xAD3,0xF14,0x15E,0x499, 271 | 0xDB1,0x876,0x63C,0x3FB,0xF6F,0xAA8,0x4E2,0x125, 272 | 0x375,0x6B2,0x8F8,0xD3F,0x1AB,0x46C,0xA26,0xFE1, 273 | 0x6C9,0x30E,0xD44,0x883,0x417,0x1D0,0xF9A,0xA5D, 274 | 0xB3A,0xEFD,0x0B7,0x570,0x9E4,0xC23,0x269,0x7AE, 275 | 0xE86,0xB41,0x50B,0x0CC,0xC58,0x99F,0x7D5,0x212, 276 | 0x042,0x585,0xBCF,0xE08,0x29C,0x75B,0x911,0xCD6, 277 | 0x5FE,0x039,0xE73,0xBB4,0x720,0x2E7,0xCAD,0x96A, 278 | 0xECF,0xB08,0x542,0x085,0xC11,0x9D6,0x79C,0x25B, 279 | 0xB73,0xEB4,0x0FE,0x539,0x9AD,0xC6A,0x220,0x7E7, 280 | 0x5B7,0x070,0xE3A,0xBFD,0x769,0x2AE,0xCE4,0x923, 281 | 0x00B,0x5CC,0xB86,0xE41,0x2D5,0x712,0x958,0xC9F, 282 | 0xDF8,0x83F,0x675,0x3B2,0xF26,0xAE1,0x4AB,0x16C, 283 | 0x844,0xD83,0x3C9,0x60E,0xA9A,0xF5D,0x117,0x4D0, 284 | 0x680,0x347,0xD0D,0x8CA,0x45E,0x199,0xFD3,0xA14, 285 | 0x33C,0x6FB,0x8B1,0xD76,0x1E2,0x425,0xA6F,0xFA8, 286 | 0x8A2,0xD65,0x32F,0x6E8,0xA7C,0xFBB,0x1F1,0x436, 287 | 0xD1E,0x8D9,0x693,0x354,0xFC0,0xA07,0x44D,0x18A, 288 | 0x3DA,0x61D,0x857,0xD90,0x104,0x4C3,0xA89,0xF4E, 289 | 0x666,0x3A1,0xDEB,0x82C,0x4B8,0x17F,0xF35,0xAF2, 290 | 0xB95,0xE52,0x018,0x5DF,0x94B,0xC8C,0x2C6,0x701, 291 | 0xE29,0xBEE,0x5A4,0x063,0xCF7,0x930,0x77A,0x2BD, 292 | 0x0ED,0x52A,0xB60,0xEA7,0x233,0x7F4,0x9BE,0xC79, 293 | 0x551,0x096,0xEDC,0xB1B,0x78F,0x248,0xC02,0x9C5, 294 | 0x216,0x7D1,0x99B,0xC5C,0x0C8,0x50F,0xB45,0xE82, 295 | 0x7AA,0x26D,0xC27,0x9E0,0x574,0x0B3,0xEF9,0xB3E, 296 | 0x96E,0xCA9,0x2E3,0x724,0xBB0,0xE77,0x03D,0x5FA, 297 | 0xCD2,0x915,0x75F,0x298,0xE0C,0xBCB,0x581,0x046, 298 | 0x121,0x4E6,0xAAC,0xF6B,0x3FF,0x638,0x872,0xDB5, 299 | 0x49D,0x15A,0xF10,0xAD7,0x643,0x384,0xDCE,0x809, 300 | 0xA59,0xF9E,0x1D4,0x413,0x887,0xD40,0x30A,0x6CD, 301 | 0xFE5,0xA22,0x468,0x1AF,0xD3B,0x8FC,0x6B6,0x371, 302 | 0x47B,0x1BC,0xFF6,0xA31,0x6A5,0x362,0xD28,0x8EF, 303 | 0x1C7,0x400,0xA4A,0xF8D,0x319,0x6DE,0x894,0xD53, 304 | 0xF03,0xAC4,0x48E,0x149,0xDDD,0x81A,0x650,0x397, 305 | 0xABF,0xF78,0x132,0x4F5,0x861,0xDA6,0x3EC,0x62B, 306 | 0x74C,0x28B,0xCC1,0x906,0x592,0x055,0xE1F,0xBD8, 307 | 0x2F0,0x737,0x97D,0xCBA,0x02E,0x5E9,0xBA3,0xE64, 308 | 0xC34,0x9F3,0x7B9,0x27E,0xEEA,0xB2D,0x567,0x0A0, 309 | 0x988,0xC4F,0x205,0x7C2,0xB56,0xE91,0x0DB,0x51C, 310 | 0xAE3,0xF24,0x16E,0x4A9,0x83D,0xDFA,0x3B0,0x677, 311 | 0xF5F,0xA98,0x4D2,0x115,0xD81,0x846,0x60C,0x3CB, 312 | 0x19B,0x45C,0xA16,0xFD1,0x345,0x682,0x8C8,0xD0F, 313 | 0x427,0x1E0,0xFAA,0xA6D,0x6F9,0x33E,0xD74,0x8B3, 314 | 0x9D4,0xC13,0x259,0x79E,0xB0A,0xECD,0x087,0x540, 315 | 0xC68,0x9AF,0x7E5,0x222,0xEB6,0xB71,0x53B,0x0FC, 316 | 0x2AC,0x76B,0x921,0xCE6,0x072,0x5B5,0xBFF,0xE38, 317 | 0x710,0x2D7,0xC9D,0x95A,0x5CE,0x009,0xE43,0xB84, 318 | 0xC8E,0x949,0x703,0x2C4,0xE50,0xB97,0x5DD,0x01A, 319 | 0x932,0xCF5,0x2BF,0x778,0xBEC,0xE2B,0x061,0x5A6, 320 | 0x7F6,0x231,0xC7B,0x9BC,0x528,0x0EF,0xEA5,0xB62, 321 | 0x24A,0x78D,0x9C7,0xC00,0x094,0x553,0xB19,0xEDE, 322 | 0xFB9,0xA7E,0x434,0x1F3,0xD67,0x8A0,0x6EA,0x32D, 323 | 0xA05,0xFC2,0x188,0x44F,0x8DB,0xD1C,0x356,0x691, 324 | 0x4C1,0x106,0xF4C,0xA8B,0x61F,0x3D8,0xD92,0x855, 325 | 0x17D,0x4BA,0xAF0,0xF37,0x3A3,0x664,0x82E,0xDE9, 326 | 0x63A,0x3FD,0xDB7,0x870,0x4E4,0x123,0xF69,0xAAE, 327 | 0x386,0x641,0x80B,0xDCC,0x158,0x49F,0xAD5,0xF12, 328 | 0xD42,0x885,0x6CF,0x308,0xF9C,0xA5B,0x411,0x1D6, 329 | 0x8FE,0xD39,0x373,0x6B4,0xA20,0xFE7,0x1AD,0x46A, 330 | 0x50D,0x0CA,0xE80,0xB47,0x7D3,0x214,0xC5E,0x999, 331 | 0x0B1,0x576,0xB3C,0xEFB,0x26F,0x7A8,0x9E2,0xC25, 332 | 0xE75,0xBB2,0x5F8,0x03F,0xCAB,0x96C,0x726,0x2E1, 333 | 0xBC9,0xE0E,0x044,0x583,0x917,0xCD0,0x29A,0x75D, 334 | 0x057,0x590,0xBDA,0xE1D,0x289,0x74E,0x904,0xCC3, 335 | 0x5EB,0x02C,0xE66,0xBA1,0x735,0x2F2,0xCB8,0x97F, 336 | 0xB2F,0xEE8,0x0A2,0x565,0x9F1,0xC36,0x27C,0x7BB, 337 | 0xE93,0xB54,0x51E,0x0D9,0xC4D,0x98A,0x7C0,0x207, 338 | 0x360,0x6A7,0x8ED,0xD2A,0x1BE,0x479,0xA33,0xFF4, 339 | 0x6DC,0x31B,0xD51,0x896,0x402,0x1C5,0xF8F,0xA48, 340 | 0x818,0xDDF,0x395,0x652,0xAC6,0xF01,0x14B,0x48C, 341 | 0xDA4,0x863,0x629,0x3EE,0xF7A,0xABD,0x4F7,0x130, 342 | 0x695,0x352,0xD18,0x8DF,0x44B,0x18C,0xFC6,0xA01, 343 | 0x329,0x6EE,0x8A4,0xD63,0x1F7,0x430,0xA7A,0xFBD, 344 | 0xDED,0x82A,0x660,0x3A7,0xF33,0xAF4,0x4BE,0x179, 345 | 0x851,0xD96,0x3DC,0x61B,0xA8F,0xF48,0x102,0x4C5, 346 | 0x5A2,0x065,0xE2F,0xBE8,0x77C,0x2BB,0xCF1,0x936, 347 | 0x01E,0x5D9,0xB93,0xE54,0x2C0,0x707,0x94D,0xC8A, 348 | 0xEDA,0xB1D,0x557,0x090,0xC04,0x9C3,0x789,0x24E, 349 | 0xB66,0xEA1,0x0EB,0x52C,0x9B8,0xC7F,0x235,0x7F2, 350 | 0x0F8,0x53F,0xB75,0xEB2,0x226,0x7E1,0x9AB,0xC6C, 351 | 0x544,0x083,0xEC9,0xB0E,0x79A,0x25D,0xC17,0x9D0, 352 | 0xB80,0xE47,0x00D,0x5CA,0x95E,0xC99,0x2D3,0x714, 353 | 0xE3C,0xBFB,0x5B1,0x076,0xCE2,0x925,0x76F,0x2A8, 354 | 0x3CF,0x608,0x842,0xD85,0x111,0x4D6,0xA9C,0xF5B, 355 | 0x673,0x3B4,0xDFE,0x839,0x4AD,0x16A,0xF20,0xAE7, 356 | 0x8B7,0xD70,0x33A,0x6FD,0xA69,0xFAE,0x1E4,0x423, 357 | 0xD0B,0x8CC,0x686,0x341,0xFD5,0xA12,0x458,0x19F, 358 | 0xA4C,0xF8B,0x1C1,0x406,0x892,0xD55,0x31F,0x6D8, 359 | 0xFF0,0xA37,0x47D,0x1BA,0xD2E,0x8E9,0x6A3,0x364, 360 | 0x134,0x4F3,0xAB9,0xF7E,0x3EA,0x62D,0x867,0xDA0, 361 | 0x488,0x14F,0xF05,0xAC2,0x656,0x391,0xDDB,0x81C, 362 | 0x97B,0xCBC,0x2F6,0x731,0xBA5,0xE62,0x028,0x5EF, 363 | 0xCC7,0x900,0x74A,0x28D,0xE19,0xBDE,0x594,0x053, 364 | 0x203,0x7C4,0x98E,0xC49,0x0DD,0x51A,0xB50,0xE97, 365 | 0x7BF,0x278,0xC32,0x9F5,0x561,0x0A6,0xEEC,0xB2B, 366 | 0xC21,0x9E6,0x7AC,0x26B,0xEFF,0xB38,0x572,0x0B5, 367 | 0x99D,0xC5A,0x210,0x7D7,0xB43,0xE84,0x0CE,0x509, 368 | 0x759,0x29E,0xCD4,0x913,0x587,0x040,0xE0A,0xBCD, 369 | 0x2E5,0x722,0x968,0xCAF,0x03B,0x5FC,0xBB6,0xE71, 370 | 0xF16,0xAD1,0x49B,0x15C,0xDC8,0x80F,0x645,0x382, 371 | 0xAAA,0xF6D,0x127,0x4E0,0x874,0xDB3,0x3F9,0x63E, 372 | 0x46E,0x1A9,0xFE3,0xA24,0x6B0,0x377,0xD3D,0x8FA, 373 | 0x1D2,0x415,0xA5F,0xF98,0x30C,0x6CB,0x881,0xD46, 374 | 0x7C8,0x20F,0xC45,0x982,0x516,0x0D1,0xE9B,0xB5C, 375 | 0x274,0x7B3,0x9F9,0xC3E,0x0AA,0x56D,0xB27,0xEE0, 376 | 0xCB0,0x977,0x73D,0x2FA,0xE6E,0xBA9,0x5E3,0x024, 377 | 0x90C,0xCCB,0x281,0x746,0xBD2,0xE15,0x05F,0x598, 378 | 0x4FF,0x138,0xF72,0xAB5,0x621,0x3E6,0xDAC,0x86B, 379 | 0x143,0x484,0xACE,0xF09,0x39D,0x65A,0x810,0xDD7, 380 | 0xF87,0xA40,0x40A,0x1CD,0xD59,0x89E,0x6D4,0x313, 381 | 0xA3B,0xFFC,0x1B6,0x471,0x8E5,0xD22,0x368,0x6AF, 382 | 0x1A5,0x462,0xA28,0xFEF,0x37B,0x6BC,0x8F6,0xD31, 383 | 0x419,0x1DE,0xF94,0xA53,0x6C7,0x300,0xD4A,0x88D, 384 | 0xADD,0xF1A,0x150,0x497,0x803,0xDC4,0x38E,0x649, 385 | 0xF61,0xAA6,0x4EC,0x12B,0xDBF,0x878,0x632,0x3F5, 386 | 0x292,0x755,0x91F,0xCD8,0x04C,0x58B,0xBC1,0xE06, 387 | 0x72E,0x2E9,0xCA3,0x964,0x5F0,0x037,0xE7D,0xBBA, 388 | 0x9EA,0xC2D,0x267,0x7A0,0xB34,0xEF3,0x0B9,0x57E, 389 | 0xC56,0x991,0x7DB,0x21C,0xE88,0xB4F,0x505,0x0C2, 390 | 0xB11,0xED6,0x09C,0x55B,0x9CF,0xC08,0x242,0x785, 391 | 0xEAD,0xB6A,0x520,0x0E7,0xC73,0x9B4,0x7FE,0x239, 392 | 0x069,0x5AE,0xBE4,0xE23,0x2B7,0x770,0x93A,0xCFD, 393 | 0x5D5,0x012,0xE58,0xB9F,0x70B,0x2CC,0xC86,0x941, 394 | 0x826,0xDE1,0x3AB,0x66C,0xAF8,0xF3F,0x175,0x4B2, 395 | 0xD9A,0x85D,0x617,0x3D0,0xF44,0xA83,0x4C9,0x10E, 396 | 0x35E,0x699,0x8D3,0xD14,0x180,0x447,0xA0D,0xFCA, 397 | 0x6E2,0x325,0xD6F,0x8A8,0x43C,0x1FB,0xFB1,0xA76, 398 | 0xD7C,0x8BB,0x6F1,0x336,0xFA2,0xA65,0x42F,0x1E8, 399 | 0x8C0,0xD07,0x34D,0x68A,0xA1E,0xFD9,0x193,0x454, 400 | 0x604,0x3C3,0xD89,0x84E,0x4DA,0x11D,0xF57,0xA90, 401 | 0x3B8,0x67F,0x835,0xDF2,0x166,0x4A1,0xAEB,0xF2C, 402 | 0xE4B,0xB8C,0x5C6,0x001,0xC95,0x952,0x718,0x2DF, 403 | 0xBF7,0xE30,0x07A,0x5BD,0x929,0xCEE,0x2A4,0x763, 404 | 0x533,0x0F4,0xEBE,0xB79,0x7ED,0x22A,0xC60,0x9A7, 405 | 0x08F,0x548,0xB02,0xEC5,0x251,0x796,0x9DC,0xC1B, 406 | 0xBBE,0xE79,0x033,0x5F4,0x960,0xCA7,0x2ED,0x72A, 407 | 0xE02,0xBC5,0x58F,0x048,0xCDC,0x91B,0x751,0x296, 408 | 0x0C6,0x501,0xB4B,0xE8C,0x218,0x7DF,0x995,0xC52, 409 | 0x57A,0x0BD,0xEF7,0xB30,0x7A4,0x263,0xC29,0x9EE, 410 | 0x889,0xD4E,0x304,0x6C3,0xA57,0xF90,0x1DA,0x41D, 411 | 0xD35,0x8F2,0x6B8,0x37F,0xFEB,0xA2C,0x466,0x1A1, 412 | 0x3F1,0x636,0x87C,0xDBB,0x12F,0x4E8,0xAA2,0xF65, 413 | 0x64D,0x38A,0xDC0,0x807,0x493,0x154,0xF1E,0xAD9, 414 | 0xDD3,0x814,0x65E,0x399,0xF0D,0xACA,0x480,0x147, 415 | 0x86F,0xDA8,0x3E2,0x625,0xAB1,0xF76,0x13C,0x4FB, 416 | 0x6AB,0x36C,0xD26,0x8E1,0x475,0x1B2,0xFF8,0xA3F, 417 | 0x317,0x6D0,0x89A,0xD5D,0x1C9,0x40E,0xA44,0xF83, 418 | 0xEE4,0xB23,0x569,0x0AE,0xC3A,0x9FD,0x7B7,0x270, 419 | 0xB58,0xE9F,0x0D5,0x512,0x986,0xC41,0x20B,0x7CC, 420 | 0x59C,0x05B,0xE11,0xBD6,0x742,0x285,0xCCF,0x908, 421 | 0x020,0x5E7,0xBAD,0xE6A,0x2FE,0x739,0x973,0xCB4, 422 | 0x767,0x2A0,0xCEA,0x92D,0x5B9,0x07E,0xE34,0xBF3, 423 | 0x2DB,0x71C,0x956,0xC91,0x005,0x5C2,0xB88,0xE4F, 424 | 0xC1F,0x9D8,0x792,0x255,0xEC1,0xB06,0x54C,0x08B, 425 | 0x9A3,0xC64,0x22E,0x7E9,0xB7D,0xEBA,0x0F0,0x537, 426 | 0x450,0x197,0xFDD,0xA1A,0x68E,0x349,0xD03,0x8C4, 427 | 0x1EC,0x42B,0xA61,0xFA6,0x332,0x6F5,0x8BF,0xD78, 428 | 0xF28,0xAEF,0x4A5,0x162,0xDF6,0x831,0x67B,0x3BC, 429 | 0xA94,0xF53,0x119,0x4DE,0x84A,0xD8D,0x3C7,0x600, 430 | 0x10A,0x4CD,0xA87,0xF40,0x3D4,0x613,0x859,0xD9E, 431 | 0x4B6,0x171,0xF3B,0xAFC,0x668,0x3AF,0xDE5,0x822, 432 | 0xA72,0xFB5,0x1FF,0x438,0x8AC,0xD6B,0x321,0x6E6, 433 | 0xFCE,0xA09,0x443,0x184,0xD10,0x8D7,0x69D,0x35A, 434 | 0x23D,0x7FA,0x9B0,0xC77,0x0E3,0x524,0xB6E,0xEA9, 435 | 0x781,0x246,0xC0C,0x9CB,0x55F,0x098,0xED2,0xB15, 436 | 0x945,0xC82,0x2C8,0x70F,0xB9B,0xE5C,0x016,0x5D1, 437 | 0xCF9,0x93E,0x774,0x2B3,0xE27,0xBE0,0x5AA,0x06D, 438 | 0x571,0x0B6,0xEFC,0xB3B,0x7AF,0x268,0xC22,0x9E5, 439 | 0x0CD,0x50A,0xB40,0xE87,0x213,0x7D4,0x99E,0xC59, 440 | 0xE09,0xBCE,0x584,0x043,0xCD7,0x910,0x75A,0x29D, 441 | 0xBB5,0xE72,0x038,0x5FF,0x96B,0xCAC,0x2E6,0x721, 442 | 0x646,0x381,0xDCB,0x80C,0x498,0x15F,0xF15,0xAD2, 443 | 0x3FA,0x63D,0x877,0xDB0,0x124,0x4E3,0xAA9,0xF6E, 444 | 0xD3E,0x8F9,0x6B3,0x374,0xFE0,0xA27,0x46D,0x1AA, 445 | 0x882,0xD45,0x30F,0x6C8,0xA5C,0xF9B,0x1D1,0x416, 446 | 0x31C,0x6DB,0x891,0xD56,0x1C2,0x405,0xA4F,0xF88, 447 | 0x6A0,0x367,0xD2D,0x8EA,0x47E,0x1B9,0xFF3,0xA34, 448 | 0x864,0xDA3,0x3E9,0x62E,0xABA,0xF7D,0x137,0x4F0, 449 | 0xDD8,0x81F,0x655,0x392,0xF06,0xAC1,0x48B,0x14C, 450 | 0x02B,0x5EC,0xBA6,0xE61,0x2F5,0x732,0x978,0xCBF, 451 | 0x597,0x050,0xE1A,0xBDD,0x749,0x28E,0xCC4,0x903, 452 | 0xB53,0xE94,0x0DE,0x519,0x98D,0xC4A,0x200,0x7C7, 453 | 0xEEF,0xB28,0x562,0x0A5,0xC31,0x9F6,0x7BC,0x27B, 454 | 0x9A8,0xC6F,0x225,0x7E2,0xB76,0xEB1,0x0FB,0x53C, 455 | 0xC14,0x9D3,0x799,0x25E,0xECA,0xB0D,0x547,0x080, 456 | 0x2D0,0x717,0x95D,0xC9A,0x00E,0x5C9,0xB83,0xE44, 457 | 0x76C,0x2AB,0xCE1,0x926,0x5B2,0x075,0xE3F,0xBF8, 458 | 0xA9F,0xF58,0x112,0x4D5,0x841,0xD86,0x3CC,0x60B, 459 | 0xF23,0xAE4,0x4AE,0x169,0xDFD,0x83A,0x670,0x3B7, 460 | 0x1E7,0x420,0xA6A,0xFAD,0x339,0x6FE,0x8B4,0xD73, 461 | 0x45B,0x19C,0xFD6,0xA11,0x685,0x342,0xD08,0x8CF, 462 | 0xFC5,0xA02,0x448,0x18F,0xD1B,0x8DC,0x696,0x351, 463 | 0xA79,0xFBE,0x1F4,0x433,0x8A7,0xD60,0x32A,0x6ED, 464 | 0x4BD,0x17A,0xF30,0xAF7,0x663,0x3A4,0xDEE,0x829, 465 | 0x101,0x4C6,0xA8C,0xF4B,0x3DF,0x618,0x852,0xD95, 466 | 0xCF2,0x935,0x77F,0x2B8,0xE2C,0xBEB,0x5A1,0x066, 467 | 0x94E,0xC89,0x2C3,0x704,0xB90,0xE57,0x01D,0x5DA, 468 | 0x78A,0x24D,0xC07,0x9C0,0x554,0x093,0xED9,0xB1E, 469 | 0x236,0x7F1,0x9BB,0xC7C,0x0E8,0x52F,0xB65,0xEA2, 470 | 0x907,0xCC0,0x28A,0x74D,0xBD9,0xE1E,0x054,0x593, 471 | 0xCBB,0x97C,0x736,0x2F1,0xE65,0xBA2,0x5E8,0x02F, 472 | 0x27F,0x7B8,0x9F2,0xC35,0x0A1,0x566,0xB2C,0xEEB, 473 | 0x7C3,0x204,0xC4E,0x989,0x51D,0x0DA,0xE90,0xB57, 474 | 0xA30,0xFF7,0x1BD,0x47A,0x8EE,0xD29,0x363,0x6A4, 475 | 0xF8C,0xA4B,0x401,0x1C6,0xD52,0x895,0x6DF,0x318, 476 | 0x148,0x48F,0xAC5,0xF02,0x396,0x651,0x81B,0xDDC, 477 | 0x4F4,0x133,0xF79,0xABE,0x62A,0x3ED,0xDA7,0x860, 478 | 0xF6A,0xAAD,0x4E7,0x120,0xDB4,0x873,0x639,0x3FE, 479 | 0xAD6,0xF11,0x15B,0x49C,0x808,0xDCF,0x385,0x642, 480 | 0x412,0x1D5,0xF9F,0xA58,0x6CC,0x30B,0xD41,0x886, 481 | 0x1AE,0x469,0xA23,0xFE4,0x370,0x6B7,0x8FD,0xD3A, 482 | 0xC5D,0x99A,0x7D0,0x217,0xE83,0xB44,0x50E,0x0C9, 483 | 0x9E1,0xC26,0x26C,0x7AB,0xB3F,0xEF8,0x0B2,0x575, 484 | 0x725,0x2E2,0xCA8,0x96F,0x5FB,0x03C,0xE76,0xBB1, 485 | 0x299,0x75E,0x914,0xCD3,0x047,0x580,0xBCA,0xE0D, 486 | 0x5DE,0x019,0xE53,0xB94,0x700,0x2C7,0xC8D,0x94A, 487 | 0x062,0x5A5,0xBEF,0xE28,0x2BC,0x77B,0x931,0xCF6, 488 | 0xEA6,0xB61,0x52B,0x0EC,0xC78,0x9BF,0x7F5,0x232, 489 | 0xB1A,0xEDD,0x097,0x550,0x9C4,0xC03,0x249,0x78E, 490 | 0x6E9,0x32E,0xD64,0x8A3,0x437,0x1F0,0xFBA,0xA7D, 491 | 0x355,0x692,0x8D8,0xD1F,0x18B,0x44C,0xA06,0xFC1, 492 | 0xD91,0x856,0x61C,0x3DB,0xF4F,0xA88,0x4C2,0x105, 493 | 0x82D,0xDEA,0x3A0,0x667,0xAF3,0xF34,0x17E,0x4B9, 494 | 0x3B3,0x674,0x83E,0xDF9,0x16D,0x4AA,0xAE0,0xF27, 495 | 0x60F,0x3C8,0xD82,0x845,0x4D1,0x116,0xF5C,0xA9B, 496 | 0x8CB,0xD0C,0x346,0x681,0xA15,0xFD2,0x198,0x45F, 497 | 0xD77,0x8B0,0x6FA,0x33D,0xFA9,0xA6E,0x424,0x1E3, 498 | 0x084,0x543,0xB09,0xECE,0x25A,0x79D,0x9D7,0xC10, 499 | 0x538,0x0FF,0xEB5,0xB72,0x7E6,0x221,0xC6B,0x9AC, 500 | 0xBFC,0xE3B,0x071,0x5B6,0x922,0xCE5,0x2AF,0x768, 501 | 0xE40,0xB87,0x5CD,0x00A,0xC9E,0x959,0x713,0x2D4, 502 | 0x85A,0xD9D,0x3D7,0x610,0xA84,0xF43,0x109,0x4CE, 503 | 0xDE6,0x821,0x66B,0x3AC,0xF38,0xAFF,0x4B5,0x172, 504 | 0x322,0x6E5,0x8AF,0xD68,0x1FC,0x43B,0xA71,0xFB6, 505 | 0x69E,0x359,0xD13,0x8D4,0x440,0x187,0xFCD,0xA0A, 506 | 0xB6D,0xEAA,0x0E0,0x527,0x9B3,0xC74,0x23E,0x7F9, 507 | 0xED1,0xB16,0x55C,0x09B,0xC0F,0x9C8,0x782,0x245, 508 | 0x015,0x5D2,0xB98,0xE5F,0x2CB,0x70C,0x946,0xC81, 509 | 0x5A9,0x06E,0xE24,0xBE3,0x777,0x2B0,0xCFA,0x93D, 510 | 0xE37,0xBF0,0x5BA,0x07D,0xCE9,0x92E,0x764,0x2A3, 511 | 0xB8B,0xE4C,0x006,0x5C1,0x955,0xC92,0x2D8,0x71F, 512 | 0x54F,0x088,0xEC2,0xB05,0x791,0x256,0xC1C,0x9DB, 513 | 0x0F3,0x534,0xB7E,0xEB9,0x22D,0x7EA,0x9A0,0xC67, 514 | 0xD00,0x8C7,0x68D,0x34A,0xFDE,0xA19,0x453,0x194, 515 | 0x8BC,0xD7B,0x331,0x6F6,0xA62,0xFA5,0x1EF,0x428, 516 | 0x678,0x3BF,0xDF5,0x832,0x4A6,0x161,0xF2B,0xAEC, 517 | 0x3C4,0x603,0x849,0xD8E,0x11A,0x4DD,0xA97,0xF50, 518 | 0x483,0x144,0xF0E,0xAC9,0x65D,0x39A,0xDD0,0x817, 519 | 0x13F,0x4F8,0xAB2,0xF75,0x3E1,0x626,0x86C,0xDAB, 520 | 0xFFB,0xA3C,0x476,0x1B1,0xD25,0x8E2,0x6A8,0x36F, 521 | 0xA47,0xF80,0x1CA,0x40D,0x899,0xD5E,0x314,0x6D3, 522 | 0x7B4,0x273,0xC39,0x9FE,0x56A,0x0AD,0xEE7,0xB20, 523 | 0x208,0x7CF,0x985,0xC42,0x0D6,0x511,0xB5B,0xE9C, 524 | 0xCCC,0x90B,0x741,0x286,0xE12,0xBD5,0x59F,0x058, 525 | 0x970,0xCB7,0x2FD,0x73A,0xBAE,0xE69,0x023,0x5E4, 526 | 0x2EE,0x729,0x963,0xCA4,0x030,0x5F7,0xBBD,0xE7A, 527 | 0x752,0x295,0xCDF,0x918,0x58C,0x04B,0xE01,0xBC6, 528 | 0x996,0xC51,0x21B,0x7DC,0xB48,0xE8F,0x0C5,0x502, 529 | 0xC2A,0x9ED,0x7A7,0x260,0xEF4,0xB33,0x579,0x0BE, 530 | 0x1D9,0x41E,0xA54,0xF93,0x307,0x6C0,0x88A,0xD4D, 531 | 0x465,0x1A2,0xFE8,0xA2F,0x6BB,0x37C,0xD36,0x8F1, 532 | 0xAA1,0xF66,0x12C,0x4EB,0x87F,0xDB8,0x3F2,0x635, 533 | 0xF1D,0xADA,0x490,0x157,0xDC3,0x804,0x64E,0x389, 534 | 0x42C,0x1EB,0xFA1,0xA66,0x6F2,0x335,0xD7F,0x8B8, 535 | 0x190,0x457,0xA1D,0xFDA,0x34E,0x689,0x8C3,0xD04, 536 | 0xF54,0xA93,0x4D9,0x11E,0xD8A,0x84D,0x607,0x3C0, 537 | 0xAE8,0xF2F,0x165,0x4A2,0x836,0xDF1,0x3BB,0x67C, 538 | 0x71B,0x2DC,0xC96,0x951,0x5C5,0x002,0xE48,0xB8F, 539 | 0x2A7,0x760,0x92A,0xCED,0x079,0x5BE,0xBF4,0xE33, 540 | 0xC63,0x9A4,0x7EE,0x229,0xEBD,0xB7A,0x530,0x0F7, 541 | 0x9DF,0xC18,0x252,0x795,0xB01,0xEC6,0x08C,0x54B, 542 | 0x241,0x786,0x9CC,0xC0B,0x09F,0x558,0xB12,0xED5, 543 | 0x7FD,0x23A,0xC70,0x9B7,0x523,0x0E4,0xEAE,0xB69, 544 | 0x939,0xCFE,0x2B4,0x773,0xBE7,0xE20,0x06A,0x5AD, 545 | 0xC85,0x942,0x708,0x2CF,0xE5B,0xB9C,0x5D6,0x011, 546 | 0x176,0x4B1,0xAFB,0xF3C,0x3A8,0x66F,0x825,0xDE2, 547 | 0x4CA,0x10D,0xF47,0xA80,0x614,0x3D3,0xD99,0x85E, 548 | 0xA0E,0xFC9,0x183,0x444,0x8D0,0xD17,0x35D,0x69A, 549 | 0xFB2,0xA75,0x43F,0x1F8,0xD6C,0x8AB,0x6E1,0x326, 550 | 0x8F5,0xD32,0x378,0x6BF,0xA2B,0xFEC,0x1A6,0x461, 551 | 0xD49,0x88E,0x6C4,0x303,0xF97,0xA50,0x41A,0x1DD, 552 | 0x38D,0x64A,0x800,0xDC7,0x153,0x494,0xADE,0xF19, 553 | 0x631,0x3F6,0xDBC,0x87B,0x4EF,0x128,0xF62,0xAA5, 554 | 0xBC2,0xE05,0x04F,0x588,0x91C,0xCDB,0x291,0x756, 555 | 0xE7E,0xBB9,0x5F3,0x034,0xCA0,0x967,0x72D,0x2EA, 556 | 0x0BA,0x57D,0xB37,0xEF0,0x264,0x7A3,0x9E9,0xC2E, 557 | 0x506,0x0C1,0xE8B,0xB4C,0x7D8,0x21F,0xC55,0x992, 558 | 0xE98,0xB5F,0x515,0x0D2,0xC46,0x981,0x7CB,0x20C, 559 | 0xB24,0xEE3,0x0A9,0x56E,0x9FA,0xC3D,0x277,0x7B0, 560 | 0x5E0,0x027,0xE6D,0xBAA,0x73E,0x2F9,0xCB3,0x974, 561 | 0x05C,0x59B,0xBD1,0xE16,0x282,0x745,0x90F,0xCC8, 562 | 0xDAF,0x868,0x622,0x3E5,0xF71,0xAB6,0x4FC,0x13B, 563 | 0x813,0xDD4,0x39E,0x659,0xACD,0xF0A,0x140,0x487, 564 | 0x6D7,0x310,0xD5A,0x89D,0x409,0x1CE,0xF84,0xA43, 565 | 0x36B,0x6AC,0x8E6,0xD21,0x1B5,0x472,0xA38,0xFFF 566 | }; 567 | 568 | /* 569 | * The error table is a 16 bit table, the index into the table 570 | * is the syndrome. The top 4 bits are the number of detected 571 | * errors, if the number = 4 it means 4 or more errors. The lower 572 | * 12 bits are the error vector for the data words. There is 573 | * really little point in correcting the errors in the parity field. 574 | * 575 | */ 576 | 577 | const unsigned int error[]={ 578 | 0x0000,0x1000,0x1000,0x2000,0x1000,0x2000,0x2000,0x3000, 579 | 0x1000,0x2000,0x2000,0x3000,0x2000,0x3000,0x3000,0x4000, 580 | 0x1000,0x2000,0x2000,0x3000,0x2000,0x3000,0x3000,0x4000, 581 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3402, 582 | 0x1000,0x2000,0x2000,0x3000,0x2000,0x3000,0x3000,0x4000, 583 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3180, 584 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3020, 585 | 0x3000,0x4000,0x4000,0x3009,0x4000,0x3804,0x3250,0x4009, 586 | 0x1000,0x2000,0x2000,0x3000,0x2000,0x3000,0x3000,0x4000, 587 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3030, 588 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x38c0, 589 | 0x3000,0x4000,0x4000,0x3009,0x4000,0x3300,0x3004,0x4004, 590 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3604, 591 | 0x3000,0x4000,0x4000,0x3009,0x4000,0x3040,0x3802,0x4009, 592 | 0x3000,0x4000,0x4000,0x3009,0x4000,0x3012,0x3100,0x4009, 593 | 0x4000,0x3009,0x3009,0x2009,0x34a0,0x4009,0x4004,0x3009, 594 | 0x1000,0x2000,0x2000,0x3000,0x2000,0x3000,0x3000,0x4000, 595 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3180, 596 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3208, 597 | 0x3000,0x4000,0x4000,0x3810,0x4000,0x3061,0x3004,0x4004, 598 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3180, 599 | 0x3000,0x4000,0x4000,0x3180,0x4000,0x3180,0x3180,0x2180, 600 | 0x3000,0x4000,0x4000,0x3044,0x4000,0x3012,0x3c01,0x4012, 601 | 0x4000,0x3600,0x3022,0x4009,0x3008,0x4008,0x4004,0x3180, 602 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3001, 603 | 0x3000,0x4000,0x4000,0x3242,0x4000,0x3c08,0x3004,0x4001, 604 | 0x3000,0x4000,0x4000,0x3520,0x4000,0x3012,0x3004,0x4001, 605 | 0x4000,0x3080,0x3004,0x4004,0x3004,0x4004,0x2004,0x3004, 606 | 0x3000,0x4000,0x4000,0x3800,0x4000,0x3012,0x3068,0x4001, 607 | 0x4000,0x3024,0x3410,0x4009,0x3201,0x4012,0x4004,0x3180, 608 | 0x4000,0x3012,0x3280,0x4009,0x3012,0x2012,0x4004,0x3012, 609 | 0x3940,0x4009,0x4004,0x3009,0x4004,0x3012,0x3004,0x4004, 610 | 0x1000,0x2000,0x2000,0x3000,0x2000,0x3000,0x3000,0x4000, 611 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x304c, 612 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3020, 613 | 0x3000,0x4000,0x4000,0x3810,0x4000,0x3300,0x3081,0x4020, 614 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3020, 615 | 0x3000,0x4000,0x4000,0x3200,0x4000,0x3411,0x3802,0x4020, 616 | 0x3000,0x4000,0x4000,0x3020,0x4000,0x3020,0x3020,0x2020, 617 | 0x4000,0x30c2,0x3504,0x4009,0x3008,0x4008,0x4008,0x3020, 618 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3001, 619 | 0x3000,0x4000,0x4000,0x3480,0x4000,0x3300,0x3802,0x4001, 620 | 0x3000,0x4000,0x4000,0x3006,0x4000,0x3300,0x3418,0x4001, 621 | 0x4000,0x3300,0x3060,0x4006,0x3300,0x2300,0x4004,0x3300, 622 | 0x3000,0x4000,0x4000,0x3150,0x4000,0x3088,0x3802,0x4001, 623 | 0x4000,0x3024,0x3802,0x4009,0x3802,0x4024,0x2802,0x3802, 624 | 0x4000,0x3c00,0x3280,0x4006,0x3045,0x4012,0x4020,0x3020, 625 | 0x3010,0x4009,0x4009,0x3009,0x4008,0x3300,0x3802,0x4009, 626 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3001, 627 | 0x3000,0x4000,0x4000,0x3810,0x4000,0x3002,0x3620,0x4001, 628 | 0x3000,0x4000,0x4000,0x3810,0x4000,0x3484,0x3142,0x4001, 629 | 0x4000,0x3810,0x3810,0x2810,0x3008,0x4002,0x4004,0x3810, 630 | 0x3000,0x4000,0x4000,0x340a,0x4000,0x3a40,0x3014,0x4001, 631 | 0x4000,0x3024,0x3041,0x4024,0x3008,0x4002,0x4008,0x3180, 632 | 0x4000,0x3101,0x3280,0x4020,0x3008,0x4008,0x4008,0x3020, 633 | 0x3008,0x4008,0x4008,0x3810,0x2008,0x3008,0x3008,0x4008, 634 | 0x3000,0x4000,0x4000,0x3001,0x4000,0x3001,0x3001,0x2001, 635 | 0x4000,0x3024,0x3108,0x4001,0x30d0,0x4001,0x4001,0x3001, 636 | 0x4000,0x3048,0x3280,0x4001,0x3820,0x4001,0x4001,0x3001, 637 | 0x3403,0x4024,0x4004,0x3810,0x4004,0x3300,0x3004,0x4001, 638 | 0x4000,0x3024,0x3280,0x4001,0x3500,0x4001,0x4001,0x3001, 639 | 0x3024,0x2024,0x4024,0x3024,0x4008,0x3024,0x3802,0x4001, 640 | 0x3280,0x4012,0x2280,0x3280,0x4008,0x3012,0x3280,0x4001, 641 | 0x4008,0x3024,0x3280,0x4009,0x3008,0x4008,0x4004,0x3440, 642 | 0x1000,0x2000,0x2000,0x3000,0x2000,0x3000,0x3000,0x4000, 643 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3a01, 644 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3020, 645 | 0x3000,0x4000,0x4000,0x3140,0x4000,0x3098,0x3004,0x4004, 646 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3020, 647 | 0x3000,0x4000,0x4000,0x3016,0x4000,0x3040,0x3408,0x4016, 648 | 0x3000,0x4000,0x4000,0x3020,0x4000,0x3020,0x3020,0x2020, 649 | 0x4000,0x3600,0x3880,0x4009,0x3103,0x4020,0x4004,0x3020, 650 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x310a, 651 | 0x3000,0x4000,0x4000,0x3480,0x4000,0x3040,0x3004,0x4004, 652 | 0x3000,0x4000,0x4000,0x3210,0x4000,0x3401,0x3004,0x4004, 653 | 0x4000,0x3822,0x3004,0x4004,0x3004,0x4004,0x2004,0x3004, 654 | 0x3000,0x4000,0x4000,0x3800,0x4000,0x3040,0x3091,0x4020, 655 | 0x4000,0x3040,0x3320,0x4009,0x3040,0x2040,0x4004,0x3040, 656 | 0x4000,0x3184,0x3442,0x4009,0x3a08,0x4012,0x4004,0x3020, 657 | 0x3010,0x4009,0x4004,0x3009,0x4004,0x3040,0x3004,0x4004, 658 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3450, 659 | 0x3000,0x4000,0x4000,0x3028,0x4000,0x3002,0x3004,0x4002, 660 | 0x3000,0x4000,0x4000,0x3083,0x4000,0x3900,0x3004,0x4004, 661 | 0x4000,0x3600,0x3004,0x4004,0x3004,0x4002,0x2004,0x3004, 662 | 0x3000,0x4000,0x4000,0x3800,0x4000,0x300d,0x3202,0x400d, 663 | 0x4000,0x3600,0x3041,0x4016,0x3830,0x4002,0x4004,0x3180, 664 | 0x4000,0x3600,0x3118,0x4020,0x30c0,0x400d,0x4004,0x3020, 665 | 0x3600,0x2600,0x4004,0x3600,0x4004,0x3600,0x3004,0x4004, 666 | 0x3000,0x4000,0x4000,0x3800,0x4000,0x32a0,0x3004,0x4001, 667 | 0x4000,0x3111,0x3004,0x4004,0x3004,0x4002,0x2004,0x3004, 668 | 0x4000,0x3048,0x3004,0x4004,0x3004,0x4004,0x2004,0x3004, 669 | 0x3004,0x4004,0x2004,0x3004,0x2004,0x3004,0x1004,0x2004, 670 | 0x4000,0x3800,0x3800,0x2800,0x3500,0x400d,0x4004,0x3800, 671 | 0x308a,0x4024,0x4004,0x3800,0x4004,0x3040,0x3004,0x4004, 672 | 0x3021,0x4012,0x4004,0x3800,0x4004,0x3012,0x3004,0x4004, 673 | 0x4004,0x3600,0x3004,0x4004,0x3004,0x4004,0x2004,0x3004, 674 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3020, 675 | 0x3000,0x4000,0x4000,0x3480,0x4000,0x3002,0x3110,0x4002, 676 | 0x3000,0x4000,0x4000,0x3020,0x4000,0x3020,0x3020,0x2020, 677 | 0x4000,0x3005,0x320a,0x4005,0x3c40,0x4002,0x4004,0x3020, 678 | 0x3000,0x4000,0x4000,0x3020,0x4000,0x3020,0x3020,0x2020, 679 | 0x4000,0x3908,0x3041,0x4016,0x3284,0x4002,0x4020,0x3020, 680 | 0x4000,0x3020,0x3020,0x2020,0x3020,0x2020,0x2020,0x1020, 681 | 0x3010,0x4005,0x4010,0x3020,0x4008,0x3020,0x3020,0x2020, 682 | 0x3000,0x4000,0x4000,0x3480,0x4000,0x3814,0x3240,0x4001, 683 | 0x4000,0x3480,0x3480,0x2480,0x3029,0x4002,0x4004,0x3480, 684 | 0x4000,0x3048,0x3901,0x4006,0x3082,0x4020,0x4004,0x3020, 685 | 0x3010,0x4005,0x4004,0x3480,0x4004,0x3300,0x3004,0x4004, 686 | 0x4000,0x3203,0x300c,0x400c,0x3500,0x4020,0x400c,0x3020, 687 | 0x3010,0x4010,0x400c,0x3480,0x4010,0x3040,0x3802,0x4020, 688 | 0x3010,0x4010,0x400c,0x3020,0x4010,0x3020,0x3020,0x2020, 689 | 0x2010,0x3010,0x3010,0x4009,0x3010,0x4010,0x4004,0x3020, 690 | 0x3000,0x4000,0x4000,0x3304,0x4000,0x3002,0x3888,0x4001, 691 | 0x4000,0x3002,0x3041,0x4002,0x3002,0x2002,0x4002,0x3002, 692 | 0x4000,0x3048,0x3400,0x4020,0x3211,0x4002,0x4004,0x3020, 693 | 0x31a0,0x4002,0x4004,0x3810,0x4002,0x3002,0x3004,0x4002, 694 | 0x4000,0x3090,0x3041,0x4020,0x3500,0x4002,0x4014,0x3020, 695 | 0x3041,0x4002,0x2041,0x3041,0x4002,0x3002,0x3041,0x4002, 696 | 0x3806,0x4020,0x4020,0x3020,0x4008,0x3020,0x3020,0x2020, 697 | 0x4008,0x3600,0x3041,0x4020,0x3008,0x4002,0x4004,0x3020, 698 | 0x4000,0x3048,0x3032,0x4001,0x3500,0x4001,0x4001,0x3001, 699 | 0x3a00,0x4002,0x4004,0x3480,0x4002,0x3002,0x3004,0x4001, 700 | 0x3048,0x2048,0x4004,0x3048,0x4004,0x3048,0x3004,0x4001, 701 | 0x4004,0x3048,0x3004,0x4004,0x3004,0x4002,0x2004,0x3004, 702 | 0x3500,0x4024,0x400c,0x3800,0x2500,0x3500,0x3500,0x4001, 703 | 0x4010,0x3024,0x3041,0x4024,0x3500,0x4002,0x4004,0x3218, 704 | 0x4010,0x3048,0x3280,0x4020,0x3500,0x4012,0x4004,0x3020, 705 | 0x3010,0x4010,0x4004,0x3102,0x4004,0x3881,0x3004,0x4004, 706 | 0x1000,0x2000,0x2000,0x3000,0x2000,0x3000,0x3000,0x4000, 707 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3402, 708 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3402, 709 | 0x3000,0x4000,0x4000,0x3402,0x4000,0x3402,0x3402,0x2402, 710 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3818, 711 | 0x3000,0x4000,0x4000,0x3200,0x4000,0x3040,0x3025,0x4025, 712 | 0x3000,0x4000,0x4000,0x3044,0x4000,0x3281,0x3100,0x4020, 713 | 0x4000,0x3130,0x3880,0x4009,0x3008,0x4008,0x4008,0x3402, 714 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3001, 715 | 0x3000,0x4000,0x4000,0x3904,0x4000,0x3040,0x3288,0x4001, 716 | 0x3000,0x4000,0x4000,0x3210,0x4000,0x302c,0x3100,0x4001, 717 | 0x4000,0x3080,0x3060,0x4009,0x3811,0x402c,0x4004,0x3402, 718 | 0x3000,0x4000,0x4000,0x30a2,0x4000,0x3040,0x3100,0x4001, 719 | 0x4000,0x3040,0x3410,0x4009,0x3040,0x2040,0x4025,0x3040, 720 | 0x4000,0x3c00,0x3100,0x4009,0x3100,0x4012,0x2100,0x3100, 721 | 0x3206,0x4009,0x4009,0x3009,0x4008,0x3040,0x3100,0x4009, 722 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3001, 723 | 0x3000,0x4000,0x4000,0x3028,0x4000,0x3214,0x3840,0x4001, 724 | 0x3000,0x4000,0x4000,0x3044,0x4000,0x3900,0x30b0,0x4001, 725 | 0x4000,0x3080,0x3301,0x4028,0x3008,0x4008,0x4004,0x3402, 726 | 0x3000,0x4000,0x4000,0x3044,0x4000,0x3420,0x3202,0x4001, 727 | 0x4000,0x3803,0x3410,0x4028,0x3008,0x4008,0x4008,0x3180, 728 | 0x4000,0x3044,0x3044,0x2044,0x3008,0x4008,0x4008,0x3044, 729 | 0x3008,0x4008,0x4008,0x3044,0x2008,0x3008,0x3008,0x4008, 730 | 0x3000,0x4000,0x4000,0x3001,0x4000,0x3001,0x3001,0x2001, 731 | 0x4000,0x3080,0x3410,0x4001,0x3122,0x4001,0x4001,0x3001, 732 | 0x4000,0x3080,0x380a,0x4001,0x3640,0x4001,0x4001,0x3001, 733 | 0x3080,0x2080,0x4004,0x3080,0x4004,0x3080,0x3004,0x4001, 734 | 0x4000,0x3308,0x3410,0x4001,0x3884,0x4001,0x4001,0x3001, 735 | 0x3410,0x4024,0x2410,0x3410,0x4008,0x3040,0x3410,0x4001, 736 | 0x3021,0x4012,0x4021,0x3044,0x4008,0x3012,0x3100,0x4001, 737 | 0x4008,0x3080,0x3410,0x4009,0x3008,0x4008,0x4004,0x3a20, 738 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3001, 739 | 0x3000,0x4000,0x4000,0x3200,0x4000,0x38a0,0x3110,0x4001, 740 | 0x3000,0x4000,0x4000,0x3188,0x4000,0x3050,0x3a04,0x4001, 741 | 0x4000,0x3005,0x3060,0x4005,0x3008,0x4005,0x4008,0x3402, 742 | 0x3000,0x4000,0x4000,0x3200,0x4000,0x3106,0x34c0,0x4001, 743 | 0x4000,0x3200,0x3200,0x2200,0x3008,0x4008,0x4008,0x3200, 744 | 0x4000,0x3c00,0x3013,0x4013,0x3008,0x4008,0x4008,0x3020, 745 | 0x3008,0x4005,0x4008,0x3200,0x2008,0x3008,0x3008,0x4008, 746 | 0x3000,0x4000,0x4000,0x3001,0x4000,0x3001,0x3001,0x2001, 747 | 0x4000,0x301a,0x3060,0x4001,0x3404,0x4001,0x4001,0x3001, 748 | 0x4000,0x3c00,0x3060,0x4001,0x3082,0x4001,0x4001,0x3001, 749 | 0x3060,0x4005,0x2060,0x3060,0x4008,0x3300,0x3060,0x4001, 750 | 0x4000,0x3c00,0x300c,0x4001,0x3230,0x4001,0x4001,0x3001, 751 | 0x3181,0x401a,0x400c,0x3200,0x4008,0x3040,0x3802,0x4001, 752 | 0x3c00,0x2c00,0x400c,0x3c00,0x4008,0x3c00,0x3100,0x4001, 753 | 0x4008,0x3c00,0x3060,0x4009,0x3008,0x4008,0x4008,0x3094, 754 | 0x3000,0x4000,0x4000,0x3001,0x4000,0x3001,0x3001,0x2001, 755 | 0x4000,0x3540,0x3086,0x4001,0x3008,0x4001,0x4001,0x3001, 756 | 0x4000,0x3222,0x3400,0x4001,0x3008,0x4001,0x4001,0x3001, 757 | 0x3008,0x4005,0x4008,0x3810,0x2008,0x3008,0x3008,0x4001, 758 | 0x4000,0x3090,0x3920,0x4001,0x3008,0x4001,0x4001,0x3001, 759 | 0x3008,0x4008,0x4008,0x3200,0x2008,0x3008,0x3008,0x4001, 760 | 0x3008,0x4008,0x4008,0x3044,0x2008,0x3008,0x3008,0x4001, 761 | 0x2008,0x3008,0x3008,0x4008,0x1008,0x2008,0x2008,0x3008, 762 | 0x4000,0x3001,0x3001,0x2001,0x3001,0x2001,0x2001,0x1001, 763 | 0x3a00,0x4001,0x4001,0x3001,0x4001,0x3001,0x3001,0x2001, 764 | 0x3114,0x4001,0x4001,0x3001,0x4001,0x3001,0x3001,0x2001, 765 | 0x4008,0x3080,0x3060,0x4001,0x3008,0x4001,0x4001,0x3001, 766 | 0x3042,0x4001,0x4001,0x3001,0x4001,0x3001,0x3001,0x2001, 767 | 0x4008,0x3024,0x3410,0x4001,0x3008,0x4001,0x4001,0x3001, 768 | 0x4008,0x3c00,0x3280,0x4001,0x3008,0x4001,0x4001,0x3001, 769 | 0x3008,0x4008,0x4008,0x3102,0x2008,0x3008,0x3008,0x4001, 770 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3084, 771 | 0x3000,0x4000,0x4000,0x3028,0x4000,0x3040,0x3110,0x4028, 772 | 0x3000,0x4000,0x4000,0x3210,0x4000,0x3900,0x3049,0x4020, 773 | 0x4000,0x3005,0x3880,0x4005,0x3220,0x4005,0x4004,0x3402, 774 | 0x3000,0x4000,0x4000,0x3501,0x4000,0x3040,0x3202,0x4020, 775 | 0x4000,0x3040,0x3880,0x4016,0x3040,0x2040,0x4025,0x3040, 776 | 0x4000,0x300a,0x3880,0x400a,0x3414,0x400a,0x4020,0x3020, 777 | 0x3880,0x4005,0x2880,0x3880,0x4008,0x3040,0x3880,0x4011, 778 | 0x3000,0x4000,0x4000,0x3210,0x4000,0x3040,0x3c20,0x4001, 779 | 0x4000,0x3040,0x3003,0x4003,0x3040,0x2040,0x4003,0x3040, 780 | 0x4000,0x3210,0x3210,0x2210,0x3082,0x402c,0x4004,0x3210, 781 | 0x3508,0x4005,0x4003,0x3210,0x4004,0x3040,0x3004,0x4004, 782 | 0x4000,0x3040,0x300c,0x400c,0x3040,0x2040,0x400c,0x3040, 783 | 0x3040,0x2040,0x4003,0x3040,0x2040,0x1040,0x3040,0x2040, 784 | 0x3021,0x400a,0x400c,0x3210,0x4021,0x3040,0x3100,0x4020, 785 | 0x4010,0x3040,0x3880,0x4009,0x3040,0x2040,0x4004,0x3040, 786 | 0x3000,0x4000,0x4000,0x3028,0x4000,0x3900,0x3202,0x4001, 787 | 0x4000,0x3028,0x3028,0x2028,0x3481,0x4002,0x4004,0x3028, 788 | 0x4000,0x3900,0x3400,0x4028,0x3900,0x2900,0x4004,0x3900, 789 | 0x3052,0x4005,0x4004,0x3028,0x4004,0x3900,0x3004,0x4004, 790 | 0x4000,0x3090,0x3202,0x4028,0x3202,0x400d,0x2202,0x3202, 791 | 0x3104,0x4028,0x4028,0x3028,0x4008,0x3040,0x3202,0x4011, 792 | 0x3021,0x400a,0x4021,0x3044,0x4008,0x3900,0x3202,0x4011, 793 | 0x4008,0x3600,0x3880,0x4011,0x3008,0x4008,0x4004,0x3011, 794 | 0x4000,0x3406,0x31c0,0x4001,0x3018,0x4001,0x4001,0x3001, 795 | 0x3a00,0x4028,0x4003,0x3028,0x4004,0x3040,0x3004,0x4001, 796 | 0x3021,0x4021,0x4004,0x3210,0x4004,0x3900,0x3004,0x4001, 797 | 0x4004,0x3080,0x3004,0x4004,0x3004,0x4004,0x2004,0x3004, 798 | 0x3021,0x4021,0x400c,0x3800,0x4018,0x3040,0x3202,0x4001, 799 | 0x4021,0x3040,0x3410,0x4028,0x3040,0x2040,0x4004,0x3040, 800 | 0x2021,0x3021,0x3021,0x4021,0x3021,0x4012,0x4004,0x3488, 801 | 0x3021,0x4021,0x4004,0x3102,0x4004,0x3040,0x3004,0x4004, 802 | 0x3000,0x4000,0x4000,0x3842,0x4000,0x3608,0x3110,0x4001, 803 | 0x4000,0x3005,0x3110,0x4005,0x3110,0x4002,0x2110,0x3110, 804 | 0x4000,0x3005,0x3400,0x4005,0x3082,0x4005,0x4020,0x3020, 805 | 0x3005,0x2005,0x4005,0x3005,0x4005,0x3005,0x3110,0x4005, 806 | 0x4000,0x3090,0x300c,0x400c,0x3801,0x4020,0x400c,0x3020, 807 | 0x3422,0x4005,0x400c,0x3200,0x4008,0x3040,0x3110,0x4020, 808 | 0x3340,0x4005,0x400c,0x3020,0x4008,0x3020,0x3020,0x2020, 809 | 0x4005,0x3005,0x3880,0x4005,0x3008,0x4005,0x4008,0x3020, 810 | 0x4000,0x3120,0x300c,0x4001,0x3082,0x4001,0x4001,0x3001, 811 | 0x3a00,0x4005,0x4003,0x3480,0x4029,0x3040,0x3110,0x4001, 812 | 0x3082,0x4005,0x400c,0x3210,0x2082,0x3082,0x3082,0x4001, 813 | 0x4005,0x3005,0x3060,0x4005,0x3082,0x4005,0x4004,0x3808, 814 | 0x300c,0x400c,0x200c,0x300c,0x400c,0x3040,0x300c,0x4001, 815 | 0x400c,0x3040,0x300c,0x400c,0x3040,0x2040,0x400c,0x3040, 816 | 0x400c,0x3c00,0x300c,0x400c,0x3082,0x4020,0x400c,0x3020, 817 | 0x3010,0x4005,0x400c,0x3102,0x4008,0x3040,0x3601,0x4020, 818 | 0x4000,0x3090,0x3400,0x4001,0x3064,0x4001,0x4001,0x3001, 819 | 0x3a00,0x4002,0x4028,0x3028,0x4002,0x3002,0x3110,0x4001, 820 | 0x3400,0x4005,0x2400,0x3400,0x4008,0x3900,0x3400,0x4001, 821 | 0x4005,0x3005,0x3400,0x4005,0x3008,0x4002,0x4004,0x32c0, 822 | 0x3090,0x2090,0x400c,0x3090,0x4008,0x3090,0x3202,0x4001, 823 | 0x4008,0x3090,0x3041,0x4028,0x3008,0x4002,0x4008,0x3c04, 824 | 0x4008,0x3090,0x3400,0x4020,0x3008,0x4008,0x4008,0x3020, 825 | 0x3008,0x4005,0x4008,0x3102,0x2008,0x3008,0x3008,0x4008, 826 | 0x3a00,0x4001,0x4001,0x3001,0x4001,0x3001,0x3001,0x2001, 827 | 0x2a00,0x3a00,0x3a00,0x4001,0x3a00,0x4001,0x4001,0x3001, 828 | 0x4021,0x3048,0x3400,0x4001,0x3082,0x4001,0x4001,0x3001, 829 | 0x3a00,0x4005,0x4004,0x3102,0x4004,0x3430,0x3004,0x4001, 830 | 0x400c,0x3090,0x300c,0x4001,0x3500,0x4001,0x4001,0x3001, 831 | 0x3a00,0x4024,0x400c,0x3102,0x4008,0x3040,0x30a0,0x4001, 832 | 0x3021,0x4021,0x400c,0x3102,0x4008,0x3204,0x3850,0x4001, 833 | 0x4008,0x3102,0x3102,0x2102,0x3008,0x4008,0x4004,0x3102, 834 | 0x1000,0x2000,0x2000,0x3000,0x2000,0x3000,0x3000,0x4000, 835 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3030, 836 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3208, 837 | 0x3000,0x4000,0x4000,0x3140,0x4000,0x3804,0x3081,0x4030, 838 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3043, 839 | 0x3000,0x4000,0x4000,0x3200,0x4000,0x3804,0x3408,0x4030, 840 | 0x3000,0x4000,0x4000,0x3490,0x4000,0x3804,0x3100,0x4020, 841 | 0x4000,0x3804,0x3022,0x4009,0x3804,0x2804,0x4022,0x3804, 842 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3030, 843 | 0x3000,0x4000,0x4000,0x3030,0x4000,0x3030,0x3030,0x2030, 844 | 0x3000,0x4000,0x4000,0x3006,0x4000,0x3401,0x3100,0x4006, 845 | 0x4000,0x3080,0x3e00,0x4006,0x304a,0x4030,0x4004,0x3030, 846 | 0x3000,0x4000,0x4000,0x3800,0x4000,0x3088,0x3100,0x4030, 847 | 0x4000,0x3502,0x30c4,0x4009,0x3201,0x4030,0x4030,0x3030, 848 | 0x4000,0x3260,0x3100,0x4006,0x3100,0x4012,0x2100,0x3100, 849 | 0x3010,0x4009,0x4009,0x3009,0x4010,0x3804,0x3100,0x4009, 850 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3208, 851 | 0x3000,0x4000,0x4000,0x3405,0x4000,0x3002,0x3840,0x4002, 852 | 0x3000,0x4000,0x4000,0x3208,0x4000,0x3208,0x3208,0x2208, 853 | 0x4000,0x3080,0x3022,0x4022,0x3510,0x4002,0x4004,0x3208, 854 | 0x3000,0x4000,0x4000,0x3800,0x4000,0x3420,0x3014,0x4014, 855 | 0x4000,0x3058,0x3022,0x4022,0x3201,0x4002,0x4014,0x3180, 856 | 0x4000,0x3101,0x3022,0x4022,0x30c0,0x4012,0x4014,0x3208, 857 | 0x3022,0x4022,0x2022,0x3022,0x4008,0x3804,0x3022,0x4011, 858 | 0x3000,0x4000,0x4000,0x3800,0x4000,0x3144,0x3482,0x4001, 859 | 0x4000,0x3080,0x3108,0x4030,0x3201,0x4002,0x4004,0x3030, 860 | 0x4000,0x3080,0x3051,0x4006,0x3820,0x4012,0x4004,0x3208, 861 | 0x3080,0x2080,0x4004,0x3080,0x4004,0x3080,0x3004,0x4004, 862 | 0x4000,0x3800,0x3800,0x2800,0x3201,0x4012,0x4014,0x3800, 863 | 0x3201,0x4024,0x4022,0x3800,0x2201,0x3201,0x3201,0x400e, 864 | 0x340c,0x4012,0x4022,0x3800,0x4012,0x3012,0x3100,0x4012, 865 | 0x4010,0x3080,0x3022,0x4009,0x3201,0x4012,0x4004,0x3440, 866 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3d00, 867 | 0x3000,0x4000,0x4000,0x3200,0x4000,0x3002,0x3081,0x4002, 868 | 0x3000,0x4000,0x4000,0x3006,0x4000,0x3050,0x3081,0x4006, 869 | 0x4000,0x3428,0x3081,0x4006,0x3081,0x4002,0x2081,0x3081, 870 | 0x3000,0x4000,0x4000,0x3200,0x4000,0x3088,0x3014,0x4014, 871 | 0x4000,0x3200,0x3200,0x2200,0x3160,0x4002,0x4014,0x3200, 872 | 0x4000,0x3101,0x3848,0x4006,0x3602,0x4020,0x4014,0x3020, 873 | 0x3010,0x4010,0x4010,0x3200,0x4008,0x3804,0x3081,0x4020, 874 | 0x3000,0x4000,0x4000,0x3006,0x4000,0x3088,0x3240,0x4001, 875 | 0x4000,0x3841,0x3108,0x4006,0x3404,0x4002,0x4030,0x3030, 876 | 0x4000,0x3006,0x3006,0x2006,0x3820,0x4006,0x4006,0x3006, 877 | 0x3010,0x4006,0x4006,0x3006,0x4010,0x3300,0x3081,0x4006, 878 | 0x4000,0x3088,0x3421,0x4006,0x3088,0x2088,0x4014,0x3088, 879 | 0x3010,0x4010,0x4010,0x3200,0x4010,0x3088,0x3802,0x4030, 880 | 0x3010,0x4006,0x4006,0x3006,0x4010,0x3088,0x3100,0x4006, 881 | 0x2010,0x3010,0x3010,0x4006,0x3010,0x4010,0x4010,0x3440, 882 | 0x3000,0x4000,0x4000,0x30e0,0x4000,0x3002,0x3014,0x4001, 883 | 0x4000,0x3002,0x3108,0x4002,0x3002,0x2002,0x4002,0x3002, 884 | 0x4000,0x3101,0x3400,0x4006,0x3820,0x4002,0x4014,0x3208, 885 | 0x3244,0x4002,0x4022,0x3810,0x4002,0x3002,0x3081,0x4002, 886 | 0x4000,0x3101,0x3014,0x4014,0x3014,0x4002,0x2014,0x3014, 887 | 0x3c80,0x4002,0x4014,0x3200,0x4002,0x3002,0x3014,0x4002, 888 | 0x3101,0x2101,0x4014,0x3101,0x4008,0x3101,0x3014,0x4014, 889 | 0x4008,0x3101,0x3022,0x4022,0x3008,0x4002,0x4008,0x3440, 890 | 0x4000,0x3610,0x3108,0x4001,0x3820,0x4001,0x4001,0x3001, 891 | 0x3108,0x4002,0x2108,0x3108,0x4002,0x3002,0x3108,0x4001, 892 | 0x3820,0x4006,0x4006,0x3006,0x2820,0x3820,0x3820,0x4001, 893 | 0x4010,0x3080,0x3108,0x4006,0x3820,0x4002,0x4004,0x3440, 894 | 0x3042,0x4024,0x4014,0x3800,0x4014,0x3088,0x3014,0x4001, 895 | 0x4010,0x3024,0x3108,0x4024,0x3201,0x4002,0x4014,0x3440, 896 | 0x4010,0x3101,0x3280,0x4006,0x3820,0x4012,0x400b,0x3440, 897 | 0x3010,0x4010,0x4010,0x3440,0x4008,0x3440,0x3440,0x2440, 898 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3084, 899 | 0x3000,0x4000,0x4000,0x3140,0x4000,0x3002,0x3408,0x4002, 900 | 0x3000,0x4000,0x4000,0x3140,0x4000,0x3401,0x3812,0x4020, 901 | 0x4000,0x3140,0x3140,0x2140,0x3220,0x4002,0x4004,0x3140, 902 | 0x3000,0x4000,0x4000,0x3800,0x4000,0x3310,0x3408,0x4020, 903 | 0x4000,0x30a1,0x3408,0x4016,0x3408,0x4002,0x2408,0x3408, 904 | 0x4000,0x300a,0x3205,0x400a,0x30c0,0x400a,0x4020,0x3020, 905 | 0x3010,0x400a,0x4010,0x3140,0x4010,0x3804,0x3408,0x4011, 906 | 0x3000,0x4000,0x4000,0x3800,0x4000,0x3401,0x3240,0x4030, 907 | 0x4000,0x320c,0x3003,0x4003,0x3980,0x4002,0x4003,0x3030, 908 | 0x4000,0x3401,0x30a8,0x4006,0x3401,0x2401,0x4004,0x3401, 909 | 0x3010,0x4010,0x4003,0x3140,0x4004,0x3401,0x3004,0x4004, 910 | 0x4000,0x3800,0x3800,0x2800,0x3026,0x4026,0x4026,0x3800, 911 | 0x3010,0x4010,0x4003,0x3800,0x4010,0x3040,0x3408,0x4030, 912 | 0x3010,0x400a,0x4010,0x3800,0x4010,0x3401,0x3100,0x4020, 913 | 0x2010,0x3010,0x3010,0x4009,0x3010,0x4010,0x4004,0x3282, 914 | 0x3000,0x4000,0x4000,0x3800,0x4000,0x3002,0x3121,0x4002, 915 | 0x4000,0x3002,0x3290,0x4002,0x3002,0x2002,0x4002,0x3002, 916 | 0x4000,0x3034,0x3400,0x4034,0x30c0,0x4002,0x4004,0x3208, 917 | 0x3809,0x4002,0x4004,0x3140,0x4002,0x3002,0x3004,0x4002, 918 | 0x4000,0x3800,0x3800,0x2800,0x30c0,0x4002,0x4014,0x3800, 919 | 0x3104,0x4002,0x4022,0x3800,0x4002,0x3002,0x3408,0x4002, 920 | 0x30c0,0x400a,0x4022,0x3800,0x20c0,0x30c0,0x30c0,0x4011, 921 | 0x4010,0x3600,0x3022,0x4011,0x30c0,0x4002,0x4004,0x3011, 922 | 0x4000,0x3800,0x3800,0x2800,0x3018,0x4002,0x4004,0x3800, 923 | 0x3460,0x4002,0x4003,0x3800,0x4002,0x3002,0x3004,0x4002, 924 | 0x3302,0x4034,0x4004,0x3800,0x4004,0x3401,0x3004,0x4004, 925 | 0x4004,0x3080,0x3004,0x4004,0x3004,0x4002,0x2004,0x3004, 926 | 0x3800,0x2800,0x2800,0x1800,0x4018,0x3800,0x3800,0x2800, 927 | 0x4010,0x3800,0x3800,0x2800,0x3201,0x4002,0x4004,0x3800, 928 | 0x4010,0x3800,0x3800,0x2800,0x30c0,0x4012,0x4004,0x3800, 929 | 0x3010,0x4010,0x4004,0x3800,0x4004,0x3128,0x3004,0x4004, 930 | 0x3000,0x4000,0x4000,0x3019,0x4000,0x3002,0x3240,0x4002, 931 | 0x4000,0x3002,0x3824,0x4002,0x3002,0x2002,0x4002,0x3002, 932 | 0x4000,0x3a80,0x3400,0x4006,0x310c,0x4002,0x4020,0x3020, 933 | 0x3010,0x4002,0x4010,0x3140,0x4002,0x3002,0x3081,0x4002, 934 | 0x4000,0x3444,0x3182,0x4019,0x3801,0x4002,0x4014,0x3020, 935 | 0x3010,0x4002,0x4010,0x3200,0x4002,0x3002,0x3408,0x4002, 936 | 0x3010,0x400a,0x4010,0x3020,0x4010,0x3020,0x3020,0x2020, 937 | 0x2010,0x3010,0x3010,0x4010,0x3010,0x4002,0x4010,0x3020, 938 | 0x4000,0x3120,0x3240,0x4006,0x3240,0x4002,0x2240,0x3240, 939 | 0x3010,0x4002,0x4003,0x3480,0x4002,0x3002,0x3240,0x4002, 940 | 0x3010,0x4006,0x4006,0x3006,0x4010,0x3401,0x3240,0x4006, 941 | 0x2010,0x3010,0x3010,0x4006,0x3010,0x4002,0x4004,0x3808, 942 | 0x3010,0x4010,0x400c,0x3800,0x4010,0x3088,0x3240,0x4020, 943 | 0x2010,0x3010,0x3010,0x4010,0x3010,0x4002,0x4010,0x3105, 944 | 0x2010,0x3010,0x3010,0x4006,0x3010,0x4010,0x400b,0x3020, 945 | 0x1010,0x2010,0x2010,0x3010,0x2010,0x3010,0x3010,0x4010, 946 | 0x4000,0x3002,0x3400,0x4002,0x3002,0x2002,0x4002,0x3002, 947 | 0x3002,0x2002,0x4002,0x3002,0x2002,0x1002,0x3002,0x2002, 948 | 0x3400,0x4002,0x2400,0x3400,0x4002,0x3002,0x3400,0x4002, 949 | 0x4002,0x3002,0x3400,0x4002,0x3002,0x2002,0x4002,0x3002, 950 | 0x3228,0x4002,0x4014,0x3800,0x4002,0x3002,0x3014,0x4002, 951 | 0x4002,0x3002,0x3041,0x4002,0x3002,0x2002,0x4002,0x3002, 952 | 0x4010,0x3101,0x3400,0x4020,0x30c0,0x4002,0x400b,0x3020, 953 | 0x3010,0x4002,0x4010,0x308c,0x4002,0x3002,0x3b00,0x4002, 954 | 0x3085,0x4002,0x4032,0x3800,0x4002,0x3002,0x3240,0x4001, 955 | 0x4002,0x3002,0x3108,0x4002,0x3002,0x2002,0x4002,0x3002, 956 | 0x4010,0x3048,0x3400,0x4006,0x3820,0x4002,0x4004,0x3190, 957 | 0x3010,0x4002,0x4004,0x3221,0x4002,0x3002,0x3004,0x4002, 958 | 0x4010,0x3800,0x3800,0x2800,0x3500,0x4002,0x400b,0x3800, 959 | 0x3010,0x4002,0x4010,0x3800,0x4002,0x3002,0x30a0,0x4002, 960 | 0x3010,0x4010,0x400b,0x3800,0x400b,0x3204,0x300b,0x400b, 961 | 0x2010,0x3010,0x3010,0x4010,0x3010,0x4002,0x4004,0x3440, 962 | 0x2000,0x3000,0x3000,0x4000,0x3000,0x4000,0x4000,0x3084, 963 | 0x3000,0x4000,0x4000,0x3200,0x4000,0x3109,0x3840,0x4030, 964 | 0x3000,0x4000,0x4000,0x3821,0x4000,0x3050,0x3100,0x4050, 965 | 0x4000,0x3080,0x301c,0x401c,0x3220,0x4050,0x401c,0x3402, 966 | 0x3000,0x4000,0x4000,0x3200,0x4000,0x3420,0x3100,0x4043, 967 | 0x4000,0x3200,0x3200,0x2200,0x3092,0x4040,0x4025,0x3200, 968 | 0x4000,0x300a,0x3100,0x400a,0x3100,0x400a,0x2100,0x3100, 969 | 0x3441,0x400a,0x401c,0x3200,0x4008,0x3804,0x3100,0x4011, 970 | 0x3000,0x4000,0x4000,0x3448,0x4000,0x3a02,0x3100,0x4001, 971 | 0x4000,0x3080,0x3003,0x4003,0x3404,0x4030,0x4003,0x3030, 972 | 0x4000,0x3080,0x3100,0x4006,0x3100,0x402c,0x2100,0x3100, 973 | 0x3080,0x2080,0x4003,0x3080,0x404a,0x3080,0x3100,0x4030, 974 | 0x4000,0x3015,0x3100,0x4015,0x3100,0x4015,0x2100,0x3100, 975 | 0x3828,0x4015,0x4003,0x3200,0x4040,0x3040,0x3100,0x400e, 976 | 0x3100,0x400a,0x2100,0x3100,0x2100,0x3100,0x1100,0x2100, 977 | 0x4010,0x3080,0x3100,0x4009,0x3100,0x4023,0x2100,0x3100, 978 | 0x3000,0x4000,0x4000,0x3112,0x4000,0x3420,0x3840,0x4001, 979 | 0x4000,0x3080,0x3840,0x4028,0x3840,0x4002,0x2840,0x3840, 980 | 0x4000,0x3080,0x3400,0x4044,0x3007,0x4007,0x4007,0x3208, 981 | 0x3080,0x2080,0x401c,0x3080,0x4007,0x3080,0x3840,0x4011, 982 | 0x4000,0x3420,0x3089,0x4044,0x3420,0x2420,0x4014,0x3420, 983 | 0x3104,0x4058,0x4022,0x3200,0x4008,0x3420,0x3840,0x400e, 984 | 0x3a10,0x400a,0x4022,0x3044,0x4007,0x3420,0x3100,0x4011, 985 | 0x4008,0x3080,0x3022,0x4011,0x3008,0x4008,0x4008,0x3011, 986 | 0x4000,0x3080,0x3224,0x4001,0x3018,0x4001,0x4001,0x3001, 987 | 0x3080,0x2080,0x4003,0x3080,0x4018,0x3080,0x3840,0x4001, 988 | 0x3080,0x2080,0x4051,0x3080,0x4007,0x3080,0x3100,0x4001, 989 | 0x2080,0x1080,0x3080,0x2080,0x3080,0x2080,0x4004,0x3080, 990 | 0x3042,0x4015,0x4042,0x3800,0x4018,0x3420,0x3100,0x4001, 991 | 0x4042,0x3080,0x3410,0x400e,0x3201,0x400e,0x400e,0x300e, 992 | 0x4021,0x3080,0x3100,0x4038,0x3100,0x4012,0x2100,0x3100, 993 | 0x3080,0x2080,0x4022,0x3080,0x4008,0x3080,0x3100,0x400e, 994 | 0x3000,0x4000,0x4000,0x3200,0x4000,0x3050,0x302a,0x4001, 995 | 0x4000,0x3200,0x3200,0x2200,0x3404,0x4002,0x402a,0x3200, 996 | 0x4000,0x3050,0x3400,0x4006,0x3050,0x2050,0x402a,0x3050, 997 | 0x3902,0x4005,0x401c,0x3200,0x4008,0x3050,0x3081,0x4050, 998 | 0x4000,0x3200,0x3200,0x2200,0x3801,0x4050,0x4014,0x3200, 999 | 0x3200,0x2200,0x2200,0x1200,0x4008,0x3200,0x3200,0x2200, 1000 | 0x30a4,0x400a,0x4013,0x3200,0x4008,0x3050,0x3100,0x4020, 1001 | 0x4008,0x3200,0x3200,0x2200,0x3008,0x4008,0x4008,0x3200, 1002 | 0x4000,0x3120,0x3890,0x4001,0x3404,0x4001,0x4001,0x3001, 1003 | 0x3404,0x401a,0x4003,0x3200,0x2404,0x3404,0x3404,0x4001, 1004 | 0x3209,0x4006,0x4006,0x3006,0x4050,0x3050,0x3100,0x4001, 1005 | 0x4010,0x3080,0x3060,0x4006,0x3404,0x4023,0x4060,0x3808, 1006 | 0x3042,0x4015,0x400c,0x3200,0x4042,0x3088,0x3100,0x4001, 1007 | 0x4010,0x3200,0x3200,0x2200,0x3404,0x4023,0x4059,0x3200, 1008 | 0x4010,0x3c00,0x3100,0x4006,0x3100,0x4023,0x2100,0x3100, 1009 | 0x3010,0x4010,0x4010,0x3200,0x4008,0x3023,0x3100,0x4023, 1010 | 0x4000,0x380c,0x3400,0x4001,0x3380,0x4001,0x4001,0x3001, 1011 | 0x3031,0x4002,0x4031,0x3200,0x4002,0x3002,0x3840,0x4001, 1012 | 0x3400,0x4050,0x2400,0x3400,0x4007,0x3050,0x3400,0x4001, 1013 | 0x4008,0x3080,0x3400,0x404b,0x3008,0x4002,0x4008,0x3124, 1014 | 0x3042,0x4042,0x4014,0x3200,0x4008,0x3420,0x3014,0x4001, 1015 | 0x4008,0x3200,0x3200,0x2200,0x3008,0x4002,0x4008,0x3200, 1016 | 0x4008,0x3101,0x3400,0x4038,0x3008,0x4008,0x4008,0x3882, 1017 | 0x3008,0x4008,0x4008,0x3200,0x2008,0x3008,0x3008,0x4008, 1018 | 0x3042,0x4001,0x4001,0x3001,0x4001,0x3001,0x3001,0x2001, 1019 | 0x4031,0x3080,0x3108,0x4001,0x3404,0x4001,0x4001,0x3001, 1020 | 0x4042,0x3080,0x3400,0x4001,0x3820,0x4001,0x4001,0x3001, 1021 | 0x3080,0x2080,0x4060,0x3080,0x4008,0x3080,0x3212,0x4001, 1022 | 0x2042,0x3042,0x3042,0x4001,0x3042,0x4001,0x4001,0x3001, 1023 | 0x3042,0x4024,0x4042,0x3200,0x4008,0x3910,0x30a0,0x4001, 1024 | 0x3042,0x4038,0x4038,0x3038,0x4008,0x3204,0x3100,0x4001, 1025 | 0x4008,0x3080,0x3805,0x4038,0x3008,0x4008,0x4008,0x3440, 1026 | 0x3000,0x4000,0x4000,0x3084,0x4000,0x3084,0x3084,0x2084, 1027 | 0x4000,0x3c10,0x3003,0x4003,0x3220,0x4002,0x4003,0x3084, 1028 | 0x4000,0x300a,0x3400,0x400a,0x3220,0x400a,0x4049,0x3084, 1029 | 0x3220,0x4005,0x4003,0x3140,0x2220,0x3220,0x3220,0x4011, 1030 | 0x4000,0x300a,0x3070,0x400a,0x3801,0x400a,0x4070,0x3084, 1031 | 0x3104,0x400a,0x4003,0x3200,0x4040,0x3040,0x3408,0x4011, 1032 | 0x300a,0x200a,0x400a,0x300a,0x400a,0x300a,0x3100,0x400a, 1033 | 0x400a,0x300a,0x3880,0x400a,0x3220,0x400a,0x4011,0x3011, 1034 | 0x4000,0x3120,0x3003,0x4003,0x3018,0x4018,0x4003,0x3084, 1035 | 0x3003,0x4003,0x2003,0x3003,0x4003,0x3040,0x3003,0x4003, 1036 | 0x3844,0x400a,0x4003,0x3210,0x4018,0x3401,0x3100,0x4062, 1037 | 0x4003,0x3080,0x3003,0x4003,0x3220,0x4040,0x4003,0x3808, 1038 | 0x3680,0x400a,0x4003,0x3800,0x4018,0x3040,0x3100,0x4040, 1039 | 0x4003,0x3040,0x3003,0x4003,0x3040,0x2040,0x4003,0x3040, 1040 | 0x400a,0x300a,0x3100,0x400a,0x3100,0x400a,0x2100,0x3100, 1041 | 0x3010,0x400a,0x4003,0x3424,0x4010,0x3040,0x3100,0x4011, 1042 | 0x4000,0x3241,0x3400,0x4028,0x3018,0x4002,0x4018,0x3084, 1043 | 0x3104,0x4002,0x4003,0x3028,0x4002,0x3002,0x3840,0x4002, 1044 | 0x3400,0x400a,0x2400,0x3400,0x4007,0x3900,0x3400,0x4011, 1045 | 0x4052,0x3080,0x3400,0x4011,0x3220,0x4002,0x4004,0x3011, 1046 | 0x3104,0x400a,0x4070,0x3800,0x4018,0x3420,0x3202,0x4011, 1047 | 0x2104,0x3104,0x3104,0x4011,0x3104,0x4002,0x4011,0x3011, 1048 | 0x400a,0x300a,0x3400,0x400a,0x30c0,0x400a,0x4011,0x3011, 1049 | 0x3104,0x400a,0x4011,0x3011,0x4008,0x3011,0x3011,0x2011, 1050 | 0x3018,0x4018,0x4003,0x3800,0x2018,0x3018,0x3018,0x4001, 1051 | 0x4003,0x3080,0x3003,0x4003,0x3018,0x4002,0x4003,0x3700, 1052 | 0x4018,0x3080,0x3400,0x4062,0x3018,0x4018,0x4004,0x3062, 1053 | 0x3080,0x2080,0x4003,0x3080,0x4004,0x3080,0x3004,0x4004, 1054 | 0x4018,0x3800,0x3800,0x2800,0x3018,0x4018,0x4018,0x3800, 1055 | 0x3104,0x4040,0x4003,0x3800,0x4018,0x3040,0x30a0,0x400e, 1056 | 0x3021,0x400a,0x4021,0x3800,0x4018,0x3204,0x3100,0x4011, 1057 | 0x4010,0x3080,0x3248,0x4011,0x3c02,0x4011,0x4004,0x3011, 1058 | 0x4000,0x3120,0x3400,0x4019,0x3801,0x4002,0x402a,0x3084, 1059 | 0x30c8,0x4002,0x4003,0x3200,0x4002,0x3002,0x3110,0x4002, 1060 | 0x3400,0x4005,0x2400,0x3400,0x4050,0x3050,0x3400,0x4020, 1061 | 0x4005,0x3005,0x3400,0x4005,0x3220,0x4002,0x4046,0x3808, 1062 | 0x3801,0x400a,0x400c,0x3200,0x2801,0x3801,0x3801,0x4020, 1063 | 0x4010,0x3200,0x3200,0x2200,0x3801,0x4002,0x4046,0x3200, 1064 | 0x400a,0x300a,0x3400,0x400a,0x3801,0x400a,0x4020,0x3020, 1065 | 0x3010,0x4005,0x4010,0x3200,0x4008,0x3580,0x3046,0x4011, 1066 | 0x3120,0x2120,0x4003,0x3120,0x4018,0x3120,0x3240,0x4001, 1067 | 0x4003,0x3120,0x3003,0x4003,0x3404,0x4002,0x4003,0x3808, 1068 | 0x4010,0x3120,0x3400,0x4006,0x3082,0x4050,0x4035,0x3808, 1069 | 0x3010,0x4005,0x4003,0x3808,0x4010,0x3808,0x3808,0x2808, 1070 | 0x400c,0x3120,0x300c,0x400c,0x3801,0x4040,0x400c,0x3412, 1071 | 0x3010,0x4010,0x4003,0x3200,0x4010,0x3040,0x30a0,0x4040, 1072 | 0x3010,0x400a,0x400c,0x30c1,0x4010,0x3204,0x3100,0x4020, 1073 | 0x2010,0x3010,0x3010,0x4010,0x3010,0x4010,0x4010,0x3808, 1074 | 0x3400,0x4002,0x2400,0x3400,0x4002,0x3002,0x3400,0x4001, 1075 | 0x4002,0x3002,0x3400,0x4002,0x3002,0x2002,0x4002,0x3002, 1076 | 0x2400,0x3400,0x1400,0x2400,0x3400,0x4002,0x2400,0x3400, 1077 | 0x3400,0x4002,0x2400,0x3400,0x4002,0x3002,0x3400,0x4002, 1078 | 0x4042,0x3090,0x3400,0x4027,0x3801,0x4002,0x4014,0x3148, 1079 | 0x3104,0x4002,0x4041,0x3200,0x4002,0x3002,0x30a0,0x4002, 1080 | 0x3400,0x400a,0x2400,0x3400,0x4008,0x3204,0x3400,0x4011, 1081 | 0x4008,0x3860,0x3400,0x4011,0x3008,0x4002,0x4008,0x3011, 1082 | 0x4018,0x3120,0x3400,0x4001,0x3018,0x4001,0x4001,0x3001, 1083 | 0x3a00,0x4002,0x4003,0x3054,0x4002,0x3002,0x30a0,0x4001, 1084 | 0x3400,0x4048,0x2400,0x3400,0x4018,0x3204,0x3400,0x4001, 1085 | 0x4010,0x3080,0x3400,0x4054,0x3141,0x4002,0x4004,0x3808, 1086 | 0x3042,0x4042,0x400c,0x3800,0x4018,0x3204,0x30a0,0x4001, 1087 | 0x4010,0x3409,0x30a0,0x4054,0x30a0,0x4002,0x20a0,0x30a0, 1088 | 0x4010,0x3204,0x3400,0x4038,0x3204,0x2204,0x400b,0x3204, 1089 | 0x3010,0x4010,0x4010,0x3102,0x4008,0x3204,0x30a0,0x4011 1090 | }; 1091 | 1092 | /* Functions start here */ 1093 | 1094 | unsigned long golay_encode(unsigned int data) 1095 | { 1096 | unsigned long code; 1097 | 1098 | code = data; 1099 | code <<= 12; 1100 | code += encode_table[data]; 1101 | 1102 | return code; 1103 | } 1104 | unsigned int golay_decode(unsigned long code, unsigned int *errors) 1105 | { 1106 | unsigned int syndrome; 1107 | unsigned int data; 1108 | unsigned int parity; 1109 | 1110 | data = code>>12; 1111 | parity = code&0x00000FFFL; 1112 | 1113 | syndrome = parity^encode_table[data]; 1114 | 1115 | /* Now correct the bits */ 1116 | 1117 | data = data^(error[syndrome]&0x0FFF); 1118 | *errors = (error[syndrome]&0xF000)>>12; 1119 | return data; 1120 | } 1121 | --------------------------------------------------------------------------------