Advertisement
Guest User

Defcon 20 Badge POV

a guest
Jul 29th, 2012
700
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.90 KB | None | 0 0
  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. H[0] := 7
  140. H[1] := %11111111
  141. H[2] := %11111111
  142. H[3] := %00011000
  143. H[4] := %00011000
  144. H[5] := %11111111
  145. H[6] := %11111111
  146. H[7] := %00000000
  147.  
  148. I[0] := 7
  149. I[1] := %11000011
  150. I[2] := %11000011
  151. I[3] := %11111111
  152. I[4] := %11111111
  153. I[5] := %11000011
  154. I[6] := %11000011
  155. I[7] := %00000000
  156.  
  157. J[0] := 7
  158. J[1] := %11000000
  159. J[2] := %11000000
  160. J[3] := %11111110
  161. J[4] := %11111111
  162. J[5] := %11000011
  163. J[6] := %11000111
  164. J[7] := %00000000
  165.  
  166. K[0] := 6
  167. K[1] := %11111111
  168. K[2] := %11111111
  169. K[3] := %00111100
  170. K[4] := %01100110
  171. K[5] := %11000011
  172. K[6] := %00000000
  173.  
  174. L[0] := 6
  175. L[1] := %11111111
  176. L[2] := %11111111
  177. L[3] := %00000011
  178. L[4] := %00000011
  179. L[5] := %00000011
  180. L[6] := %00000000
  181.  
  182. M[0] := 8
  183. M[1] := %11111111
  184. M[2] := %11111111
  185. M[3] := %01100000
  186. M[4] := %00111000
  187. M[5] := %01100000
  188. M[6] := %11111111
  189. M[7] := %11111111
  190. M[8] := %00000000
  191.  
  192. N[0] := 8
  193. N[1] := %11111111
  194. N[2] := %11111111
  195. N[3] := %01110000
  196. N[4] := %00011000
  197. N[5] := %00011100
  198. N[6] := %11111111
  199. N[7] := %11111111
  200. N[8] := %00000000
  201.  
  202. O[0] := 7
  203. O[1] := %11111111
  204. O[2] := %11111111
  205. O[3] := %11000011
  206. O[4] := %11000011
  207. O[5] := %11111111
  208. O[6] := %11111111
  209. O[7] := %00000000
  210.  
  211. P[0] := 6
  212. P[1] := %11111111
  213. P[2] := %11111111
  214. P[3] := %11001100
  215. P[4] := %11001100
  216. P[5] := %01111000
  217. P[6] := %00000000
  218.  
  219. Q[0] := 8
  220. Q[1] := %00000110
  221. Q[2] := %11111111
  222. Q[3] := %11111111
  223. Q[4] := %11001011
  224. Q[5] := %11000011
  225. Q[6] := %11111111
  226. Q[7] := %11111111
  227. Q[8] := %00000000
  228.  
  229. R[0] := 6
  230. R[1] := %11111111
  231. R[2] := %11111111
  232. R[3] := %11001100
  233. R[4] := %11001111
  234. R[5] := %01111001
  235. R[6] := %00000000
  236.  
  237. S[0] := 5
  238. S[1] := %01100011
  239. S[2] := %11110011
  240. S[3] := %11010011
  241. S[4] := %11001110
  242. S[5] := %00000000
  243.  
  244. T[0] := 7
  245. T[1] := %11000000
  246. T[2] := %11000000
  247. T[3] := %11111111
  248. T[4] := %11111111
  249. T[5] := %11000000
  250. T[6] := %11000000
  251. T[7] := %00000000
  252.  
  253. U[0] := 7
  254. U[1] := %11111111
  255. U[2] := %11111111
  256. U[3] := %00000011
  257. U[4] := %00000011
  258. U[5] := %11111111
  259. U[6] := %11111111
  260. U[7] := %00000000
  261.  
  262. V[0] := 7
  263. V[1] := %11111000
  264. V[2] := %11111110
  265. V[3] := %00000011
  266. V[4] := %00000011
  267. V[5] := %11111110
  268. V[6] := %11111000
  269. V[7] := %00000000
  270.  
  271. W[0] := 8
  272. W[1] := %11111111
  273. W[2] := %11111111
  274. W[3] := %00000110
  275. W[4] := %00011100
  276. W[5] := %00000110
  277. W[6] := %11111111
  278. W[7] := %11111111
  279. W[8] := %00000000
  280.  
  281. X[0] := 6
  282. X[1] := %11100111
  283. X[2] := %01111110
  284. X[3] := %00011000
  285. X[4] := %01111110
  286. X[5] := %11100111
  287. X[6] := %00000000
  288.  
  289. Y[0] := 7
  290. Y[1] := %11100000
  291. Y[2] := %01111000
  292. Y[3] := %00011111
  293. Y[4] := %00011111
  294. Y[5] := %01111000
  295. Y[6] := %11100000
  296. Y[7] := %00000000
  297.  
  298. Z[0] := 6
  299. Z[1] := %11000011
  300. Z[2] := %11001111
  301. Z[3] := %11011011
  302. Z[4] := %11110011
  303. Z[5] := %11000011
  304. Z[6] := %00000000
  305.  
  306. SPACE[0] := 5
  307. SPACE[1] := %00000000
  308. SPACE[2] := %00000000
  309. SPACE[3] := %00000000
  310. SPACE[4] := %00000000
  311. SPACE[5] := %00000000
  312.  
  313. APOSTROPHE[0] := 3
  314. APOSTROPHE[1] := %11100000
  315. APOSTROPHE[2] := %11100000
  316. APOSTROPHE[3] := %00000000
  317.  
  318. SMILE[0] := 8
  319. SMILE[1] := %01111110
  320. SMILE[2] := %10000001
  321. SMILE[3] := %10110101
  322. SMILE[4] := %10000101
  323. SMILE[5] := %10110101
  324. SMILE[6] := %10000001
  325. SMILE[7] := %01111110
  326. SMILE[8] := %00000000
  327.  
  328. Period[0] := 3
  329. Period[1] := %00000111
  330. Period[2] := %00000111
  331. Period[3] := %00000000
  332.  
  333. ZIGZAG[0] := 12
  334. ZIGZAG[1] := %11000000
  335. ZIGZAG[2] := %01100000
  336. ZIGZAG[3] := %00110000
  337. ZIGZAG[4] := %00011000
  338. ZIGZAG[5] := %00001100
  339. ZIGZAG[6] := %00000110
  340. ZIGZAG[7] := %00000011
  341. ZIGZAG[8] := %00000110
  342. ZIGZAG[9] := %00001100
  343. ZIGZAG[10] := %00011000
  344. ZIGZAG[11] := %00110000
  345. ZIGZAG[12] := %01100000
  346.  
  347. SIN[0] := 8
  348. SIN[1] := %11100000
  349. SIN[2] := %11100000
  350. SIN[3] := %00111000
  351. SIN[4] := %00011100
  352. SIN[5] := %00000111
  353. SIN[6] := %00000111
  354. SIN[7] := %00011100
  355. SIN[8] := %00111000
  356.  
  357. DICK[0] := 23
  358. DICK[1] := %11100111
  359. DICK[2] := %11100111
  360. DICK[3] := %10011001
  361. DICK[4] := %10011001
  362. DICK[5] := %11100111
  363. DICK[6] := %11100111
  364. DICK[7] := %01100110
  365. DICK[8] := %01100110
  366. DICK[9] := %01100110
  367. DICK[10] := %01100110
  368. DICK[11] := %01100110
  369. DICK[12] := %01100110
  370. DICK[13] := %01100110
  371. DICK[14] := %01100110
  372. DICK[15] := %11111111
  373. DICK[16] := %11000011
  374. DICK[17] := %01100110
  375. DICK[18] := %00111100
  376. DICK[19] := %00000000
  377. DICK[20] := %00010000
  378. DICK[21] := %00001000
  379. DICK[22] := %00010000
  380. DICK[23] := %00000000
  381.  
  382. PUB DrawFUCKYOU
  383. DrawLetter(@F)
  384. DrawLetter(@U)
  385. DrawLetter(@C)
  386. DrawLetter(@K)
  387. DrawLetter(@SPACE)
  388. DrawLetter(@Y)
  389. DrawLetter(@O)
  390. DrawLetter(@U)
  391. DrawLetter(@SPACE)
  392. DrawLetter(@SPACE)
  393. Wait(40)
  394. DrawLetterBackward(@U)
  395. DrawLetterBackward(@O)
  396. DrawLetterBackward(@Y)
  397. DrawLetter(@SPACE)
  398. DrawLetterBackward(@K)
  399. DrawLetterBackward(@C)
  400. DrawLetterBackward(@U)
  401. DrawLetterBackward(@F)
  402. DrawLetter(@SPACE)
  403. DrawLetter(@SPACE)
  404. Wait(40)
  405.  
  406. PUB DrawDEFCONXX
  407. DrawLetter(@D)
  408. DrawLetter(@E)
  409. DrawLetter(@F)
  410. DrawLetter(@C)
  411. DrawLetter(@O)
  412. DrawLetter(@N)
  413. DrawLetter(@SPACE)
  414. DrawLetter(@X)
  415. DrawLetter(@X)
  416. DrawLetter(@SPACE)
  417. DrawLetter(@SPACE)
  418. Wait(40)
  419. DrawLetterBackward(@X)
  420. DrawLetterBackward(@X)
  421. DrawLetter(@SPACE)
  422. DrawLetterBackward(@N)
  423. DrawLetterBackward(@O)
  424. DrawLetterBackward(@C)
  425. DrawLetterBackward(@F)
  426. DrawLetterBackward(@E)
  427. DrawLetterBackward(@D)
  428. DrawLetter(@SPACE)
  429. DrawLetter(@SPACE)
  430. Wait(40)
  431.  
  432. PUB DrawYAKHACK
  433. DrawLetter(@Y)
  434. DrawLetter(@A)
  435. DrawLetter(@K)
  436. DrawLetter(@H)
  437. DrawLetter(@A)
  438. DrawLetter(@C)
  439. DrawLetter(@K)
  440. DrawLetter(@SPACE)
  441. DrawLetter(@SPACE)
  442. Wait(40)
  443. DrawLetter(@K)
  444. DrawLetter(@C)
  445. DrawLetter(@A)
  446. DrawLetter(@Y)
  447. DrawLetter(@K)
  448. DrawLetter(@A)
  449. DrawLetter(@Y)
  450. DrawLetter(@SPACE)
  451. DrawLetter(@SPACE)
  452. Wait(40)
  453.  
  454. PUB DrawZIGZAG
  455. repeat 10
  456. DrawLetter(@ZIGZAG)
  457.  
  458. PUB DrawSIN
  459. repeat 10
  460. DrawLetter(@SIN)
  461.  
  462. PUB DrawDONTFUCKITUP
  463. repeat 10
  464. DrawLetter(@D)
  465. DrawLetter(@O)
  466. DrawLetter(@N)
  467. DrawLetter(@APOSTROPHE)
  468. DrawLetter(@T)
  469. Wait(40)
  470. DrawLetter(@T)
  471. DrawLetter(@APOSTROPHE)
  472. DrawLetter(@N)
  473. DrawLetter(@O)
  474. DrawLetter(@D)
  475. Wait(40)
  476.  
  477. repeat 10
  478. DrawLetter(@F)
  479. DrawLetter(@U)
  480. DrawLetter(@C)
  481. DrawLetter(@K)
  482. DrawLetter(@SPACE)
  483. Wait(40)
  484. DrawLetter(@K)
  485. DrawLetter(@C)
  486. DrawLetter(@U)
  487. DrawLetter(@F)
  488. DrawLetter(@SPACE)
  489. Wait(40)
  490.  
  491. repeat 10
  492. DrawLetter(@I)
  493. DrawLetter(@T)
  494. DrawLetter(@SPACE)
  495. DrawLetter(@SPACE)
  496. DrawLetter(@SPACE)
  497. Wait(40)
  498. DrawLetter(@T)
  499. DrawLetter(@I)
  500. DrawLetter(@SPACE)
  501. DrawLetter(@SPACE)
  502. DrawLetter(@SPACE)
  503. Wait(40)
  504.  
  505. repeat 10
  506. DrawLetter(@U)
  507. DrawLetter(@P)
  508. DrawLetter(@SPACE)
  509. DrawLetter(@SPACE)
  510. DrawLetter(@SPACE)
  511. Wait(40)
  512. DrawLetter(@P)
  513. DrawLetter(@U)
  514. DrawLetter(@SPACE)
  515. DrawLetter(@SPACE)
  516. DrawLetter(@SPACE)
  517. Wait(40)
  518.  
  519. PUB DrawDICK
  520. DrawLetter(@DICK)
  521. DrawLetter(@SPACE)
  522. DrawLetter(@SPACE)
  523. Wait(40)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement