Advertisement
Guest User

Untitled

a guest
Jul 31st, 2012
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. '' -------------------------------------------
  2. '' Defcon 20 Badge POV
  3. ''
  4. '' Written by YakPiMP 2012
  5. ''
  6. '' yakhack.wordpress.com
  7. '' -------------------------------------------
  8. VAR
  9.  
  10. byte count
  11. byte A[10]
  12. byte B[10]
  13. byte C[10]
  14. byte D[10]
  15. byte E[10]
  16. byte F[10]
  17. byte G[10]
  18. byte H[10]
  19. byte I[10]
  20. byte J[10]
  21. byte K[10]
  22. byte L[10]
  23. byte M[10]
  24. byte N[10]
  25. byte O[10]
  26. byte P[10]
  27. byte Q[10]
  28. byte R[10]
  29. byte S[10]
  30. byte T[10]
  31. byte U[10]
  32. byte V[10]
  33. byte W[10]
  34. byte X[10]
  35. byte Y[10]
  36. byte Z[10]
  37. byte SPACE[8]
  38. byte APOSTROPHE[8]
  39. byte SMILE[10]
  40. byte PERIOD[10]
  41. byte SIN[15]
  42. byte ZIGZAG[15]
  43. byte DICK[25]
  44.  
  45. CON
  46. LED1 = 16
  47. LED2 = 17
  48. LED3 = 18
  49. LED4 = 19
  50. LED5 = 20
  51. LED6 = 21
  52. LED7 = 22
  53. LED8 = 23
  54.  
  55. DELAY = 800
  56.  
  57. PUB main
  58. InitLetters
  59.  
  60. repeat 600
  61. 'DrawFUCKYOU
  62. 'DrawDEFCONXX
  63. 'DrawYAKHACK
  64. 'DrawSIN
  65. 'DrawZIGZAG
  66. 'DrawDONTFUCKITUP
  67. DrawDICK
  68. PUB DrawLetter(letter)
  69. count := 1
  70. outa[LED1..LED8] := %00000000
  71.  
  72. repeat byte[letter]
  73. outa[LED1..LED8] := byte[letter + count]
  74. waitcnt(clkfreq/DELAY + cnt)
  75. count += 1
  76.  
  77. PUB DrawLetterBackward(letter)
  78. count := 0
  79. outa[LED1..LED8] := %00000000
  80.  
  81. repeat byte[letter]
  82. outa[LED1..LED8] := byte[letter + (byte[letter] - count)]
  83. waitcnt(clkfreq/DELAY + cnt)
  84. count += 1
  85.  
  86. PUB Wait(waitDelay)
  87. waitcnt(clkfreq/DELAY * waitDelay + cnt)
  88.  
  89. PUB InitLetters
  90. dira[LED1..LED8] := %11111111
  91.  
  92. A[0] := 6
  93. A[1] := %11111111
  94. A[2] := %11111111
  95. A[3] := %11101100
  96. A[4] := %11111111
  97. A[5] := %11111111
  98. A[6] := %0000000
  99.  
  100. B[0] := 5
  101. B[1] := %11111111
  102. B[2] := %11011011
  103. B[3] := %11011011
  104. B[4] := %01100110
  105. B[5] := %00000000
  106.  
  107. C[0] := 6
  108. C[1] := %11111111
  109. C[2] := %11111111
  110. C[3] := %11000011
  111. C[4] := %11000011
  112. C[5] := %11000011
  113. C[6] := %00000000
  114.  
  115. D[0] := 6
  116. D[1] := %11111111
  117. D[2] := %11111111
  118. D[3] := %11000011
  119. D[4] := %01100110
  120. D[5] := %00111100
  121. D[6] := %00000000
  122.  
  123. E[0] := 6
  124. E[1] := %11111111
  125. E[2] := %11111111
  126. E[3] := %11011011
  127. E[4] := %11011011
  128. E[5] := %11000011
  129. E[6] := %00000000
  130.  
  131. F[0] := 6
  132. F[1] := %11111111
  133. F[2] := %11111111
  134. F[3] := %11011000
  135. F[4] := %11011000
  136. F[5] := %11000000
  137. F[6] := %00000000
  138.  
  139. G[0] := 6
  140. G[1] := %11111111
  141. G[2] := %11111111
  142. G[3] := %11000011
  143. G[4] := %11011011
  144. G[5] := %11011011
  145. G[6] := %01011111
  146.  
  147. H[0] := 7
  148. H[1] := %11111111
  149. H[2] := %11111111
  150. H[3] := %00011000
  151. H[4] := %00011000
  152. H[5] := %11111111
  153. H[6] := %11111111
  154. H[7] := %00000000
  155.  
  156. I[0] := 7
  157. I[1] := %11000011
  158. I[2] := %11000011
  159. I[3] := %11111111
  160. I[4] := %11111111
  161. I[5] := %11000011
  162. I[6] := %11000011
  163. I[7] := %00000000
  164.  
  165. J[0] := 7
  166. J[1] := %11000000
  167. J[2] := %11000000
  168. J[3] := %11111110
  169. J[4] := %11111111
  170. J[5] := %11000011
  171. J[6] := %11000111
  172. J[7] := %00000000
  173.  
  174. K[0] := 6
  175. K[1] := %11111111
  176. K[2] := %11111111
  177. K[3] := %00111100
  178. K[4] := %01100110
  179. K[5] := %11000011
  180. K[6] := %00000000
  181.  
  182. L[0] := 6
  183. L[1] := %11111111
  184. L[2] := %11111111
  185. L[3] := %00000011
  186. L[4] := %00000011
  187. L[5] := %00000011
  188. L[6] := %00000000
  189.  
  190. M[0] := 8
  191. M[1] := %11111111
  192. M[2] := %11111111
  193. M[3] := %01100000
  194. M[4] := %00111000
  195. M[5] := %01100000
  196. M[6] := %11111111
  197. M[7] := %11111111
  198. M[8] := %00000000
  199.  
  200. N[0] := 8
  201. N[1] := %11111111
  202. N[2] := %11111111
  203. N[3] := %01110000
  204. N[4] := %00011000
  205. N[5] := %00011100
  206. N[6] := %11111111
  207. N[7] := %11111111
  208. N[8] := %00000000
  209.  
  210. O[0] := 7
  211. O[1] := %11111111
  212. O[2] := %11111111
  213. O[3] := %11000011
  214. O[4] := %11000011
  215. O[5] := %11111111
  216. O[6] := %11111111
  217. O[7] := %00000000
  218.  
  219. P[0] := 6
  220. P[1] := %11111111
  221. P[2] := %11111111
  222. P[3] := %11001100
  223. P[4] := %11001100
  224. P[5] := %01111000
  225. P[6] := %00000000
  226.  
  227. Q[0] := 8
  228. Q[1] := %00000110
  229. Q[2] := %11111111
  230. Q[3] := %11111111
  231. Q[4] := %11001011
  232. Q[5] := %11000011
  233. Q[6] := %11111111
  234. Q[7] := %11111111
  235. Q[8] := %00000000
  236.  
  237. R[0] := 6
  238. R[1] := %11111111
  239. R[2] := %11111111
  240. R[3] := %11001100
  241. R[4] := %11001111
  242. R[5] := %01111001
  243. R[6] := %00000000
  244.  
  245. S[0] := 5
  246. S[1] := %01100011
  247. S[2] := %11110011
  248. S[3] := %11010011
  249. S[4] := %11001110
  250. S[5] := %00000000
  251.  
  252. T[0] := 7
  253. T[1] := %11000000
  254. T[2] := %11000000
  255. T[3] := %11111111
  256. T[4] := %11111111
  257. T[5] := %11000000
  258. T[6] := %11000000
  259. T[7] := %00000000
  260.  
  261. U[0] := 7
  262. U[1] := %11111111
  263. U[2] := %11111111
  264. U[3] := %00000011
  265. U[4] := %00000011
  266. U[5] := %11111111
  267. U[6] := %11111111
  268. U[7] := %00000000
  269.  
  270. V[0] := 7
  271. V[1] := %11111000
  272. V[2] := %11111110
  273. V[3] := %00000011
  274. V[4] := %00000011
  275. V[5] := %11111110
  276. V[6] := %11111000
  277. V[7] := %00000000
  278.  
  279. W[0] := 8
  280. W[1] := %11111111
  281. W[2] := %11111111
  282. W[3] := %00000110
  283. W[4] := %00011100
  284. W[5] := %00000110
  285. W[6] := %11111111
  286. W[7] := %11111111
  287. W[8] := %00000000
  288.  
  289. X[0] := 6
  290. X[1] := %11100111
  291. X[2] := %01111110
  292. X[3] := %00011000
  293. X[4] := %01111110
  294. X[5] := %11100111
  295. X[6] := %00000000
  296.  
  297. Y[0] := 7
  298. Y[1] := %11100000
  299. Y[2] := %01111000
  300. Y[3] := %00011111
  301. Y[4] := %00011111
  302. Y[5] := %01111000
  303. Y[6] := %11100000
  304. Y[7] := %00000000
  305.  
  306. Z[0] := 6
  307. Z[1] := %11000011
  308. Z[2] := %11001111
  309. Z[3] := %11011011
  310. Z[4] := %11110011
  311. Z[5] := %11000011
  312. Z[6] := %00000000
  313.  
  314. SPACE[0] := 5
  315. SPACE[1] := %00000000
  316. SPACE[2] := %00000000
  317. SPACE[3] := %00000000
  318. SPACE[4] := %00000000
  319. SPACE[5] := %00000000
  320.  
  321. APOSTROPHE[0] := 3
  322. APOSTROPHE[1] := %11100000
  323. APOSTROPHE[2] := %11100000
  324. APOSTROPHE[3] := %00000000
  325.  
  326. SMILE[0] := 8
  327. SMILE[1] := %01111110
  328. SMILE[2] := %10000001
  329. SMILE[3] := %10110101
  330. SMILE[4] := %10000101
  331. SMILE[5] := %10110101
  332. SMILE[6] := %10000001
  333. SMILE[7] := %01111110
  334. SMILE[8] := %00000000
  335.  
  336. Period[0] := 3
  337. Period[1] := %00000111
  338. Period[2] := %00000111
  339. Period[3] := %00000000
  340.  
  341. ZIGZAG[0] := 12
  342. ZIGZAG[1] := %11000000
  343. ZIGZAG[2] := %01100000
  344. ZIGZAG[3] := %00110000
  345. ZIGZAG[4] := %00011000
  346. ZIGZAG[5] := %00001100
  347. ZIGZAG[6] := %00000110
  348. ZIGZAG[7] := %00000011
  349. ZIGZAG[8] := %00000110
  350. ZIGZAG[9] := %00001100
  351. ZIGZAG[10] := %00011000
  352. ZIGZAG[11] := %00110000
  353. ZIGZAG[12] := %01100000
  354.  
  355. SIN[0] := 8
  356. SIN[1] := %11100000
  357. SIN[2] := %11100000
  358. SIN[3] := %00111000
  359. SIN[4] := %00011100
  360. SIN[5] := %00000111
  361. SIN[6] := %00000111
  362. SIN[7] := %00011100
  363. SIN[8] := %00111000
  364.  
  365. DICK[0] := 23
  366. DICK[1] := %11100111
  367. DICK[2] := %11100111
  368. DICK[3] := %10011001
  369. DICK[4] := %10011001
  370. DICK[5] := %11100111
  371. DICK[6] := %11100111
  372. DICK[7] := %01100110
  373. DICK[8] := %01100110
  374. DICK[9] := %01100110
  375. DICK[10] := %01100110
  376. DICK[11] := %01100110
  377. DICK[12] := %01100110
  378. DICK[13] := %01100110
  379. DICK[14] := %01100110
  380. DICK[15] := %11111111
  381. DICK[16] := %11000011
  382. DICK[17] := %01100110
  383. DICK[18] := %00111100
  384. DICK[19] := %00000000
  385. DICK[20] := %00010000
  386. DICK[21] := %00001000
  387. DICK[22] := %00010000
  388. DICK[23] := %00000000
  389.  
  390. PUB DrawFUCKYOU
  391. DrawLetter(@F)
  392. DrawLetter(@U)
  393. DrawLetter(@C)
  394. DrawLetter(@K)
  395. DrawLetter(@SPACE)
  396. DrawLetter(@Y)
  397. DrawLetter(@O)
  398. DrawLetter(@U)
  399. DrawLetter(@SPACE)
  400. DrawLetter(@SPACE)
  401. Wait(40)
  402. DrawLetterBackward(@U)
  403. DrawLetterBackward(@O)
  404. DrawLetterBackward(@Y)
  405. DrawLetter(@SPACE)
  406. DrawLetterBackward(@K)
  407. DrawLetterBackward(@C)
  408. DrawLetterBackward(@U)
  409. DrawLetterBackward(@F)
  410. DrawLetter(@SPACE)
  411. DrawLetter(@SPACE)
  412. Wait(40)
  413.  
  414. PUB DrawDEFCONXX
  415. DrawLetter(@D)
  416. DrawLetter(@E)
  417. DrawLetter(@F)
  418. DrawLetter(@C)
  419. DrawLetter(@O)
  420. DrawLetter(@N)
  421. DrawLetter(@SPACE)
  422. DrawLetter(@X)
  423. DrawLetter(@X)
  424. DrawLetter(@SPACE)
  425. DrawLetter(@SPACE)
  426. Wait(40)
  427. DrawLetterBackward(@X)
  428. DrawLetterBackward(@X)
  429. DrawLetter(@SPACE)
  430. DrawLetterBackward(@N)
  431. DrawLetterBackward(@O)
  432. DrawLetterBackward(@C)
  433. DrawLetterBackward(@F)
  434. DrawLetterBackward(@E)
  435. DrawLetterBackward(@D)
  436. DrawLetter(@SPACE)
  437. DrawLetter(@SPACE)
  438. Wait(40)
  439.  
  440. PUB DrawYAKHACK
  441. DrawLetter(@Y)
  442. DrawLetter(@A)
  443. DrawLetter(@K)
  444. DrawLetter(@H)
  445. DrawLetter(@A)
  446. DrawLetter(@C)
  447. DrawLetter(@K)
  448. DrawLetter(@SPACE)
  449. DrawLetter(@SPACE)
  450. Wait(40)
  451. DrawLetter(@K)
  452. DrawLetter(@C)
  453. DrawLetter(@A)
  454. DrawLetter(@Y)
  455. DrawLetter(@K)
  456. DrawLetter(@A)
  457. DrawLetter(@Y)
  458. DrawLetter(@SPACE)
  459. DrawLetter(@SPACE)
  460. Wait(40)
  461.  
  462. PUB DrawZIGZAG
  463. repeat 10
  464. DrawLetter(@ZIGZAG)
  465.  
  466. PUB DrawSIN
  467. repeat 10
  468. DrawLetter(@SIN)
  469.  
  470. PUB DrawDONTFUCKITUP
  471. repeat 10
  472. DrawLetter(@D)
  473. DrawLetter(@O)
  474. DrawLetter(@N)
  475. DrawLetter(@APOSTROPHE)
  476. DrawLetter(@T)
  477. Wait(40)
  478. DrawLetter(@T)
  479. DrawLetter(@APOSTROPHE)
  480. DrawLetter(@N)
  481. DrawLetter(@O)
  482. DrawLetter(@D)
  483. Wait(40)
  484.  
  485. repeat 10
  486. DrawLetter(@F)
  487. DrawLetter(@U)
  488. DrawLetter(@C)
  489. DrawLetter(@K)
  490. DrawLetter(@SPACE)
  491. Wait(40)
  492. DrawLetter(@K)
  493. DrawLetter(@C)
  494. DrawLetter(@U)
  495. DrawLetter(@F)
  496. DrawLetter(@SPACE)
  497. Wait(40)
  498.  
  499. repeat 10
  500. DrawLetter(@I)
  501. DrawLetter(@T)
  502. DrawLetter(@SPACE)
  503. DrawLetter(@SPACE)
  504. DrawLetter(@SPACE)
  505. Wait(40)
  506. DrawLetter(@T)
  507. DrawLetter(@I)
  508. DrawLetter(@SPACE)
  509. DrawLetter(@SPACE)
  510. DrawLetter(@SPACE)
  511. Wait(40)
  512.  
  513. repeat 10
  514. DrawLetter(@U)
  515. DrawLetter(@P)
  516. DrawLetter(@SPACE)
  517. DrawLetter(@SPACE)
  518. DrawLetter(@SPACE)
  519. Wait(40)
  520. DrawLetter(@P)
  521. DrawLetter(@U)
  522. DrawLetter(@SPACE)
  523. DrawLetter(@SPACE)
  524. DrawLetter(@SPACE)
  525. Wait(40)
  526.  
  527. PUB DrawDICK
  528. DrawLetter(@DICK)
  529. DrawLetter(@SPACE)
  530. DrawLetter(@SPACE)
  531. Wait(40)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement