Advertisement
morcheeba

pocorgtfo06 softstrip decode (not perfect)

Dec 20th, 2014
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.18 KB | None | 0 0
  1. ..*UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU.....jGDEMO............demo.prn..The Softstrip[tm] System is a..patent-pending, breakthrough in..computer and information processing.....With the system's technology,..information which used to require..electronic media for dissemination can..be prin4ed right on paper and read off..the paper automatically and error..free. The technology is called..Softstrip[tm] `nd the prifted image..conta`ning the ifformadion is cadded a..data strip. With it, peopde can inpqt..virpua,dy any information -- for..exampde text$ numbars, gr!ph)cs, and..sound %- into their personal computer..from papeR without having to type it..in.....Softstrip technology means more data..will be usef5l As the time an$..erro23 o" t9ping aR$ e$im.jat%d.....EacH data Strip codpdIon. F be.*RVn allow or prohibiT..dUplication using ngrmal printing..processes on any type of paper.....A low cost computer peripheral, the..Cauzin Softstrip[tm] Reader, inputs..the information contained on data..strips directly into the computer.....The Softstrip[tm] System makes print a..whole new source of computer usable..material. Now personal computer users..will be able to obtain software from..printed books, magazines, and..newsletters without having to use the..keyboard. Businesses will be able to..communicate computer data through the..mails without excessive costs and..without special production of separate..magnetic materials..............
  2.  
  3.  
  4.  
  5.  
  6.  
  7. #include <stdio.h>
  8. #include <strings.h>
  9. #include <ctype.h>
  10.  
  11. char datain[]=
  12. #if 0
  13. // all data:
  14. "??0101010???????????1010101??0"
  15. "010101010101010101010101010100"
  16. "010101010101010101010101010100"
  17. "010101010101010101010101010100"
  18. "010101010101010101010101010100"
  19. "010101010101010101010101010100"
  20. "010101010101010101010101010100"
  21. "010101010101010101010101010100"
  22. "010101010101010101010101010100"
  23. "010101010101010101010101010100"
  24. "010101010101010101010101010100"
  25. "100000000000000000000000000111"
  26. "110000110000001010110111000100"
  27. "100100010101000101011001011110"
  28. "000100000000010000000000000000"
  29. "000000000000000000000000010001"
  30. "000000000000000000000000000000"
  31. "001100000000000000010011010101"
  32. "101101011011011110110011101000"
  33. "000001110010011100111011000000"
  34. "000000000000000101010000101100"
  35. "110100110000001001100101011110"
  36. "001100110011000101110110011101"
  37. "100101110010011101001011000001"
  38. "011101101101000101110101101101"
  39. "010111010000001001100101010010"
  40. "111101100111000101110101001101"
  41. "010110110000001001001011011000"
  42. "011100000010010000110101100000"
  43. "001010000000011101000011000101"
  44. "011101010011001110110001011100"
  45. "010110100000011101010011001110"
  46. "101100010011010010110011101101"
  47. "011100110001101000000010001000"
  48. "101100100111010100110100001100"
  49. "111010110001011100001011001000"
  50. "111101111011010101110111001100"
  51. "100010110000001001001011001110"
  52. "001101011000001010000110001101"
  53. "011110110101101100000111010100"
  54. "111100010111010100110010011100"
  55. "100000100100001100111011000101"
  56. "101100000010010010110011101101"
  57. "001100110111101100100111010111"
  58. "101101000011000101110100101100"
  59. "111110110011101100000010000001"
  60. "011100100111011110110110001101"
  61. "010100110110011101100111010010"
  62. "101100111011011100110011101001"
  63. "010110000010100001011000001010"
  64. "000001110101010010110001011101"
  65. "100010110000001000010111000010"
  66. "101101010011000000100110011101"
  67. "110011110110011100010111010101"
  68. "101101011011011100100110011101"
  69. "000000100001011101010011011001"
  70. "101100001011001110110111101101"
  71. "000110110111101101110011010011"
  72. "011100011010010110000010100001"
  73. "110010110011101100110011011110"
  74. "001100100111010110110100001100"
  75. "000101110100101101111011001111"
  76. "001100000010011101110000101100"
  77. "010010110110001100001011000001"
  78. "101001010111011001110101001100"
  79. "100100110000001000010111011111"
  80. "101100000010001001110101001100"
  81. "110001110101011101001011001001"
  82. "111101010011010110000010100001"
  83. "110100110001101101010011011001"
  84. "101100010111001001110111101101"
  85. "101110110100101101100011000000"
  86. "101001011011010100110001001100"
  87. "110010110100001100000010001101"
  88. "101101111011001001110000001000"
  89. "000100110100101101100111011000"
  90. "011101010011010110110100101100"
  91. "001110110100001100010111010010"
  92. "001101111011001110110000001000"
  93. "111000110100001100111011010110"
  94. "100000101000001000110101001100"
  95. "100000100000011100100111010011"
  96. "0011001110110001011?0101001101"
  97. "100100110000001000100111010011"
  98. "001101110011000010110001011100"
  99. "100000100111101100111011000001"
  100. "001000000111010000110000011100"
  101. "010100110010011100000010010000"
  102. "001100111011000100110000001001"
  103. "001001110101001101000011000100"
  104. "101100000010011110110011001100"
  105. "101100110101100000101000000101"
  106. "111100001011010100110000001000"
  107. "100001110100001100000111010100"
  108. "101100100111000000100100001101"
  109. "010101110001011101111011010110"
  110. "101101000011000101110100101100"
  111. "011000110100001100011011000111"
  112. "101101001111000000100100001100"
  113. "101110110001001100000010010100"
  114. "001100100111001001110111101100"
  115. "001001110101100000101000001101"
  116. "101100100111010100110101001101"
  117. "101110100000001000010101000010"
  118. "001101010011000000100001011101"
  119. "110100110110001100001011001111"
  120. "101101111011000110110111101101"
  121. "011100110100111100000010010011"
  122. "001101100111000000100110001100"
  123. "110000110001101100011011010100"
  124. "101100010011010110000010100001"
  125. "011001010111101100110011000101"
  126. "011101100111000101110010011100"
  127. "110010110000011101101101000100"
  128. "111101011011010111010000001001"
  129. "??00?0110011101100010011000000"
  130. "1010?0010111000010110101001101"
  131. "1000?010?000011100100111010011"
  132. "0011?011?011000101110101001101"
  133. "?001?0110000001001001011010110"
  134. "?01101000011011100110101001101"
  135. "?101?000?010100001100011011110"
  136. "00110011101100010111010?001100"
  137. "1?00?0110011101101001011001111"
  138. "?01101110011000000100001011101"
  139. "?00010110101001100000010010011"
  140. "?0110011?011001100110111101100"
  141. "1010?1110101101101000011000100"
  142. "1?11?1001011011110110011101101"
  143. "?000?0100100101101100111000001"
  144. "?01001100011010000110001?01100"
  145. "?001?0110101001100010011000001"
  146. "?01001000011010110000010100000"
  147. "100100110100001100010111010000"
  148. "101100000010011001110001011101"
  149. "101001110100101100000111001111"
  150. "101000000010011101010100101100"
  151. "100101110000101100000010010011"
  152. "101100010111000110100000001001"
  153. "100001110101001101111011000000"
  154. "11110001?011010100110000001001"
  155. "011?00110100001100111011000000"
  156. "101001001011001110110000011100"
  157. "110?01110001011101011000001011"
  158. "000000110111010010110010011101"
  159. "000?01110101011101000011000110"
  160. "001?00010011010011110000001000"
  161. "010000110011101101001111000001"
  162. "001001001011001110110011001100"
  163. "111110110010011101011011010001"
  164. "101100010111010010110111101101"
  165. "101110110000001001011010010110"
  166. "101000000010001100110111101101"
  167. "101001110101100000101000010100"
  168. "001100001111010000110101101100"
  169. "000001110001?01101010011000001"
  170. "101000010111010100110000111100"
  171. "000101110001?01000000010001111"
  172. "001101010111010110110010001101"
  173. "010?00110010011101100111000111"
  174. "001000000010011100110010011101"
  175. "1100001?0000011100001011010010"
  176. "101?01100011011001110001101001"
  177. "1000001?0100001100111011000101"
  178. "0011010?1000001010000110011100"
  179. "111110110101011100111011000100"
  180. "0011000000100101?0100101101001"
  181. "000000100100101100111011000101"
  182. "0111011110110000?0100001011100"
  183. "000010110101001101001011001000"
  184. "011100000010000001110101001101"
  185. "101001110110011101111011001111"
  186. "101101000011000110110000001001"
  187. "111000110111101101011011000000"
  188. "011101010111000101110101001100"
  189. "001001110101100000101000001101"
  190. "001100100111011110110101101101"
  191. "100000100000011101000011000000"
  192. "111101010011001001?10000001001"
  193. "011101110100101100010111000011"
  194. "001101111011010101110001011101"
  195. "100000100000101101000011001100"
  196. "011101001011001110110111001101"
  197. "100000100001011101111011000000"
  198. "101000010111010011110000011100"
  199. "010100110000001001001011000100"
  200. "011101011000001010000100101100"
  201. "101110110011101001011000001011"
  202. "000001011000001010000110010101"
  203. "111110110011001100010111011001"
  204. "011100010111001001110100101101"
  205. "100001110000001000010111010101"
  206. "001101100011000010110011101100"
  207. "111110110001101101111011011100"
  208. "001101001111000000100101101101"
  209. "010100110100001100111011011000"
  210. "111100000010010110110111101100"
  211. "001001110101001100000010000100"
  212. "001101000011000101110100001100"
  213. "010110000010100001110111010011"
  214. "001100011011000110110000001001"
  215. "001000110101001100000010010100"
  216. "011101100111010100110011001100"
  217. "0101011?0001101100000010010001"
  218. "10?101100111000000100001011101"
  219. "000010110101001100000010000101"
  220. "011101001011010110110101001100"
  221. "100000100100001100111011000101"
  222. "101001011000001010000101001100"
  223. "001001110010011101111011001001"
  224. "1110011?011?000000100111101100"
  225. "101?001?0000001000010111010010"
  226. "111?00000111010010110011101100"
  227. "111100110000001001000011001001"
  228. "01?10?01001?000000100101001100"
  229. "1001?01?0100101101011011010010"
  230. "00??001?1011010000110001011100"
  231. "0101001?0001001100111010010110"
  232. "100?001010000101?0000010100000"
  233. "010100010100001101100011000011"
  234. "00?1000?0010000100110100001101"
  235. "000101110100001100000010011000"
  236. "01?100010111001001110100101101"
  237. "000?01110000001001100011011110"
  238. "?01100?100110???011100?1001101"
  239. "010010?10111101100111011001110"
  240. "0?1?000?0?100011000100?0001001"
  241. "001000110101001101011000001010"
  242. "101?001001?1001101010?11101101"
  243. "100000100100001100011011000111"
  244. "101101111011011101110000001000"
  245. "011110110010011100000010000001"
  246. "011100100111011110110000101100"
  247. "010010110010001101001011000100"
  248. "11?101011000001010000001001100"
  249. "110101?10000011100011011010011"
  250. "101101100011010000110001011100"
  251. "010010110111101100111011000001"
  252. "001001010111011001110100101101"
  253. "001110110111001100000010001110"
  254. "00110111?011001001110101101101"
  255. "010000110001101100000010000000"
  256. "011100100111010010110011101100"
  257. "100101110100101100111011011101"
  258. "10110101?000001010000000011101"
  259. "101001110111101101100011010101"
  260. "001101100111011001110101001100"
  261. "011001110000001001111011001111"
  262. "001100000010010000110011101101"
  263. "110011110000001000010111010011"
  264. "011100000111010100110000001001"
  265. "011110110011001100000010000001"
  266. "011101000011000001110101001101"
  267. "001001110011101001011000001011"
  268. "100001011000001010000100000100"
  269. "100000100001101101111011011101"
  270. "111100000010011000110111101101"
  271. "111001110001011100000010011001"
  272. "101101111011010110110000011101"
  273. "010101110001011101010011001000"
  274. "011100000010000001110101001101"
  275. "001001110100101100000111000010"
  276. "101101010011001001110100001100"
  277. "100110110001101000000010000100"
  278. "111100001011010100110101100000"
  279. "001010000110000101000011010100"
  280. "111100101111010010110011101100"
  281. "000000100110010101111011001101"
  282. "101100010111011001110001011100"
  283. "101001110100101100000111011011"
  284. "010100010111010110110101110100"
  285. "100000100010010101010011010000"
  286. "101100010011010100110010011100"
  287. "100110100000001001001011001110"
  288. "001100000111010101110001011100"
  289. "111001110101100000101000000100"
  290. "111100001011010100110000001000"
  291. "110010110011101100110011011110"
  292. "001100100111010110110100001100"
  293. "000101110100101101111011001111"
  294. "101100000010011000110111101100"
  295. "001110110001011101000011010010"
  296. "001100111011010100110001001100"
  297. "100000100111101100111011000001"
  298. "001000010011010000110001011101"
  299. "110000110101100000101000011001"
  300. "011100010111001001110100101101"
  301. "000001110110011100000010000100"
  302. "001101001011001001110101001100"
  303. "011000110001011100011011010010"
  304. "111100000010010010110011101100"
  305. "100101110111101100000010000101"
  306. "111100001011010100110000001000"
  307. "111000110111101101011011000000"
  308. "011101010111000101110101001100"
  309. "001001110011101001011000001011"
  310. "100001011000001010000001010101"
  311. "100010110101001100000010011001"
  312. "010101111011001100110001011100"
  313. "011001110001011100100111010011"
  314. "?01100000111011011010001011101"
  315. "110110110101110100000010011000"
  316. "110101001111011001110001011101"
  317. "110100110101101100000010010110"
  318. "001101000011011010110101001100"
  319. "111001110000001000000111001001"
  320. "111101001011001110110001011101"
  321. "100000100100001101011000001010"
  322. "100001110111000010110111101100"
  323. "000110110101001100000010001110"
  324. "101101010011011101110000001000"
  325. "111001110111101101010111001000"
  326. "111101100011010100110000001001"
  327. "111110110011001100000010011000"
  328. "101101111011010110110000011101"
  329. "010101110001011101010011001000"
  330. "111100000010010101110110011101"
  331. "110000110010001100011011010101"
  332. "001101011000001010000101101100"
  333. "010000110001011101010011001000"
  334. "011101001011010000110001101100"
  335. "001110100000001000111001011111"
  336. "101101110111000000100000011101"
  337. "110100110010011101100111011110"
  338. "101100111011010000110001101101"
  339. "100000100110001101111011010111"
  340. "001100000111010101110001011100"
  341. "010100110010011100000010010101"
  342. "011101100111010100110010011100"
  343. "011001110101100000101000011101"
  344. "111101001011000110110001101100"
  345. "000000100010001101010011000000"
  346. "001001000011001000110001101101"
  347. "110100110000001000010111011110"
  348. "101100000010011110110010001101"
  349. "000101110100001101001011001110"
  350. "101100000010011001110111101101"
  351. "101100110001011101110111010000"
  352. "101100100111010100110000001000"
  353. "001100110010011101111011010111"
  354. "101101011000001010000000011101"
  355. "101001110100101100111011000101"
  356. "011101010011000100110000001001"
  357. "001000110111101101111011011010"
  358. "001101100111000110100000001001"
  359. "110110110100001101110011010001"
  360. "101100101111010010110011101101"
  361. "110100110110011100011010000001"
  362. "001001000011001110110001001100"
  363. "010110000010100000111011010100"
  364. "101101110111011001110001101100"
  365. "110100110001011100010111010101"
  366. "001100100111011001110000001000"
  367. "011101110100101100010111000011"
  368. "001101111011010101110001011101"
  369. "100000100000101101000011001100"
  370. "011101001011001110110111001101"
  371. "100000100001011101111011000000"
  372. "101001010111011001110101001100"
  373. "?00000100001011100001011010100"
  374. "101101011000001010000110101101"
  375. "110100110100111100100011011111"
  376. "101101000011001001110001001101"
  377. "101110100000001000100001010100"
  378. "011101100111010010110011101101"
  379. "110100110110011101100111010101"
  380. "001101100111000000100111011100"
  381. "010010110001101100011011000000"
  382. "101000100011010100110000001000"
  383. "110000110010001100011011010101"
  384. "001100000010000101110111101101"
  385. "110110000010100001100011011110"
  386. "001101011011010110110101011101"
  387. "101110110100101101100011010001"
  388. "001100010111010100110000001001"
  389. "111000110111101101011011000000"
  390. "011101010111000101110101001100"
  391. "001001110000001000010011010001"
  392. "001100010111010000110000001000"
  393. "100101110000101100100111011110"
  394. "001101010111011100110000101101"
  395. "000000100001011100001011010100"
  396. "001101011000001010000101101100"
  397. "010000110100101100011011011001"
  398. "011100000010011101110100101100"
  399. "000101110000101101111011010101"
  400. "011100010111000000100101001100"
  401. "000011110110001101010011011000"
  402. "111101100111010010110011011100"
  403. "010100110000001001100011011111"
  404. "001101100111000101110110011100"
  405. "100000100100001100111011000101"
  406. "001101011000001010000111011101"
  407. "110010110001011100001011011110"
  408. "001101010111000101110000001000"
  409. "111001110000011101010011011001"
  410. "001101001011010000110001101101"
  411. "000000100000011100100111011110"
  412. "101100010011010101110110001101"
  413. "000101110100101101111011001111"
  414. "101100000010011110110011001100"
  415. "000000100110011101010011000000"
  416. "111101000011001001110100001100"
  417. "100101110101001101011000001010"
  418. "100001011011010000110111001100"
  419. "001110110101001100010111010011"
  420. "001101100011000000100101101100"
  421. "010000110001011101010011001000"
  422. "0111010010110100001100011011?0"
  423. "011001110011101001011000001010"
  424. "000000101100000000000000000001"
  425. "0000000000000000000000000000?0"
  426. "000000000000000000000000000000"
  427. "000000000000000000000000000000";
  428. #else
  429. // remove left and right columns:
  430. "?0101010???????????1010101??"
  431. "1010101010101010101010101010"
  432. "1010101010101010101010101010"
  433. "1010101010101010101010101010"
  434. "1010101010101010101010101010"
  435. "1010101010101010101010101010"
  436. "1010101010101010101010101010"
  437. "1010101010101010101010101010"
  438. "1010101010101010101010101010"
  439. "1010101010101010101010101010"
  440. "1010101010101010101010101010"
  441. "0000000000000000000000000011"
  442. "1000011000000101011011100010"
  443. "0010001010100010101100101111"
  444. "0010000000001000000000000000"
  445. "0000000000000000000000001000"
  446. "0000000000000000000000000000"
  447. "0110000000000000001001101010"
  448. "0110101101101111011001110100"
  449. "0000111001001110011101100000"
  450. "0000000000000010101000010110"
  451. "1010011000000100110010101111"
  452. "0110011001100010111011001110"
  453. "0010111001001110100101100000"
  454. "1110110110100010111010110110"
  455. "1011101000000100110010101001"
  456. "1110110011100010111010100110"
  457. "1011011000000100100101101100"
  458. "1110000001001000011010110000"
  459. "0101000000001110100001100010"
  460. "1110101001100111011000101110"
  461. "1011010000001110101001100111"
  462. "0110001001101001011001110110"
  463. "1110011000110100000001000100"
  464. "0110010011101010011010000110"
  465. "1101011000101110000101100100"
  466. "1110111101101010111011100110"
  467. "0001011000000100100101100111"
  468. "0110101100000101000011000110"
  469. "1111011010110110000011101010"
  470. "1110001011101010011001001110"
  471. "0000010010000110011101100010"
  472. "0110000001001001011001110110"
  473. "0110011011110110010011101011"
  474. "0110100001100010111010010110"
  475. "1111011001110110000001000000"
  476. "1110010011101111011011000110"
  477. "1010011011001110110011101001"
  478. "0110011101101110011001110100"
  479. "1011000001010000101100000101"
  480. "0000111010101001011000101110"
  481. "0001011000000100001011100001"
  482. "0110101001100000010011001110"
  483. "1001111011001110001011101010"
  484. "0110101101101110010011001110"
  485. "0000010000101110101001101100"
  486. "0110000101100111011011110110"
  487. "0011011011110110111001101001"
  488. "1110001101001011000001010000"
  489. "1001011001110110011001101111"
  490. "0110010011101011011010000110"
  491. "0010111010010110111101100111"
  492. "0110000001001110111000010110"
  493. "1001011011000110000101100000"
  494. "0100101011101100111010100110"
  495. "0010011000000100001011101111"
  496. "0110000001000100111010100110"
  497. "1000111010101110100101100100"
  498. "1110101001101011000001010000"
  499. "1010011000110110101001101100"
  500. "0110001011100100111011110110"
  501. "0111011010010110110001100000"
  502. "0100101101101010011000100110"
  503. "1001011010000110000001000110"
  504. "0110111101100100111000000100"
  505. "0010011010010110110011101100"
  506. "1110101001101011011010010110"
  507. "0111011010000110001011101001"
  508. "0110111101100111011000000100"
  509. "1100011010000110011101101011"
  510. "0000010100000100011010100110"
  511. "0000010000001110010011101001"
  512. "011001110110001011?010100110"
  513. "0010011000000100010011101001"
  514. "0110111001100001011000101110"
  515. "0000010011110110011101100000"
  516. "0100000011101000011000001110"
  517. "1010011001001110000001001000"
  518. "0110011101100010011000000100"
  519. "0100111010100110100001100010"
  520. "0110000001001111011001100110"
  521. "0110011010110000010100000010"
  522. "1110000101101010011000000100"
  523. "0000111010000110000011101010"
  524. "0110010011100000010010000110"
  525. "1010111000101110111101101011"
  526. "0110100001100010111010010110"
  527. "1100011010000110001101100011"
  528. "0110100111100000010010000110"
  529. "0111011000100110000001001010"
  530. "0110010011100100111011110110"
  531. "0100111010110000010100000110"
  532. "0110010011101010011010100110"
  533. "0111010000000100001010100001"
  534. "0110101001100000010000101110"
  535. "1010011011000110000101100111"
  536. "0110111101100011011011110110"
  537. "1110011010011110000001001001"
  538. "0110110011100000010011000110"
  539. "1000011000110110001101101010"
  540. "0110001001101011000001010000"
  541. "1100101011110110011001100010"
  542. "1110110011100010111001001110"
  543. "1001011000001110110110100010"
  544. "1110101101101011101000000100"
  545. "?00?011001110110001001100000"
  546. "010?001011100001011010100110"
  547. "000?010?00001110010011101001"
  548. "011?011?01100010111010100110"
  549. "001?011000000100100101101011"
  550. "0110100001101110011010100110"
  551. "101?000?01010000110001101111"
  552. "0110011101100010111010?00110"
  553. "?00?011001110110100101100111"
  554. "0110111001100000010000101110"
  555. "0001011010100110000001001001"
  556. "0110011?01100110011011110110"
  557. "010?111010110110100001100010"
  558. "?11?100101101111011001110110"
  559. "000?010010010110110011100000"
  560. "01001100011010000110001?0110"
  561. "001?011010100110001001100000"
  562. "0100100001101011000001010000"
  563. "0010011010000110001011101000"
  564. "0110000001001100111000101110"
  565. "0100111010010110000011100111"
  566. "0100000001001110101010010110"
  567. "0010111000010110000001001001"
  568. "0110001011100011010000000100"
  569. "0000111010100110111101100000"
  570. "1110001?01101010011000000100"
  571. "11?0011010000110011101100000"
  572. "0100100101100111011000001110"
  573. "10?0111000101110101100000101"
  574. "0000011011101001011001001110"
  575. "00?0111010101110100001100011"
  576. "01?0001001101001111000000100"
  577. "1000011001110110100111100000"
  578. "0100100101100111011001100110"
  579. "1111011001001110101101101000"
  580. "0110001011101001011011110110"
  581. "0111011000000100101101001011"
  582. "0100000001000110011011110110"
  583. "0100111010110000010100001010"
  584. "0110000111101000011010110110"
  585. "00001110001?0110101001100000"
  586. "0100001011101010011000011110"
  587. "00101110001?0100000001000111"
  588. "0110101011101011011001000110"
  589. "10?0011001001110110011100011"
  590. "0100000001001110011001001110"
  591. "100001?000001110000101101001"
  592. "01?0110001101100111000110100"
  593. "000001?010000110011101100010"
  594. "011010?100000101000011001110"
  595. "1111011010101110011101100010"
  596. "011000000100101?010010110100"
  597. "0000010010010110011101100010"
  598. "111011110110000?010000101110"
  599. "0001011010100110100101100100"
  600. "1110000001000000111010100110"
  601. "0100111011001110111101100111"
  602. "0110100001100011011000000100"
  603. "1100011011110110101101100000"
  604. "1110101011100010111010100110"
  605. "0100111010110000010100000110"
  606. "0110010011101111011010110110"
  607. "0000010000001110100001100000"
  608. "11101010011001001?1000000100"
  609. "1110111010010110001011100001"
  610. "0110111101101010111000101110"
  611. "0000010000010110100001100110"
  612. "1110100101100111011011100110"
  613. "0000010000101110111101100000"
  614. "0100001011101001111000001110"
  615. "1010011000000100100101100010"
  616. "1110101100000101000010010110"
  617. "0111011001110100101100000101"
  618. "0000101100000101000011001010"
  619. "1111011001100110001011101100"
  620. "1110001011100100111010010110"
  621. "0000111000000100001011101010"
  622. "0110110001100001011001110110"
  623. "1111011000110110111101101110"
  624. "0110100111100000010010110110"
  625. "1010011010000110011101101100"
  626. "1110000001001011011011110110"
  627. "0100111010100110000001000010"
  628. "0110100001100010111010000110"
  629. "1011000001010000111011101001"
  630. "0110001101100011011000000100"
  631. "0100011010100110000001001010"
  632. "1110110011101010011001100110"
  633. "101011?000110110000001001000"
  634. "0?10110011100000010000101110"
  635. "0001011010100110000001000010"
  636. "1110100101101011011010100110"
  637. "0000010010000110011101100010"
  638. "0100101100000101000010100110"
  639. "0100111001001110111101100100"
  640. "110011?011?00000010011110110"
  641. "01?001?000000100001011101001"
  642. "11?0000011101001011001110110"
  643. "1110011000000100100001100100"
  644. "1?10?01001?00000010010100110"
  645. "001?01?010010110101101101001"
  646. "0??001?101101000011000101110"
  647. "101001?000100110011101001011"
  648. "00?001010000101?000001010000"
  649. "1010001010000110110001100001"
  650. "0?1000?001000010011010000110"
  651. "0010111010000110000001001100"
  652. "1?10001011100100111010010110"
  653. "00?0111000000100110001101111"
  654. "01100?100110???011100?100110"
  655. "10010?1011110110011101100111"
  656. "?1?000?0?100011000100?000100"
  657. "0100011010100110101100000101"
  658. "01?001001?1001101010?1110110"
  659. "0000010010000110001101100011"
  660. "0110111101101110111000000100"
  661. "1111011001001110000001000000"
  662. "1110010011101111011000010110"
  663. "1001011001000110100101100010"
  664. "1?10101100000101000000100110"
  665. "10101?1000001110001101101001"
  666. "0110110001101000011000101110"
  667. "1001011011110110011101100000"
  668. "0100101011101100111010010110"
  669. "0111011011100110000001000111"
  670. "0110111?01100100111010110110"
  671. "1000011000110110000001000000"
  672. "1110010011101001011001110110"
  673. "0010111010010110011101101110"
  674. "0110101?00000101000000001110"
  675. "0100111011110110110001101010"
  676. "0110110011101100111010100110"
  677. "1100111000000100111101100111"
  678. "0110000001001000011001110110"
  679. "1001111000000100001011101001"
  680. "1110000011101010011000000100"
  681. "1111011001100110000001000000"
  682. "1110100001100000111010100110"
  683. "0100111001110100101100000101"
  684. "0000101100000101000010000010"
  685. "0000010000110110111101101110"
  686. "1110000001001100011011110110"
  687. "1100111000101110000001001100"
  688. "0110111101101011011000001110"
  689. "1010111000101110101001100100"
  690. "1110000001000000111010100110"
  691. "0100111010010110000011100001"
  692. "0110101001100100111010000110"
  693. "0011011000110100000001000010"
  694. "1110000101101010011010110000"
  695. "0101000011000010100001101010"
  696. "1110010111101001011001110110"
  697. "0000010011001010111101100110"
  698. "0110001011101100111000101110"
  699. "0100111010010110000011101101"
  700. "1010001011101011011010111010"
  701. "0000010001001010101001101000"
  702. "0110001001101010011001001110"
  703. "0011010000000100100101100111"
  704. "0110000011101010111000101110"
  705. "1100111010110000010100000010"
  706. "1110000101101010011000000100"
  707. "1001011001110110011001101111"
  708. "0110010011101011011010000110"
  709. "0010111010010110111101100111"
  710. "0110000001001100011011110110"
  711. "0111011000101110100001101001"
  712. "0110011101101010011000100110"
  713. "0000010011110110011101100000"
  714. "0100001001101000011000101110"
  715. "1000011010110000010100001100"
  716. "1110001011100100111010010110"
  717. "0000111011001110000001000010"
  718. "0110100101100100111010100110"
  719. "1100011000101110001101101001"
  720. "1110000001001001011001110110"
  721. "0010111011110110000001000010"
  722. "1110000101101010011000000100"
  723. "1100011011110110101101100000"
  724. "1110101011100010111010100110"
  725. "0100111001110100101100000101"
  726. "0000101100000101000000101010"
  727. "0001011010100110000001001100"
  728. "1010111101100110011000101110"
  729. "1100111000101110010011101001"
  730. "0110000011101101101000101110"
  731. "1011011010111010000001001100"
  732. "1010100111101100111000101110"
  733. "1010011010110110000001001011"
  734. "0110100001101101011010100110"
  735. "1100111000000100000011100100"
  736. "1110100101100111011000101110"
  737. "0000010010000110101100000101"
  738. "0000111011100001011011110110"
  739. "0011011010100110000001000111"
  740. "0110101001101110111000000100"
  741. "1100111011110110101011100100"
  742. "1110110001101010011000000100"
  743. "1111011001100110000001001100"
  744. "0110111101101011011000001110"
  745. "1010111000101110101001100100"
  746. "1110000001001010111011001110"
  747. "1000011001000110001101101010"
  748. "0110101100000101000010110110"
  749. "1000011000101110101001100100"
  750. "1110100101101000011000110110"
  751. "0111010000000100011100101111"
  752. "0110111011100000010000001110"
  753. "1010011001001110110011101111"
  754. "0110011101101000011000110110"
  755. "0000010011000110111101101011"
  756. "0110000011101010111000101110"
  757. "1010011001001110000001001010"
  758. "1110110011101010011001001110"
  759. "1100111010110000010100001110"
  760. "1110100101100011011000110110"
  761. "0000010001000110101001100000"
  762. "0100100001100100011000110110"
  763. "1010011000000100001011101111"
  764. "0110000001001111011001000110"
  765. "0010111010000110100101100111"
  766. "0110000001001100111011110110"
  767. "0110011000101110111011101000"
  768. "0110010011101010011000000100"
  769. "0110011001001110111101101011"
  770. "0110101100000101000000001110"
  771. "0100111010010110011101100010"
  772. "1110101001100010011000000100"
  773. "0100011011110110111101101101"
  774. "0110110011100011010000000100"
  775. "1011011010000110111001101000"
  776. "0110010111101001011001110110"
  777. "1010011011001110001101000000"
  778. "0100100001100111011000100110"
  779. "1011000001010000011101101010"
  780. "0110111011101100111000110110"
  781. "1010011000101110001011101010"
  782. "0110010011101100111000000100"
  783. "1110111010010110001011100001"
  784. "0110111101101010111000101110"
  785. "0000010000010110100001100110"
  786. "1110100101100111011011100110"
  787. "0000010000101110111101100000"
  788. "0100101011101100111010100110"
  789. "0000010000101110000101101010"
  790. "0110101100000101000011010110"
  791. "1010011010011110010001101111"
  792. "0110100001100100111000100110"
  793. "0111010000000100010000101010"
  794. "1110110011101001011001110110"
  795. "1010011011001110110011101010"
  796. "0110110011100000010011101110"
  797. "1001011000110110001101100000"
  798. "0100010001101010011000000100"
  799. "1000011001000110001101101010"
  800. "0110000001000010111011110110"
  801. "1011000001010000110001101111"
  802. "0110101101101011011010101110"
  803. "0111011010010110110001101000"
  804. "0110001011101010011000000100"
  805. "1100011011110110101101100000"
  806. "1110101011100010111010100110"
  807. "0100111000000100001001101000"
  808. "0110001011101000011000000100"
  809. "0010111000010110010011101111"
  810. "0110101011101110011000010110"
  811. "0000010000101110000101101010"
  812. "0110101100000101000010110110"
  813. "1000011010010110001101101100"
  814. "1110000001001110111010010110"
  815. "0010111000010110111101101010"
  816. "1110001011100000010010100110"
  817. "0001111011000110101001101100"
  818. "1110110011101001011001101110"
  819. "1010011000000100110001101111"
  820. "0110110011100010111011001110"
  821. "0000010010000110011101100010"
  822. "0110101100000101000011101110"
  823. "1001011000101110000101101111"
  824. "0110101011100010111000000100"
  825. "1100111000001110101001101100"
  826. "0110100101101000011000110110"
  827. "0000010000001110010011101111"
  828. "0110001001101010111011000110"
  829. "0010111010010110111101100111"
  830. "0110000001001111011001100110"
  831. "0000010011001110101001100000"
  832. "1110100001100100111010000110"
  833. "0010111010100110101100000101"
  834. "0000101101101000011011100110"
  835. "0111011010100110001011101001"
  836. "0110110001100000010010110110"
  837. "1000011000101110101001100100"
  838. "111010010110100001100011011?"
  839. "1100111001110100101100000101"
  840. "0000010110000000000000000000"
  841. "000000000000000000000000000?"
  842. "0000000000000000000000000000"
  843. "0000000000000000000000000000";
  844. #endif
  845. #define SUBLEN 30
  846.  
  847. void print_asc(char c)
  848. {
  849. if(c & 128) {printf("."); return;}; // skip non-ascii ... loses some data!
  850. // printf("%c", (c & 128) ? '_' : ' ');
  851. printf("%c", isprint(c & 127) ? c&127 : '.');
  852. }
  853.  
  854. unsigned char str2char_lsb_first(char * s)
  855. {
  856. unsigned char c = 0;
  857. for(int i=0; (*s != '\0') && (i<8); i++) {
  858. c = c >> 1;
  859. if(*s++ == '1') c = c | 128;
  860. }
  861. return c;
  862. }
  863.  
  864.  
  865. void print_asc_str2char_lsb_first2(char * s)
  866. {
  867. for(int i=0; (*s != '\0') && (i<8); i++) {
  868. printf("%c", s[i]);
  869. }
  870. printf(" ");
  871. print_asc(str2char_lsb_first(s));
  872. printf("\n");
  873. }
  874.  
  875.  
  876. unsigned char str2char_msb_first(char * s)
  877. {
  878. unsigned char c = 0;
  879. for(int i=0; (*s != '\0') && (i<8); i++) {
  880. c = c << 1;
  881. if(*s++ == '1') c = c | 1;
  882. }
  883. return c;
  884. }
  885.  
  886.  
  887. int main()
  888. {
  889. char substr[SUBLEN+1];
  890. char *p = datain;
  891. int skip1, skip2, skip3, offset;
  892. int z;
  893.  
  894. #if 1 //------------ BIG SEARCH -----------------
  895. for(skip1=0; skip1<8; skip1++) {
  896. for(skip2=0; skip2<8; skip2++) {
  897. for(skip3=0; skip3<8; skip3++) {
  898. if(skip1+skip2+skip3+3*8<=SUBLEN+8) // only if we don't cross boundries
  899. for(offset=0; offset<=7; offset++) {
  900. printf("\noffset %d, skip %d %d %d msb:", offset, skip1, skip2, skip3);
  901. for(int pp=0; pp<strlen(datain)-SUBLEN; ) {
  902. print_asc(str2char_msb_first(&datain[offset+pp]));
  903. pp += 8+skip1;
  904. print_asc(str2char_msb_first(&datain[offset+pp]));
  905. pp += 8+skip2;
  906. print_asc(str2char_msb_first(&datain[offset+pp]));
  907. pp += 8+skip3;
  908. }
  909. printf("\noffset %d, skip %d %d %d lsb:", offset, skip1, skip2, skip3);
  910. for(int pp=0; pp<strlen(datain)-SUBLEN; ) {
  911. print_asc(str2char_lsb_first(&datain[offset+pp]));
  912. pp += 8+skip1;
  913. print_asc(str2char_lsb_first(&datain[offset+pp]));
  914. pp += 8+skip2;
  915. print_asc(str2char_lsb_first(&datain[offset+pp]));
  916. pp += 8+skip3;
  917. }
  918. } // offset
  919. }}} // skips
  920. #endif
  921.  
  922. #if 0
  923. offset=3; skip1=0; skip2=2; skip3=2; //-- best guess, but not complete
  924. offset=5; skip1=0; skip2=0; skip3=2; //-- best guess, but not complete
  925. printf("\noffset %d, skip %d %d %d lsb:", offset, skip1, skip2, skip3);
  926. for(int pp=0; pp<strlen(datain)-SUBLEN; ) {
  927. print_asc_str2char_lsb_first2(&datain[offset+pp]);
  928. pp += 8;
  929. if(skip1) {for(z=0; z<skip1; z++) printf("%c", datain[offset+pp++]); printf("\n");}
  930.  
  931. print_asc_str2char_lsb_first2(&datain[offset+pp]);
  932. pp += 8;
  933. if(skip2) {for(z=0; z<skip2; z++) printf("%c", datain[offset+pp++]); printf("\n");}
  934.  
  935. print_asc_str2char_lsb_first2(&datain[offset+pp]);
  936. pp += 8;
  937. if(skip3) {for(z=0; z<skip3; z++) printf("%c", datain[offset+pp++]); printf("\n");}
  938. }
  939. #endif
  940.  
  941.  
  942. #if 0 //--------------------- OLD ------------------------
  943. while(*p != '\0') {
  944. strncpy(substr, p, SUBLEN);
  945. printf("offset %04x: %s\n", offset, substr);
  946. //-------------
  947. for(offset=0; offset<7; offset++) {
  948. printf(" offset %d msb:");
  949. print_asc(str2char_lsb_first(&substr[offset+0]); // first char
  950. print_asc(str2char_lsb_first(&substr[offset+1]); // 2nd char
  951. print_asc(str2char_lsb_first(&substr[offset+2]); // 3rd char
  952. }
  953. void print_asc(char c)
  954. unsigned char str2char_lsb_first(char * s)
  955. unsigned char str2char_msb_first(char * s)
  956.  
  957. //-------------
  958. offset += SUBLEN; p += SUBLEN; // not safe if not multiple of SUBLEN
  959. }
  960. #endif
  961. printf("\n");
  962. return 0;
  963. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement