Advertisement
Guest User

password08_mod.bas

a guest
Feb 1st, 2014
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.19 KB | None | 0 0
  1.  
  2. set smartbranching off
  3. set kernel_options no_blank_lines
  4. set romsize 4k
  5.  
  6. dim vidmem=$a4
  7.  
  8. dim cooldown = a
  9. dim curchar = b
  10. dim curfield = c
  11. dim mytemp = d
  12. dim result = e
  13. dim counter = f
  14. dim flash = g
  15.  
  16. const hot = 10
  17. const hotp = hot + 1
  18.  
  19. cooldown = hotp
  20. curfield = 0
  21. curchar = 0
  22.  
  23. COLUBK = $80
  24. COLUPF = $0E
  25.  
  26. main
  27. counter = counter + 1
  28. if cooldown then cooldown = cooldown - 1 : goto do_cursor
  29. if joy0fire then curchar = (curchar ^ 32) & 63 : cooldown = hot
  30. if joy0down then curchar = (curchar - 1) & 63 : cooldown = hot
  31. if joy0up then curchar = (curchar + 1) & 63 : cooldown = hot
  32. if joy0right then temp1 = 1 : gosub chng_field : cooldown = hot
  33. if joy0left then temp1 = -1 : gosub chng_field : cooldown = hot
  34.  
  35. rem d get's set by the printchar routine and is used
  36. rem to restore the screen under the cursor
  37.  
  38. do_cursor
  39. if cooldown = hot then gosub printchar
  40. temp3 = scr_add[curfield] + 16
  41. if counter{0} then vidmem[temp3] = d else vidmem[temp3] = 255
  42. drawscreen
  43. goto main
  44.  
  45. printchar
  46. temp4 = scr_add[curfield]
  47. temp5 = curchar & 31
  48. temp5 = temp5 * 5
  49. temp6 = temp5 + 4
  50. for temp5 = temp5 to temp6
  51. if curchar{5} then d = PassFonthi[temp5] else d = PassFontlo[temp5]
  52. if curfield{0} then d = rev(d)
  53. vidmem[temp4] = d
  54. temp4 = temp4 + 4
  55. next
  56. return
  57.  
  58. data scr_add
  59. 0, 1, 2, 3, 24, 25, 26, 27
  60. end
  61.  
  62.  
  63. rem restores the screen under the cursor then
  64. rem increments or decrements the field
  65.  
  66. chng_field
  67. temp2 = scr_add[curfield] + 16
  68. vidmem[temp2] = d
  69. curfield = (curfield + temp1) & 7
  70. return
  71.  
  72. function rev()
  73. asm
  74. tax
  75. and #$0F
  76. tay
  77. txa
  78. lsr
  79. lsr
  80. lsr
  81. lsr
  82. tax
  83. lda revhi,y
  84. ora revlo,x
  85. rts
  86. end
  87. return
  88.  
  89. data revhi
  90. $00, $80, $40, $C0, $20, $A0, $60, $E0
  91. $10, $90, $50, $D0, $30, $B0, $70, $F0
  92. end
  93.  
  94. data revlo
  95. $00, $08, $04, $0C, $02, $0A, $06, $0E
  96. $01, $09, $05, $0D, $03, $0B, $07, $0F
  97. end
  98.  
  99.  
  100. data PassFonthi
  101. %00011100,
  102. %00100010,
  103. %00111110,
  104. %01000001,
  105. %01000001,
  106.  
  107. %01111110,
  108. %01000001,
  109. %01111110,
  110. %01000001,
  111. %01111111,
  112.  
  113. %00111111,
  114. %01000000,
  115. %01000000,
  116. %01000000,
  117. %00111111,
  118.  
  119. %01111100,
  120. %01000010,
  121. %01000001,
  122. %01000001,
  123. %01111111,
  124.  
  125. %01111111,
  126. %01000000,
  127. %01110000,
  128. %01000000,
  129. %01111111,
  130.  
  131. %01111111,
  132. %01000000,
  133. %01110000,
  134. %01000000,
  135. %01000000,
  136.  
  137. %00111111,
  138. %01000000,
  139. %01000111,
  140. %01000001,
  141. %00111111,
  142.  
  143. %01000001,
  144. %01000001,
  145. %01111111,
  146. %01000001,
  147. %01000001,
  148.  
  149. %00011100,
  150. %00001000,
  151. %00001000,
  152. %00001000,
  153. %00011100,
  154.  
  155. %00000001,
  156. %00000001,
  157. %00000001,
  158. %01000001,
  159. %00111110,
  160.  
  161. %01000011,
  162. %01000100,
  163. %01111000,
  164. %01000100,
  165. %01000011,
  166.  
  167. %01000000,
  168. %01000000,
  169. %01000000,
  170. %01000000,
  171. %01111111,
  172.  
  173. %01000001,
  174. %01100011,
  175. %01010101,
  176. %01001001,
  177. %01000001,
  178.  
  179. %01000001,
  180. %01100001,
  181. %01011101,
  182. %01000011,
  183. %01000001,
  184.  
  185. %00111110,
  186. %01000001,
  187. %01000001,
  188. %01000001,
  189. %00111110,
  190.  
  191. %01111110,
  192. %01000001,
  193. %01111110,
  194. %01000000,
  195. %01000000,
  196.  
  197. %00111110,
  198. %01000001,
  199. %01000101,
  200. %01000010,
  201. %00111101,
  202.  
  203. %01111110,
  204. %01000001,
  205. %01111110,
  206. %01000001,
  207. %01000001,
  208.  
  209. %00111111,
  210. %01000000,
  211. %00111110,
  212. %00000001,
  213. %01111110,
  214.  
  215. %01111111,
  216. %00001000,
  217. %00001000,
  218. %00001000,
  219. %00001000,
  220.  
  221. %01000001,
  222. %01000001,
  223. %01000001,
  224. %01000001,
  225. %00111110,
  226.  
  227. %01000001,
  228. %01000001,
  229. %00100010,
  230. %00010100,
  231. %00001000,
  232.  
  233. %01000001,
  234. %01001001,
  235. %01010101,
  236. %01100011,
  237. %01000001,
  238.  
  239. %01000001,
  240. %00100010,
  241. %00011100,
  242. %00100010,
  243. %01000001,
  244.  
  245. %01000001,
  246. %00100010,
  247. %00011100,
  248. %00001000,
  249. %00001000,
  250.  
  251. %01111111,
  252. %00000010,
  253. %00011100,
  254. %00100000,
  255. %01111111,
  256.  
  257. %00111110,
  258. %01000101,
  259. %01001001,
  260. %01010001,
  261. %00111110,
  262.  
  263. %00001000,
  264. %00011000,
  265. %00001000,
  266. %00001000,
  267. %00111110,
  268.  
  269. %00111110,
  270. %01000001,
  271. %00011110,
  272. %00100000,
  273. %01111111,
  274.  
  275. %01111111,
  276. %00000001,
  277. %00001110,
  278. %00000001,
  279. %01111110,
  280.  
  281. %00100001,
  282. %01000001,
  283. %01111111,
  284. %00000001,
  285. %00000001,
  286.  
  287. %01111111,
  288. %01000000,
  289. %01111110,
  290. %00000001,
  291. %01111110
  292. end
  293.  
  294. data PassFontlo
  295.  
  296. %00000000,
  297. %00011111,
  298. %00100001,
  299. %00100011,
  300. %00011101,
  301.  
  302. %00100000,
  303. %00100000,
  304. %00111110,
  305. %00100001,
  306. %00111110,
  307.  
  308. %00000000,
  309. %00011111,
  310. %00100000,
  311. %00100000,
  312. %00011111,
  313.  
  314. %00000001,
  315. %00000001,
  316. %00011111,
  317. %00100001,
  318. %00011111,
  319.  
  320. %00011110,
  321. %00100001,
  322. %00111111,
  323. %00100000,
  324. %00011110,
  325.  
  326. %00000110,
  327. %00001000,
  328. %00011100,
  329. %00001000,
  330. %00001000,
  331.  
  332. %00011110,
  333. %00100010,
  334. %00011110,
  335. %00000010,
  336. %00011100,
  337.  
  338. %00100000,
  339. %00100000,
  340. %00111100,
  341. %00100010,
  342. %00100010,
  343.  
  344. %00001000,
  345. %00000000,
  346. %00011000,
  347. %00001000,
  348. %00011100,
  349.  
  350. %00000110,
  351. %00000010,
  352. %00000010,
  353. %00010010,
  354. %00001100,
  355.  
  356. %00100000,
  357. %00100110,
  358. %00111000,
  359. %00100100,
  360. %00100010,
  361.  
  362. %00011000,
  363. %00001000,
  364. %00001000,
  365. %00001000,
  366. %00011100,
  367.  
  368. %00000000,
  369. %00110100,
  370. %00101010,
  371. %00101010,
  372. %00100010,
  373.  
  374. %00000000,
  375. %00111100,
  376. %00100010,
  377. %00100010,
  378. %00100010,
  379.  
  380. %00000000,
  381. %00011100,
  382. %00100010,
  383. %00100010,
  384. %00011100,
  385.  
  386. %00111100,
  387. %00100010,
  388. %00111100,
  389. %00100000,
  390. %00100000,
  391.  
  392. %00011110,
  393. %00100010,
  394. %00011110,
  395. %00000010,
  396. %00000010,
  397.  
  398. %00000000,
  399. %00111100,
  400. %00100010,
  401. %00100000,
  402. %00100000,
  403.  
  404. %00000000,
  405. %00011110,
  406. %00110000,
  407. %00001110,
  408. %00111100,
  409.  
  410. %00000100,
  411. %00000100,
  412. %00001110,
  413. %00000100,
  414. %00000110,
  415.  
  416. %00000000,
  417. %00100010,
  418. %00100010,
  419. %00100010,
  420. %00011100,
  421.  
  422. %00000000,
  423. %00100010,
  424. %00100010,
  425. %00010100,
  426. %00001000,
  427.  
  428. %00000000,
  429. %00100010,
  430. %00100010,
  431. %00101010,
  432. %00010110,
  433.  
  434. %00000000,
  435. %00110011,
  436. %00001100,
  437. %00010010,
  438. %00100001,
  439.  
  440. %00000000,
  441. %00010010,
  442. %00011110,
  443. %00000010,
  444. %00001100,
  445.  
  446. %00000000,
  447. %00111110,
  448. %00001100,
  449. %00010000,
  450. %00111110,
  451.  
  452. %00111111,
  453. %01000000,
  454. %01111110,
  455. %01000001,
  456. %00111110,
  457.  
  458. %01111111,
  459. %00000001,
  460. %00000110,
  461. %00001000,
  462. %00001000,
  463.  
  464. %00111110,
  465. %01000001,
  466. %00111110,
  467. %01000001,
  468. %00111110,
  469.  
  470. %00111110,
  471. %01000001,
  472. %00111111,
  473. %00000001,
  474. %01111110,
  475.  
  476. %00111100,
  477. %01100110,
  478. %00001100,
  479. %00000000,
  480. %00011000,
  481.  
  482. %00001100,
  483. %00001100,
  484. %00001100,
  485. %00000000,
  486. %00001100
  487. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement