Milton Bradley MBX ROM (mbx_MM52664MBX-N_ROM.bin) disassembly with some more initial definitions. Uses the 6809dasm.pl perl script, which has issues with negative index offsets in the byte range. 4 offsets need to be changed if your assembler does not automatically wrap forced-byte offsets to negative: <$e9 to <-$17, and <$ee to <-$12 . (Work in progress, assume some errors.)

格式
Asm
Post date
2022-04-03 21:49
Publication Period
Unlimited
  1. After a bit more work, the definitions file for mbx_MM52664MBX-N_ROM.bin is improving somewhat:
  2. ----------------------------------------------
  3. mbx_MM52664MBX-N_ROM.defs
  4. ---------------------------------------------
  5. org=0xe000
  6. fcb=0xf961,0xfa61
  7. fcb=0xfed9,0xffef
  8. fdb=0xfff0,0xffff
  9. label=0xe000,l_reset
  10. label=0xe0e7,l_firq
  11. label=0xe0ec,l_irq
  12. # label=0x38,dp_high
  13. comment=0xe008,"Probably unrelated to DP."
  14. label=0x3800,V_FIRQ
  15. label=0x3800,dp_base
  16. label=0x3802,V_IRQ
  17. label=0x3804,V_UNK
  18. label=0x3834,BU_001
  19. # label=0x79,flag_dp79
  20. label=0x3879,flag_3879
  21. label=0x4800,stkbase
  22. label=0xa600,dev01_0
  23. label=0xa601,dev01_1
  24. label=0xa602,dev01_2
  25. label=0xa603,dev01_3
  26. label=0xc000,dev_02_0
  27. label=0xc001,dev_02_1
  28. label=0xc002,dev_02_2
  29. label=0xc003,dev_02_3
  30. comment=0xe013,"Init RAM to descending sequence."
  31. comment=0xe014,"4K RAM from 3800 to 4800?"
  32. label=0xe014,il_001
  33. comment=0xe020,"Flag79 zeroed after reset."
  34. comment=0xe024,"Force non-zero flags to $02."
  35. label=0xe028,do_cksm
  36. label=0xe02c,ck_lup
  37. comment=0xe02c,"Simple ROM space checksum?"
  38. comment=0xe02e,"End of ROM, address space"
  39. comment=0xe035,"initialize device 01"
  40. comment=0xe037,"Flag something changed."
  41. label=0xe03d,ini_dev01
  42. comment=0xe03d,"dev01 at $a600~a603"
  43. comment=0xe06f,"Enable FIRQ interrupt only."
  44. comment=0xe074,"Enable both FIRQ and IRQ interrupts."
  45. label=0xe079,lu_e079
  46. comment=0xe079,"Mask out both FIRQ and IRQ interrupts."
  47. label=0xe087,s_0003
  48. comment=0xe087,"-- Probably -- Initialize dev01."
  49. comment=0xe0a9,"Initialize V_FIRQ"
  50. comment=0xe0b3,"Initialize V_UNK"
  51. comment=0xe0be,"Clear 8 byte buffer? or 24 byte waveform?"
  52. label=0xe0e1,ini_IRQV
  53. comment=0xe0e4,"Initialize V_IRQ"
  54. label=0xe121,lu_e121
  55. label=0xe669,lu_e669
  56. label=0xe6ea,s_0001
  57. label=0xe6c5,s_0002
  58. label=0xe998,su_e998
  59. label=0xf412,su_f412
  60. label=0xf423,su_f423
  61. label=0xf430,su_f430
  62. label=0xf436,su_f436
  63. label=0xf43b,su_f43b
  64. label=0xf961,zb_001
  65. label=0xfb19,su_fb19
  66. label=0xfb1b,su_fb1b
  67. label=0xfee2,zb_002
  68. label=0xfee0,zzzz
  69. label=0xfff0,int_vect
  70. ==========================
  71. Again, invoke the definitions with something like this:
  72. ----------------------------
  73. perl '~/xroar/tools/6809dasm.pl' org=0xe000 include=mbx_MM52664MBX-N_ROM.defs mbx_MM52664MBX-N_ROM.bin >mbx_MM52664MBX-N_ROM.asm
  74. ================
  75. The output is this:
  76. ---------------------------------------------
  77. mbx_MM52664MBX-N_ROM.asm
  78. ---------------------------------------------
  79. org $e000
  80. L_02D5 equ $02d5
  81. L_03DE equ $03de
  82. L_0405 equ $0405
  83. L_0AA4 equ $0aa4
  84. dp_base equ $3800
  85. V_IRQ equ $3802
  86. V_UNK equ $3804
  87. BU_001 equ $3834
  88. flag_3879 equ $3879
  89. L_3E40 equ $3e40
  90. stkbase equ $4800
  91. dev01_0 equ $a600
  92. dev01_1 equ $a601
  93. dev01_2 equ $a602
  94. dev01_3 equ $a603
  95. dev_02_0 equ $c000
  96. dev_02_1 equ $c001
  97. dev_02_2 equ $c002
  98. dev_02_3 equ $c003
  99. l_reset lda #$38
  100. tfr a,dp
  101. lds #stkbase
  102. lda #$38 ; Probably unrelated to DP.
  103. sta >dev01_1
  104. ldx #dp_base
  105. clra
  106. sta ,x+
  107. deca ; Init RAM to descending sequence.
  108. il_001 sta ,x+ ; 4K RAM from 3800 to 4800?
  109. cmpx #stkbase
  110. bne il_001
  111. ldx #dp_base
  112. lda ,x
  113. sta <$79 ; Flag79 zeroed after reset.
  114. beq do_cksm
  115. lda #$02 ; Force non-zero flags to $02.
  116. sta <$79
  117. do_cksm clra
  118. ldx #l_reset
  119. ck_lup adda ,x+ ; Simple ROM space checksum?
  120. cmpx #$0000 ; End of ROM, address space
  121. bne ck_lup
  122. cmpa #$00
  123. beq ini_dev01 ; initialize device 01
  124. lda #$01 ; Flag something changed.
  125. ora <$79
  126. sta <$79
  127. ini_dev01 lda #$3e ; dev01 at $a600~a603
  128. sta >dev01_1
  129. ldb >dev01_1
  130. andb #$7f
  131. cmpb #$3e
  132. bne L_E059
  133. sta >dev01_3
  134. ldb >dev01_3
  135. andb #$7f
  136. cmpb #$3e
  137. bne L_E059
  138. beq L_E05F
  139. L_E059 lda #$10
  140. ora <$79
  141. sta <$79
  142. L_E05F jsr >s_0001
  143. jsr >s_0002
  144. jsr >su_f436
  145. jsr >s_0003
  146. tst <$79
  147. bne L_E074
  148. andcc #$bf ; Enable FIRQ interrupt only.
  149. jsr >su_fb1b
  150. L_E074 andcc #$af ; Enable both FIRQ and IRQ interrupts.
  151. jmp >lu_e669
  152. lu_e079 orcc #$50 ; Mask out both FIRQ and IRQ interrupts.
  153. lds #stkbase
  154. jsr >s_0003
  155. andcc #$af
  156. jmp >lu_e669
  157. s_0003 clra ; -- Probably -- Initialize dev01.
  158. sta >dev01_1
  159. sta >dev01_3
  160. sta >dev01_0
  161. coma
  162. sta >dev01_2
  163. lda #$34
  164. sta >dev01_3
  165. lda #$3e
  166. sta >dev01_1
  167. lda #$ff
  168. sta >dev01_2
  169. clr <$06
  170. ldx #su_f430
  171. stx <$00 ; Initialize V_FIRQ
  172. ldx #$380b
  173. stx <$09
  174. ldx #lu_e079
  175. stx <$04 ; Initialize V_UNK
  176. jsr >ini_IRQV
  177. jsr >su_e998
  178. jsr >su_f43b
  179. ldx #BU_001 ; Clear 8 byte buffer? or 24 byte waveform?
  180. ldb #$08
  181. clra
  182. L_E0C4 sta ,x+
  183. decb
  184. bne L_E0C4
  185. ldb #$10
  186. coma
  187. L_E0CC sta ,x+
  188. decb
  189. bne L_E0CC
  190. clra
  191. sta <$33
  192. sta <$4d
  193. sta <$4e
  194. sta <$51
  195. sta <$73
  196. lda #$04
  197. sta <$74
  198. rts
  199. ini_IRQV ldx #lu_e121
  200. stx <$02 ; Initialize V_IRQ
  201. rts
  202. l_firq jmp [$3800]
  203. rti
  204. l_irq jmp [$3802]
  205. jmp [$3804]
  206. lda #$36
  207. sta >dev01_1
  208. L_E0F9 lda >dev01_0
  209. anda #$c0
  210. bne L_E105
  211. jsr >$e32b
  212. bra L_E0F9
  213. L_E105 cmpa #$80
  214. bne L_E14E
  215. jsr >$e374
  216. ldx #$e15e
  217. ldy #$e16f
  218. jsr >$fbcf
  219. cmpy #$e1ff
  220. bne L_E14E
  221. jsr >$e1ff
  222. bra L_E139
  223. lu_e121 lda #$36
  224. sta >dev01_1
  225. L_E126 lda >dev01_0
  226. anda #$c0
  227. bne L_E132
  228. jsr >$e32b
  229. bra L_E126
  230. L_E132 cmpa #$80
  231. bne L_E14E
  232. jsr >$e374
  233. L_E139 jsr >$e15e
  234. jsr >$fd3e
  235. jsr >$e1c8
  236. tst <$06
  237. lbne lu_e079
  238. jsr >$e394
  239. jsr >$e4ba
  240. L_E14E ldb #$ff
  241. stb >dev01_2
  242. lda #$3e
  243. sta >dev01_1
  244. jsr >$f065
  245. rti
  246. sbcb 12,s
  247. L_E15E ldx #$e15e
  248. ldy #$e16f
  249. jsr >$fbcf
  250. jsr ,y
  251. bra L_E15E
  252. leas 2,s
  253. rts
  254. com <$e1
  255. inc 3,x
  256. ldb >$148f
  257. lda #$00
  258. eorb -15,y
  259. ldb >$6f03
  260. ldb >$5900
  261. ldb >$7de7
  262. ldd <$03
  263. fcb $e8,$00 ; eorb 0,x
  264. lda #$00
  265. fcb $e7,$a7 ; stb
  266. eorb 12,y
  267. com <$e8
  268. fcb $15 ; hcf
  269. lda #$00
  270. stb -1,u
  271. bitb >$faa4
  272. eora <$8c
  273. lda #$00
  274. stb -8,y
  275. stb >L_E288,pcr
  276. andcc #$e7
  277. adca #$86
  278. neg <$e7
  279. cmpa <$e7
  280. fcb $a1,$00 ; cmpa 0,x
  281. stb ,u++
  282. fcb $e7,$9a ; stb []
  283. lda #$00
  284. fcb $e1,$ec,$e2 ; cmpb <$e196,pcr
  285. lsrb
  286. neg <$e9
  287. eora <$e1
  288. stu >$8600
  289. sbcb -8,x
  290. sbcb -7,y
  291. com <$e2
  292. dec <$00
  293. fcb $e6,$cc,$e0 ; ldb <$e1a7,pcr
  294. subb >$8600
  295. jsr >$e1df
  296. ldy #$380b
  297. L_E1D1 jsr >$e299
  298. cmpy <$09
  299. blt L_E1D1
  300. ldx #$380b
  301. stx <$09
  302. rts
  303. ldx <$09
  304. pshs cc
  305. orcc #$10
  306. sta ,x+
  307. stx <$09
  308. puls cc
  309. rts
  310. jsr >$e28b
  311. tsta
  312. bpl L_E1F8
  313. ldb #$01
  314. stb <$33
  315. anda #$7f
  316. L_E1F8 sta <$4d
  317. sta <$4e
  318. clr <$51
  319. rts
  320. lda #$1e
  321. sta <$06
  322. jsr >$e1df
  323. jsr >ini_IRQV
  324. rts
  325. jsr >$e28b
  326. sta <$76
  327. jsr >$e28b
  328. sta <$77
  329. jmp [$3876]
  330. jsr >$e28b
  331. sta <$76
  332. jsr >$e28b
  333. sta <$77
  334. jsr >$e27f
  335. sta <$78
  336. ldy <$76
  337. lda #$0d
  338. jsr >$e1df
  339. L_E22F lda ,y+
  340. jsr >$e1df
  341. dec <$78
  342. bne L_E22F
  343. rts
  344. jsr >$e28b
  345. sta <$76
  346. jsr >$e28b
  347. sta <$77
  348. ldx <$76
  349. jsr >$e27f
  350. sta <$78
  351. L_E24A jsr >$e28b
  352. sta ,x+
  353. dec <$78
  354. bne L_E24A
  355. rts
  356. jsr >$e28b
  357. sta <$72
  358. jsr >$e28b
  359. tfr a,b
  360. andb #$f0
  361. stb <$75
  362. anda #$0f
  363. sta <$73
  364. lda #$04
  365. sta <$74
  366. rts
  367. rts
  368. clr <$08
  369. jsr >$e33e
  370. rora
  371. rts
  372. ldb #$02
  373. bra L_E28D
  374. ldb #$03
  375. bra L_E28D
  376. ldb #$04
  377. bra L_E28D
  378. ldb #$05
  379. bra L_E28D
  380. ldb #$06
  381. bra L_E28D
  382. L_E287 ldb #$07
  383. L_E288 equ L_E287+1
  384. bra L_E28D
  385. ldb #$08
  386. L_E28D clr <$08
  387. stb <$07
  388. L_E291 jsr >$e33e
  389. dec <$07
  390. bne L_E291
  391. rts
  392. leax >L_E327,pcr
  393. clra
  394. lsr ,y
  395. rola
  396. lsr ,y
  397. rola
  398. lda a,x
  399. L_E2A6 ldb >dev01_0
  400. andb #$c0
  401. bne L_E2B1
  402. bsr L_E32B
  403. bra L_E2A6
  404. L_E2B1 cmpb #$40
  405. bne L_E2A6
  406. sta >dev01_2
  407. clra
  408. lsr ,y
  409. rola
  410. lsr ,y
  411. rola
  412. lda a,x
  413. coma
  414. L_E2C2 ldb >dev01_0
  415. andb #$c0
  416. bne L_E2CD
  417. bsr L_E32B
  418. bra L_E2C2
  419. L_E2CD cmpb #$80
  420. bne L_E2C2
  421. sta >dev01_2
  422. clra
  423. lsr ,y
  424. rola
  425. lsr ,y
  426. rola
  427. lda a,x
  428. L_E2DD ldb >dev01_0
  429. andb #$c0
  430. bne L_E2E8
  431. bsr L_E32B
  432. bra L_E2DD
  433. L_E2E8 cmpb #$40
  434. bne L_E2DD
  435. sta >dev01_2
  436. clra
  437. lsr ,y
  438. rola
  439. lsr ,y
  440. rola
  441. lda a,x
  442. coma
  443. L_E2F9 ldb >dev01_0
  444. andb #$c0
  445. bne L_E304
  446. bsr L_E32B
  447. bra L_E2F9
  448. L_E304 cmpb #$80
  449. bne L_E2F9
  450. sta >dev01_2
  451. L_E30B ldb >dev01_0
  452. andb #$c0
  453. bne L_E316
  454. bsr L_E32B
  455. bra L_E30B
  456. L_E316 cmpb #$40
  457. bne L_E30B
  458. ldb #$ff
  459. stb >dev01_2
  460. lda #$11
  461. L_E321 deca
  462. bpl L_E321
  463. leay 1,y
  464. rts
  465. L_E327 ldu >$fbfd
  466. L_E32A stb >$3402
  467. L_E32B equ L_E32A+1
  468. lda #$0f
  469. L_E32F deca
  470. bgt L_E32F
  471. lda >dev01_0
  472. anda #$c0
  473. bne L_E33C
  474. jmp >lu_e079
  475. L_E33C puls a,pc
  476. L_E33E lda >dev01_0
  477. anda #$c0
  478. bne L_E349
  479. bsr L_E32B
  480. bra L_E33E
  481. L_E349 cmpa #$c0
  482. beq L_E33E
  483. clr >dev01_2
  484. lsl <$08
  485. L_E352 lda >dev01_0
  486. anda #$c0
  487. bne L_E35D
  488. bsr L_E32B
  489. bra L_E352
  490. L_E35D cmpa #$40
  491. beq L_E367
  492. lda #$01
  493. ora <$08
  494. sta <$08
  495. L_E367 lda <$08
  496. ldb #$ff
  497. stb >dev01_2
  498. ldb #$0b
  499. L_E370 decb
  500. bpl L_E370
  501. rts
  502. clr >dev01_2
  503. ldb #$04
  504. L_E379 lda >dev01_0
  505. anda #$c0
  506. cmpa #$40
  507. beq L_E389
  508. nop
  509. decb
  510. bpl L_E379
  511. jmp >lu_e079
  512. L_E389 ldb #$ff
  513. stb >dev01_2
  514. ldb #$0d
  515. L_E390 decb
  516. bpl L_E390
  517. rts
  518. lda #$3e
  519. sta >dev01_1
  520. lda <$4e
  521. bne L_E39E
  522. rts
  523. L_E39E dec <$4e
  524. bne L_E3CC
  525. lda <$4d
  526. sta <$4e
  527. lda <$51
  528. beq L_E3B9
  529. clr <$51
  530. ldb #$3c
  531. stb >dev01_3
  532. L_E3B1 decb
  533. bne L_E3B1
  534. ldb #$34
  535. stb >dev01_3
  536. L_E3B9 lda #$01
  537. jsr >$e1df
  538. lda <$4f
  539. jsr >$e1df
  540. tst <$33
  541. beq L_E3CC
  542. lda <$50
  543. jsr >$e1df
  544. L_E3CC ldx #BU_001
  545. lda #$fe
  546. L_E3D1 ldb $10,x
  547. eorb 8,x
  548. andb 8,x
  549. stb <$4c
  550. ldb 8,x
  551. stb $10,x
  552. sta >dev01_2
  553. ldb >dev01_0
  554. stb 8,x
  555. ldb <$4c
  556. andb 8,x
  557. orb ,x
  558. stb ,x
  559. leax 1,x
  560. orcc #$01
  561. rola
  562. bcs L_E3D1
  563. lda #$40
  564. sta <$4c
  565. tst <$33
  566. bne L_E40A
  567. bsr L_E42C
  568. cmpa <$4f
  569. beq L_E44F
  570. sta <$4f
  571. sta <$51
  572. bra L_E44F
  573. L_E40A lda #$20
  574. sta <$4c
  575. bsr L_E42C
  576. cmpa <$4f
  577. beq L_E41A
  578. sta <$4f
  579. ora <$51
  580. sta <$51
  581. L_E41A clrb
  582. ldx #$3838
  583. bsr L_E430
  584. cmpa <$50
  585. beq L_E44F
  586. sta <$50
  587. ora <$51
  588. sta <$51
  589. bra L_E44F
  590. L_E42C clrb
  591. ldx #BU_001
  592. L_E430 lda $10,x
  593. cmpa #$ff
  594. bne L_E441
  595. leax 1,x
  596. addb #$08
  597. cmpb <$4c
  598. bne L_E430
  599. clra
  600. rts
  601. L_E441 rora
  602. bcc L_E447
  603. incb
  604. bra L_E441
  605. L_E447 ldx #$e47a
  606. lda b,x
  607. ora #$80
  608. rts
  609. L_E44F lda <$34
  610. rora
  611. bcc L_E45D
  612. lda <$34
  613. anda #$fe
  614. sta <$34
  615. jsr >$e6cc
  616. L_E45D lda <$35
  617. rora
  618. bcc L_E46B
  619. lda <$35
  620. anda #$fe
  621. sta <$35
  622. jsr >$fda2
  623. L_E46B lda <$36
  624. rora
  625. bcc L_E479
  626. lda <$36
  627. anda #$fe
  628. sta <$36
  629. jsr >$fd93
  630. L_E479 rts
  631. com <$0b
  632. sync
  633. fcb $1b ; nop
  634. bls L_E4AB
  635. leau -5,y
  636. fcb $02,$0a ; negcom <$0a
  637. nop
  638. orcc #$22
  639. bpl L_E4BB
  640. abx
  641. fcb $01,$09 ; neg <$09
  642. fcb $11,$19
  643. brn L_E4B9
  644. leay -7,y
  645. neg <$08
  646. fcb $10,$18
  647. bra L_E4C0
  648. leax -8,y
  649. lsr <$0c
  650. fcb $14 ; hcf
  651. andcc #$24
  652. bge L_E4D5
  653. cwai #$05
  654. tst <$15
  655. sex
  656. bcs L_E4D5
  657. puls cc,b,dp,x,y
  658. L_E4AA ror <$0e
  659. L_E4AB equ L_E4AA+1
  660. lbra L_02D5
  661. bgt L_E4E7
  662. fcb $3e ; reset
  663. asr <$0f
  664. lbsr L_03DE
  665. ble L_E4F0
  666. L_E4B9 swi
  667. L_E4BA lda <$73
  668. L_E4BB equ L_E4BA+1
  669. beq L_E479
  670. sta ,-s
  671. L_E4C0 lda <$72
  672. beq L_E53B
  673. bita #$10
  674. beq L_E4D9
  675. ldx #$0007
  676. jsr >$e561
  677. ldx #$386f
  678. jsr >$e53e
  679. L_E4D4 sta >$3859
  680. L_E4D5 equ L_E4D4+1
  681. lda <$72
  682. L_E4D9 bita #$01
  683. beq L_E4EC
  684. ldx #$0003
  685. jsr >$e561
  686. ldx #$3863
  687. L_E4E6 jsr >$e53e
  688. L_E4E7 equ L_E4E6+1
  689. sta >$3855
  690. L_E4EC lda #$02
  691. L_E4EE jsr >$e1df
  692. L_E4F0 equ L_E4EE+2
  693. L_E4F1 clra
  694. ldb <$74
  695. tfr d,x
  696. lda $e57c,x
  697. anda <$72
  698. bne L_E507
  699. ldb <$74
  700. incb
  701. andb #$07
  702. stb <$74
  703. bra L_E4F1
  704. L_E507 anda #$11
  705. beq L_E511
  706. lda $3852,x
  707. bra L_E52D
  708. L_E511 bsr L_E561
  709. tst <$75
  710. beq L_E529
  711. pshs a,x
  712. tfr x,d
  713. lda #$03
  714. mul
  715. ldx #$385a
  716. leax b,x
  717. puls a
  718. bsr L_E59E
  719. puls x
  720. L_E529 sta $3852,x
  721. L_E52D jsr >$e1df
  722. ldb <$74
  723. incb
  724. andb #$07
  725. stb <$74
  726. dec ,s
  727. bne L_E4F1
  728. L_E53B leas 1,s
  729. rts
  730. leay >L_E584,pcr
  731. L_E542 cmpa ,y++
  732. bcs L_E542
  733. lda -1,y
  734. cmpa ,x
  735. bne L_E55A
  736. ldb 1,x
  737. incb
  738. cmpb #$02
  739. beq L_E557
  740. stb 1,x
  741. bra L_E55E
  742. L_E557 sta 2,x
  743. rts
  744. L_E55A sta ,x
  745. clr 1,x
  746. L_E55E lda 2,x
  747. rts
  748. L_E561 lda >dev01_0
  749. sta $8000,x
  750. ldb #$0f
  751. L_E56A lda >dev01_1
  752. bmi L_E578
  753. decb
  754. bne L_E56A
  755. lda $3852,x
  756. bra L_E57B
  757. L_E578 lda >$6000
  758. L_E57B rts
  759. lsl <$04
  760. fcb $02,$01 ; negcom <$01
  761. suba #$40
  762. bra L_E594
  763. L_E584 fcb $eb,$00 ; addb 0,x
  764. adcb <$01
  765. andb #$04
  766. sbca >$05a4
  767. fcb $02,$98 ; negcom <$98
  768. com <$8d
  769. ror <$84
  770. L_E593 asr <$7c
  771. L_E594 equ L_E593+1
  772. lsl <$75
  773. rol <$6f
  774. inc <$68
  775. tst <$00
  776. L_E59D neg <$d6
  777. L_E59E equ L_E59D+1
  778. fcb $75,$bd,$e5 ; lsr >$bde5
  779. eorb #$30
  780. fcb $02,$c6 ; negcom <$c6
  781. fcb $02,$bd ; negcom <$bd
  782. bitb d,y
  783. rts
  784. pshs b
  785. adda ,s
  786. bcs L_E5B5
  787. cmpa ,x
  788. bcs L_E5C3
  789. L_E5B5 suba ,s
  790. suba ,s
  791. bcs L_E5BF
  792. cmpa ,x
  793. bhi L_E5C3
  794. L_E5BF lda ,x
  795. bra L_E5C5
  796. L_E5C3 sta ,x
  797. L_E5C5 leas 1,s
  798. rts
  799. suba ,x
  800. bls L_E5D1
  801. jsr >$e5d6
  802. bra L_E5D5
  803. L_E5D1 nega
  804. jsr >$e5dc
  805. L_E5D5 rts
  806. mul
  807. addd ,x
  808. std ,x
  809. rts
  810. mul
  811. coma
  812. comb
  813. addd #$0001
  814. addd ,x
  815. std ,x
  816. rts
  817. L_E5E7 jsr >$e64c
  818. bcs L_E5F1
  819. lsla
  820. ldx a,y
  821. andcc #$fe
  822. L_E5F1 rts
  823. bsr L_E5E7
  824. bcs L_E5FF
  825. lda -1,y
  826. inca
  827. anda -3,y
  828. sta -1,y
  829. andcc #$fe
  830. L_E5FF rts
  831. lda -2,y
  832. tfr a,b
  833. inca
  834. anda -3,y
  835. cmpa -1,y
  836. beq L_E613
  837. sta -2,y
  838. lslb
  839. stx b,y
  840. andcc #$fe
  841. rts
  842. L_E613 orcc #$01
  843. rts
  844. L_E616 bsr L_E64C
  845. bcs L_E624
  846. ldb -4,y
  847. mul
  848. leau d,y
  849. jsr >$e65f
  850. andcc #$fe
  851. L_E624 rts
  852. bsr L_E616
  853. bcs L_E632
  854. lda -1,y
  855. inca
  856. anda -3,y
  857. sta -1,y
  858. andcc #$fe
  859. L_E632 rts
  860. lda -2,y
  861. tfr a,b
  862. inca
  863. anda -3,y
  864. cmpa -1,y
  865. beq L_E655
  866. sta -2,y
  867. lda -4,y
  868. mul
  869. tfr x,u
  870. leax d,y
  871. jsr >$e65f
  872. bra L_E652
  873. L_E64C lda -1,y
  874. cmpa -2,y
  875. beq L_E655
  876. L_E652 andcc #$fe
  877. rts
  878. L_E655 orcc #$01
  879. rts
  880. std -4,y
  881. clr -2,y
  882. clr -1,y
  883. rts
  884. ldb -4,y
  885. L_E661 lda ,u+
  886. sta ,x+
  887. decb
  888. bne L_E661
  889. rts
  890. lu_e669 ldy #$394c
  891. L_E66D jsr >L_E5E7
  892. bcs L_E66D
  893. jsr ,x
  894. ldy #$394c
  895. jsr >$e5f2
  896. bra L_E66D
  897. ldy #$394c
  898. jsr >$e600
  899. rts
  900. ldy #$3940
  901. jsr >L_E64C
  902. bcs L_E693
  903. jsr >$e600
  904. bra L_E69C
  905. L_E693 jsr >$e600
  906. bcs L_E69C
  907. jsr ,x
  908. andcc #$fe
  909. L_E69C rts
  910. L_E69D ldy #$3940
  911. jsr >$e5f2
  912. jsr >L_E5E7
  913. bcc L_E6B0
  914. ldd #su_f430
  915. std <$00
  916. bra L_E6B2
  917. L_E6B0 jsr ,x
  918. L_E6B2 rts
  919. ldy #$394c
  920. ldd #$0203
  921. jsr >$e658
  922. ldy #$3940
  923. jsr >$e658
  924. rts
  925. s_0002 jsr >$e97b
  926. jsr >$e98e
  927. rts
  928. com >$3938
  929. lda #$0c
  930. tst >$3938
  931. bne L_E6E4
  932. tst >$3930
  933. bne L_E6E6
  934. pshs a
  935. jsr >$e815
  936. puls a
  937. bra L_E6E6
  938. L_E6E4 ora #$10
  939. L_E6E6 jsr >$e1df
  940. rts
  941. s_0001 jsr >su_f423
  942. ldb #$0a
  943. L_E6EF jsr >su_f412
  944. stb >dev_02_1
  945. stb >dev_02_2
  946. jsr >su_f412
  947. stb >dev_02_1
  948. lda >dev_02_3
  949. jsr >su_f412
  950. lda >dev_02_2
  951. pshs a
  952. cmpb ,s+
  953. bne L_E712
  954. decb
  955. bne L_E6EF
  956. bra L_E718
  957. L_E712 lda <$79
  958. ora #$08
  959. sta <$79
  960. L_E718 jsr >$f418
  961. rts
  962. jsr >$e86f
  963. sta <$7e
  964. jsr >$e8c6
  965. jsr >$e88d
  966. pshs cc
  967. orcc #$10
  968. lda #$03
  969. jsr >$e1df
  970. jsr >$ea63
  971. jsr >$e1df
  972. puls cc,pc
  973. jsr >$e86f
  974. pshs a
  975. jsr >$e8c6
  976. L_E740 jsr >$ea5b
  977. cmpa ,s
  978. bcc L_E755
  979. jsr >$e8b1
  980. bcs L_E751
  981. jsr >$e8f4
  982. bra L_E740
  983. L_E751 lda #$15
  984. bra L_E757
  985. L_E755 lda #$05
  986. L_E757 jsr >$e1df
  987. jsr >$e88d
  988. puls a,pc
  989. jsr >$e86f
  990. sta <$7c
  991. ldx #$e774
  992. jsr >$e67d
  993. bcc L_E773
  994. lda #$04
  995. ora #$10
  996. jsr >$e1df
  997. L_E773 rts
  998. jsr >$ea6b
  999. pshs cc
  1000. orcc #$10
  1001. pshs a
  1002. lda #$04
  1003. jsr >$e1df
  1004. puls a
  1005. jsr >$e1df
  1006. puls cc,pc
  1007. jsr >$ea0e
  1008. rts
  1009. jsr >$ea16
  1010. rts
  1011. jsr >$e86f
  1012. sta <$7b
  1013. jsr >$ea1e
  1014. rts
  1015. jsr >$e87b
  1016. sta >$3937
  1017. rts
  1018. jsr >$e873
  1019. sta <$80
  1020. rts
  1021. jsr >$e877
  1022. jsr >$e964
  1023. jsr >$e87f
  1024. sta ,y+
  1025. tfr a,b
  1026. L_E7B4 pshs b
  1027. jsr >$e86f
  1028. puls b
  1029. sta ,y+
  1030. decb
  1031. bne L_E7B4
  1032. rts
  1033. jsr >$e86f
  1034. sta <$7b
  1035. ldx #$e7cf
  1036. jsr >$e67d
  1037. bcs L_E7D2
  1038. rts
  1039. jsr >$eba2
  1040. L_E7D2 lda #$08
  1041. bcc L_E7D8
  1042. ora #$10
  1043. L_E7D8 jsr >$e1df
  1044. rts
  1045. pshs cc
  1046. orcc #$10
  1047. lda #$0f
  1048. jsr >$e1df
  1049. lda <$8c
  1050. jsr >$e1df
  1051. lda <$8f
  1052. jsr >$e1df
  1053. ldd <$87
  1054. jsr >$e883
  1055. ldd <$89
  1056. jsr >$e883
  1057. ldd <$8d
  1058. jsr >$e883
  1059. puls cc,pc
  1060. tst >$3930
  1061. bne L_E80F
  1062. ldx #$f3ba
  1063. jsr >$e685
  1064. bcs L_E80F
  1065. bra L_E814
  1066. L_E80F lda #$16
  1067. jsr >$e1df
  1068. L_E814 rts
  1069. lda #$07
  1070. tst >$3930
  1071. bne L_E823
  1072. ora #$10
  1073. jsr >$e1df
  1074. bra L_E82B
  1075. L_E823 jsr >$e1df
  1076. lda #$01
  1077. sta >$3931
  1078. L_E82B rts
  1079. clr >$3936
  1080. bra L_E836
  1081. lda #$01
  1082. sta >$3936
  1083. L_E836 jsr >$e277
  1084. sta <$81
  1085. ldx #$e849
  1086. jsr >$e67d
  1087. bcc L_E848
  1088. L_E843 lda #$19
  1089. jsr >$e1df
  1090. L_E848 rts
  1091. lda <$81
  1092. jsr >$e964
  1093. tst ,y
  1094. beq L_E843
  1095. sty <$94
  1096. jsr >$e902
  1097. pshs cc
  1098. orcc #$10
  1099. lda #$09
  1100. jsr >$e1df
  1101. lda <$8b
  1102. jsr >$e1df
  1103. ldd <$89
  1104. subd <$87
  1105. jsr >$e883
  1106. puls cc,pc
  1107. jsr >$e287
  1108. rts
  1109. jsr >$e27b
  1110. rts
  1111. jsr >$e277
  1112. rts
  1113. jsr >$e273
  1114. rts
  1115. jsr >$e27f
  1116. rts
  1117. lsra
  1118. rorb
  1119. lsra
  1120. rorb
  1121. tfr b,a
  1122. jsr >$e1df
  1123. rts
  1124. tst <$7e
  1125. beq L_E8B0
  1126. ldb #$03
  1127. ldx #$3932
  1128. lda ,x+
  1129. pshs a
  1130. tstb
  1131. beq L_E8A4
  1132. L_E89D lda ,x+
  1133. sta -2,x
  1134. decb
  1135. bne L_E89D
  1136. L_E8A4 ldb <$7e
  1137. stb ,-x
  1138. puls a
  1139. tsta
  1140. beq L_E8B0
  1141. jsr >$e8f4
  1142. L_E8B0 rts
  1143. ldx #$3932
  1144. ldb #$04
  1145. L_E8B6 lda ,x+
  1146. bne L_E8C1
  1147. decb
  1148. bne L_E8B6
  1149. orcc #$01
  1150. bra L_E8C5
  1151. L_E8C1 clr ,-x
  1152. andcc #$fe
  1153. L_E8C5 rts
  1154. ldb <$7e
  1155. tstb
  1156. beq L_E8E6
  1157. ldx #$3936
  1158. lda #$04
  1159. L_E8D0 cmpb ,-x
  1160. beq L_E8D9
  1161. deca
  1162. bne L_E8D0
  1163. bra L_E8E6
  1164. L_E8D9 ldb ,-x
  1165. stb 1,x
  1166. deca
  1167. bne L_E8D9
  1168. clr 1,x
  1169. andcc #$fe
  1170. bra L_E8E8
  1171. L_E8E6 orcc #$01
  1172. L_E8E8 rts
  1173. ldx #$3932
  1174. ldb #$04
  1175. L_E8EE clr ,x+
  1176. decb
  1177. bne L_E8EE
  1178. rts
  1179. ldb <$7e
  1180. pshs b
  1181. sta <$7e
  1182. jsr >$ea0e
  1183. puls b
  1184. stb <$7e
  1185. rts
  1186. ldx #$eccd
  1187. stx >$3929
  1188. tst >$3937
  1189. beq L_E913
  1190. ldx #$ed40
  1191. stx >$3929
  1192. L_E913 ldy <$94
  1193. jsr >$ea85
  1194. lda >$3937
  1195. cmpa #$01
  1196. bne L_E93B
  1197. lda <$8b
  1198. ldb <$8c
  1199. pshs a,b
  1200. lda <$8f
  1201. pshs a
  1202. lda #$03
  1203. pshs a
  1204. tfr s,y
  1205. ldx #$eccd
  1206. stx >$3929
  1207. jsr >$ea85
  1208. leas 4,s
  1209. L_E93B rts
  1210. rti
  1211. adda >$3c27
  1212. cwai #$93
  1213. cwai #$ff
  1214. mul
  1215. fcb $6b,$3d ; dec -3,y
  1216. stb <$3e
  1217. coma
  1218. fcb $3e ; reset
  1219. stx -1,y
  1220. fcb $1b ; nop
  1221. swi
  1222. fcb $87,$3f ; discarda #$3f
  1223. addd >$405f
  1224. nega
  1225. addb #$41
  1226. pulu cc,s
  1227. subd 2,u
  1228. clr <$42
  1229. fcb $7b,$42,$e7 ; dec >$42e7
  1230. coma
  1231. comb
  1232. coma
  1233. stx >$1f89
  1234. clra
  1235. tstb
  1236. bne L_E970
  1237. ldy #$e98c
  1238. bra L_E97A
  1239. L_E970 decb
  1240. lslb
  1241. lslb
  1242. lslb
  1243. ldy #$3b7c
  1244. leay d,y
  1245. L_E97A rts
  1246. lda #$07
  1247. pshs a
  1248. L_E97F lda ,s
  1249. jsr >$e964
  1250. clr ,y
  1251. dec ,s
  1252. bne L_E97F
  1253. puls a,pc
  1254. fcb $01,$fe ; neg <$fe
  1255. jsr >$ea06
  1256. clr <$7c
  1257. clr <$7e
  1258. jsr >$e8e9
  1259. su_e998 lda #$ff
  1260. sta >$3938
  1261. lda #$01
  1262. sta <$80
  1263. clr >$3930
  1264. clr >$3931
  1265. clr >$393a
  1266. clr >$393b
  1267. ldd #su_f430
  1268. std <$00
  1269. jsr >$e6b3
  1270. ldd #$0903
  1271. ldy #$3958
  1272. jsr >$e658
  1273. jsr >$f3e8
  1274. rts
  1275. ldb <$7e
  1276. pshs b
  1277. ldb #$fe
  1278. stb <$7e
  1279. jsr >$e9d3
  1280. puls b
  1281. stb <$7e
  1282. rts
  1283. ldb <$7c
  1284. pshs b
  1285. ldb #$fe
  1286. stb <$7c
  1287. jsr >$e9f3
  1288. puls b
  1289. stb <$7c
  1290. rts
  1291. ldb <$7e
  1292. pshs b
  1293. ldb #$ff
  1294. stb <$7e
  1295. jsr >$e9d3
  1296. puls b
  1297. stb <$7e
  1298. rts
  1299. ldb <$7b
  1300. pshs b
  1301. ldb #$fe
  1302. stb <$7b
  1303. jsr >$ea03
  1304. puls b
  1305. stb <$7b
  1306. rts
  1307. jsr ,y
  1308. rts
  1309. ldy #$ea1e
  1310. jsr >$e9c3
  1311. rts
  1312. ldy #$ea1e
  1313. jsr >$e9d3
  1314. rts
  1315. ldy #$ea1e
  1316. jsr >$e9f3
  1317. rts
  1318. lda #$ff
  1319. sta <$7a
  1320. L_EA22 jsr >$eae3
  1321. bcs L_EA2D
  1322. lda #$ff
  1323. sta 3,x
  1324. bra L_EA22
  1325. L_EA2D rts
  1326. lda #$ff
  1327. sta <$7a
  1328. bsr L_EA47
  1329. bcs L_EA46
  1330. lda <$7b
  1331. sta ,x
  1332. ldb <$7c
  1333. stb 1,x
  1334. lda <$7e
  1335. sta 3,x
  1336. clr 2,x
  1337. andcc #$fe
  1338. L_EA46 rts
  1339. L_EA47 lda <$7e
  1340. pshs a
  1341. lda #$ff
  1342. sta <$7e
  1343. ldy #$eae3
  1344. jsr >$e9d3
  1345. puls a
  1346. sta <$7e
  1347. rts
  1348. ldy #$ea73
  1349. jsr >$e9e3
  1350. rts
  1351. ldy #$ea73
  1352. jsr >$e9d3
  1353. rts
  1354. ldy #$ea73
  1355. jsr >$e9f3
  1356. rts
  1357. lda #$ff
  1358. sta <$7a
  1359. clra
  1360. pshs a
  1361. L_EA7A jsr >$eae3
  1362. bcs L_EA83
  1363. inc ,s
  1364. bra L_EA7A
  1365. L_EA83 puls a,pc
  1366. lda #$ff
  1367. sta <$7f
  1368. lda ,y+
  1369. beq L_EAC9
  1370. sta <$82
  1371. sty <$83
  1372. ldx #$3b2c
  1373. tst >$3936
  1374. beq L_EAAB
  1375. ldd #$7fff
  1376. std <$87
  1377. std <$89
  1378. std <$8d
  1379. lda #$ff
  1380. sta <$8b
  1381. sta <$8c
  1382. sta <$8f
  1383. L_EAAB lda #$ff
  1384. sta <$7a
  1385. L_EAAF ldy <$83
  1386. lda ,y
  1387. sta <$7b
  1388. L_EAB6 jsr >$eae3
  1389. bcs L_EAC0
  1390. jsr >$eb15
  1391. bra L_EAB6
  1392. L_EAC0 lda #$ff
  1393. sta <$7a
  1394. jsr >$ead0
  1395. bcc L_EAAF
  1396. L_EAC9 ldd <$89
  1397. subd <$87
  1398. std <$90
  1399. rts
  1400. ldy <$83
  1401. leay 1,y
  1402. sty <$83
  1403. dec <$82
  1404. bne L_EAE0
  1405. orcc #$01
  1406. bra L_EAE2
  1407. L_EAE0 andcc #$fe
  1408. L_EAE2 rts
  1409. L_EAE3 inc <$7a
  1410. lda <$7a
  1411. cmpa #$13
  1412. bhi L_EB0E
  1413. jsr >$eb84
  1414. lda <$7e
  1415. cmpa #$fe
  1416. beq L_EAF8
  1417. cmpa 3,x
  1418. bne L_EB0C
  1419. L_EAF8 lda <$7b
  1420. cmpa #$fe
  1421. beq L_EB02
  1422. cmpa ,x
  1423. bne L_EB0C
  1424. L_EB02 lda <$7c
  1425. cmpa #$fe
  1426. beq L_EB12
  1427. cmpa 1,x
  1428. beq L_EB12
  1429. L_EB0C bra L_EAE3
  1430. L_EB0E orcc #$01
  1431. bra L_EB14
  1432. L_EB12 andcc #$fe
  1433. L_EB14 rts
  1434. lda <$7f
  1435. jsr >$eb6f
  1436. pshs y
  1437. lda <$7a
  1438. jsr >$eb6f
  1439. puls x
  1440. jsr [$3929]
  1441. lda <$7a
  1442. jsr >$eb84
  1443. ldb ,x
  1444. cmpy <$87
  1445. bcs L_EB44
  1446. cmpy <$89
  1447. bcs L_EB5A
  1448. cmpy <$8d
  1449. bcc L_EB62
  1450. stb <$8f
  1451. sty <$8d
  1452. bra L_EB62
  1453. L_EB44 cmpb <$8b
  1454. beq L_EB53
  1455. jsr >$eb63
  1456. lda <$8b
  1457. sta <$8c
  1458. ldx <$87
  1459. stx <$89
  1460. L_EB53 stb <$8b
  1461. sty <$87
  1462. bra L_EB62
  1463. L_EB5A jsr >$eb63
  1464. stb <$8c
  1465. sty <$89
  1466. L_EB62 rts
  1467. pshs a,b,y
  1468. lda <$8c
  1469. sta <$8f
  1470. ldx <$89
  1471. stx <$8d
  1472. puls a,b,y,pc
  1473. tsta
  1474. bmi L_EB7F
  1475. ldb #$02
  1476. mul
  1477. addd #$e93c
  1478. tfr d,y
  1479. ldy ,y
  1480. bra L_EB83
  1481. L_EB7F ldy #$397c
  1482. L_EB83 rts
  1483. pshs a,b
  1484. tsta
  1485. bmi L_EB93
  1486. ldb #$04
  1487. mul
  1488. addd #$3b2c
  1489. tfr d,x
  1490. bra L_EB96
  1491. L_EB93 ldx #flag_3879+2
  1492. L_EB96 puls a,b,pc
  1493. neg <$80
  1494. adda ,u+
  1495. fcb $cd ; hcf
  1496. bitb <$db
  1497. subb ,s
  1498. ldb -16,x
  1499. bcs L_EBA5
  1500. L_EBA5 fcb $65,$8e ; lsr
  1501. fcb $38,$7b ; andcc #$7b
  1502. lda #$01
  1503. sta 2,x
  1504. lda #$ff
  1505. sta <$7a
  1506. clra
  1507. pshs a
  1508. L_EBB4 jsr >L_EAE3
  1509. bcs L_EBBD
  1510. inc ,s
  1511. bra L_EBB4
  1512. L_EBBD puls a
  1513. cmpa <$80
  1514. bcc L_EBD1
  1515. jsr >$ea2e
  1516. bcs L_EC0B
  1517. lda #$ff
  1518. sta <$7f
  1519. lda #$01
  1520. clrb
  1521. bra L_EBE6
  1522. L_EBD1 jsr >$ec0c
  1523. lda <$7f
  1524. jsr >$eb84
  1525. lda 2,x
  1526. pshs a
  1527. lda <$7a
  1528. jsr >$eb84
  1529. ldb 2,x
  1530. puls a
  1531. L_EBE6 pshs a
  1532. jsr >$ec53
  1533. jsr >$ec88
  1534. puls a
  1535. adda 2,x
  1536. sta 2,x
  1537. lda <$7f
  1538. sta <$7a
  1539. lda #$ff
  1540. sta <$7f
  1541. clrb
  1542. jsr >$ec88
  1543. lda <$7a
  1544. jsr >$eb84
  1545. lda #$01
  1546. sta 2,x
  1547. andcc #$fe
  1548. L_EC0B rts
  1549. ldx #$eccd
  1550. stx >$3929
  1551. leas -5,s
  1552. ldd #$7fff
  1553. std 2,s
  1554. lda #$ff
  1555. sta 4,s
  1556. sta ,s
  1557. sta 1,s
  1558. L_EC21 lda 4,s
  1559. sta <$7f
  1560. sta <$7a
  1561. jsr >L_EAE3
  1562. bcs L_EC4A
  1563. lda <$7a
  1564. sta 4,s
  1565. L_EC30 jsr >$eb15
  1566. cmpy 2,s
  1567. bcc L_EC43
  1568. sty 2,s
  1569. lda <$7f
  1570. sta ,s
  1571. lda <$7a
  1572. sta 1,s
  1573. L_EC43 jsr >L_EAE3
  1574. bcc L_EC30
  1575. bra L_EC21
  1576. L_EC4A puls a,b
  1577. sta <$7f
  1578. stb <$7a
  1579. leas 3,s
  1580. rts
  1581. pshs b,x
  1582. clrb
  1583. tfr d,x
  1584. adda ,s+
  1585. jsr >$ec5f
  1586. puls x,pc
  1587. pshs a
  1588. ldd #$0800
  1589. pshs a,b
  1590. tfr x,d
  1591. pshs b
  1592. tfr a,b
  1593. clra
  1594. L_EC6D lsl ,s
  1595. rolb
  1596. rola
  1597. cmpd 2,s
  1598. bcs L_EC7A
  1599. subd 2,s
  1600. inc ,s
  1601. L_EC7A dec 1,s
  1602. bne L_EC6D
  1603. cmpd 2,s
  1604. tfr b,a
  1605. puls b
  1606. leas 3,s
  1607. rts
  1608. pshs x
  1609. stb <$97
  1610. negb
  1611. stb <$96
  1612. lda <$7a
  1613. jsr >$eb6f
  1614. pshs y
  1615. lda <$7f
  1616. jsr >$eb6f
  1617. puls x
  1618. ldb #$6c
  1619. stb <$98
  1620. L_ECA1 lda ,x
  1621. ldb <$96
  1622. beq L_ECAC
  1623. jsr >$ecc2
  1624. sta ,x
  1625. L_ECAC lda ,y+
  1626. ldb <$97
  1627. beq L_ECB7
  1628. jsr >$ecc2
  1629. adda ,x
  1630. L_ECB7 sta ,x+
  1631. dec <$98
  1632. bne L_ECA1
  1633. puls x,pc
  1634. sta ,x
  1635. rts
  1636. tsta
  1637. bpl L_ECC8
  1638. nega
  1639. orcc #$08
  1640. L_ECC8 mul
  1641. bpl L_ECCC
  1642. nega
  1643. L_ECCC rts
  1644. pshs u
  1645. stx <$c8
  1646. sty <$ca
  1647. jsr >$ecdc
  1648. jsr >$ed13
  1649. puls u,pc
  1650. ldy #$7fff
  1651. lda #$26
  1652. ldx #$389a
  1653. L_ECE5 sty a,x
  1654. suba #$02
  1655. bge L_ECE5
  1656. ldx #$38a8
  1657. ldd #$0000
  1658. std ,x
  1659. ldx #$38b8
  1660. stx <$c2
  1661. lda #$01
  1662. sta <$d6
  1663. lda #$00
  1664. sta <$d7
  1665. lda #$01
  1666. sta <$d1
  1667. deca
  1668. sta <$cc
  1669. sta <$ce
  1670. lda #$ff
  1671. sta <$d9
  1672. lda #$01
  1673. sta <$d8
  1674. rts
  1675. lda #$17
  1676. sta <$d4
  1677. L_ED17 jsr >$ed66
  1678. lda <$d4
  1679. cmpa #$0d
  1680. bge L_ED24
  1681. lda #$01
  1682. sta <$d9
  1683. L_ED24 jsr >$ee4b
  1684. dec <$d4
  1685. bgt L_ED17
  1686. ldd <$c2
  1687. subd #$38a4
  1688. bpl L_ED35
  1689. addd #$0028
  1690. L_ED35 addd #$389a
  1691. tfr d,x
  1692. leax 4,x
  1693. ldy ,x
  1694. rts
  1695. pshs u
  1696. stx <$c8
  1697. sty <$ca
  1698. lda #$0b
  1699. sta <$cf
  1700. sta <$d0
  1701. clr <$9a
  1702. clr <$9b
  1703. L_ED51 jsr >$ee75
  1704. ldd <$9a
  1705. leay d,y
  1706. sty <$9a
  1707. dec <$cf
  1708. dec <$d0
  1709. bpl L_ED51
  1710. ldy <$9a
  1711. puls u,pc
  1712. jsr >$ede7
  1713. lda <$cc
  1714. sta <$cf
  1715. lda <$ce
  1716. sta <$d0
  1717. lda <$d1
  1718. nega
  1719. adda #$04
  1720. asra
  1721. inca
  1722. lsla
  1723. sta <$d2
  1724. sta <$d3
  1725. ldy #$7fff
  1726. ldx <$c2
  1727. bra L_ED88
  1728. L_ED85 sty a,x
  1729. L_ED88 suba #$02
  1730. bge L_ED85
  1731. lda <$d1
  1732. lbeq L_EDC1
  1733. lsla
  1734. suba #$02
  1735. adda <$d2
  1736. sta <$d5
  1737. L_ED99 lbsr L_EE75
  1738. ldx <$c2
  1739. lda <$d3
  1740. sty a,x
  1741. jsr >$ee06
  1742. ldx <$c2
  1743. leax a,x
  1744. ldd ,x
  1745. leay d,y
  1746. sty ,x
  1747. inc <$cf
  1748. dec <$d0
  1749. lda <$d3
  1750. adda #$02
  1751. sta <$d3
  1752. lda <$d5
  1753. suba <$d3
  1754. bge L_ED99
  1755. L_EDC1 ldy #$7fff
  1756. lda <$d3
  1757. ldx <$c2
  1758. bra L_EDD0
  1759. L_EDCB sty a,x
  1760. adda #$02
  1761. L_EDD0 cmpa #$08
  1762. ble L_EDCB
  1763. ldd <$c2
  1764. subd #$389a
  1765. subb #$1e
  1766. bpl L_EDDF
  1767. addb #$28
  1768. L_EDDF addd #$389a
  1769. std <$c2
  1770. neg <$d8
  1771. rts
  1772. ldd <$c2
  1773. subd #$389a
  1774. subb #$14
  1775. bpl L_EDF2
  1776. addb #$28
  1777. L_EDF2 addd #$389a
  1778. std <$c4
  1779. subd #$389a
  1780. subb #$0a
  1781. bpl L_EE00
  1782. addb #$28
  1783. L_EE00 addd #$389a
  1784. std <$c6
  1785. rts
  1786. tst <$d8
  1787. ble L_EE21
  1788. ldx <$c6
  1789. ldx a,x
  1790. ldy <$c2
  1791. ldd a,y
  1792. leay d,x
  1793. lda <$d3
  1794. adda #$02
  1795. ldx <$c6
  1796. leax a,x
  1797. suba #$02
  1798. bra L_EE36
  1799. L_EE21 ldx <$c6
  1800. suba #$02
  1801. ldx a,x
  1802. ldy <$c2
  1803. adda #$02
  1804. ldd a,y
  1805. leay d,x
  1806. lda <$d3
  1807. ldx <$c6
  1808. leax a,x
  1809. L_EE36 cmpy ,x
  1810. bcs L_EE3E
  1811. ldy ,x
  1812. L_EE3E ldx <$c4
  1813. leax a,x
  1814. cmpy ,x
  1815. bcs L_EE4A
  1816. ldy ,x
  1817. L_EE4A rts
  1818. ldb <$d9
  1819. lda <$d6
  1820. bgt L_EE52
  1821. negb
  1822. L_EE52 ldx #$38cd
  1823. inc b,x
  1824. jsr >$ee6d
  1825. sta <$d6
  1826. ldb <$d9
  1827. lda <$d7
  1828. beq L_EE63
  1829. negb
  1830. L_EE63 addb <$d1
  1831. stb <$d1
  1832. jsr >$ee6d
  1833. sta <$d7
  1834. rts
  1835. inca
  1836. cmpa #$02
  1837. bne L_EE74
  1838. lda #$ff
  1839. L_EE74 rts
  1840. L_EE75 ldx <$c8
  1841. lda <$cf
  1842. ldb #$09
  1843. mul
  1844. leax d,x
  1845. ldu <$ca
  1846. lda <$d0
  1847. ldb #$09
  1848. mul
  1849. leau d,u
  1850. lda #$08
  1851. ldy #$0000
  1852. L_EE8D ldb a,x
  1853. subb a,u
  1854. bpl L_EE94
  1855. negb
  1856. L_EE94 leay b,y
  1857. deca
  1858. bpl L_EE8D
  1859. rts
  1860. pshs a,b,x,y,u
  1861. tst >$3938
  1862. beq L_EEDF
  1863. leas -9,s
  1864. tfr s,x
  1865. lda #$08
  1866. L_EEA7 beq L_EEC2
  1867. sta ,-s
  1868. ldb #$08
  1869. subb ,s+
  1870. stb >dev_02_1
  1871. ldb >dev_02_3
  1872. L_EEB5 ldb >dev_02_0
  1873. blt L_EEB5
  1874. ldb >dev_02_2
  1875. stb ,x+
  1876. deca
  1877. bra L_EEA7
  1878. L_EEC2 ldb #$08
  1879. stb >dev_02_1
  1880. ldb >dev_02_3
  1881. L_EECA ldb >dev_02_0
  1882. blt L_EECA
  1883. ldb >dev_02_2
  1884. stb ,x+
  1885. tfr s,x
  1886. ldy #$3958
  1887. jsr >$e633
  1888. leas 9,s
  1889. L_EEDF lda >dev_02_0
  1890. puls a,b,x,y,u,pc
  1891. stu >$8055
  1892. nega
  1893. leau 11,y
  1894. bcs L_EF0C
  1895. andcc #$1a
  1896. lbsr L_0405
  1897. nop
  1898. fcb $11,$10
  1899. clr <$0e
  1900. tst <$0d
  1901. inc <$0c
  1902. fcb $0b,$0b ; dec <$0b
  1903. dec <$0a
  1904. rol <$09
  1905. rol <$09
  1906. lsl <$08
  1907. lsl <$08
  1908. asr <$07
  1909. L_EF08 tfr s,u
  1910. L_EF0A leas <$e9,s
  1911. L_EF0C equ L_EF0A+2
  1912. jsr >$ef5c
  1913. ldd 6,u
  1914. addd #$0001
  1915. std 6,u
  1916. ldx 3,u
  1917. leax 1,x
  1918. leay <$e9,u
  1919. lda 2,u
  1920. sta -3,u
  1921. lda 5,u
  1922. sta -2,u
  1923. sta -1,u
  1924. L_EF28 lda -3,u
  1925. suba -2,u
  1926. bmi L_EF3C
  1927. beq L_EF49
  1928. sta -3,u
  1929. lda -2,u
  1930. jsr >$ef6a
  1931. jsr >$ef8f
  1932. bra L_EF54
  1933. L_EF3C nega
  1934. sta -2,u
  1935. lda -3,u
  1936. jsr >$ef6a
  1937. jsr >$ef96
  1938. bra L_EF54
  1939. L_EF49 lda -2,u
  1940. jsr >$ef6a
  1941. jsr >$ef8f
  1942. jsr >$ef96
  1943. L_EF54 tst -1,u
  1944. bne L_EF28
  1945. leas $17,s
  1946. rts
  1947. pshs y
  1948. lda #$12
  1949. leay <$e9,u
  1950. L_EF63 clr ,y+
  1951. deca
  1952. bne L_EF63
  1953. puls y,pc
  1954. pshs a
  1955. ldb #$09
  1956. stb -4,u
  1957. L_EF70 ldb ,s
  1958. lda ,x+
  1959. bpl L_EF7F
  1960. nega
  1961. mul
  1962. coma
  1963. comb
  1964. addd #$0001
  1965. bra L_EF80
  1966. L_EF7F mul
  1967. L_EF80 addd ,y
  1968. std ,y++
  1969. dec -4,u
  1970. bne L_EF70
  1971. leax -9,x
  1972. leay <$ee,y
  1973. puls a,pc
  1974. lda 5,u
  1975. sta -2,u
  1976. leax 9,x
  1977. rts
  1978. lda 2,u
  1979. sta -3,u
  1980. lda #$09
  1981. sta -4,u
  1982. pshs x
  1983. ldx #$eee3
  1984. lda 2,u
  1985. lda a,x
  1986. ldx 6,u
  1987. pshs y
  1988. L_EFAB jsr >$efbe
  1989. dec -4,u
  1990. bne L_EFAB
  1991. stx 6,u
  1992. puls y
  1993. puls x
  1994. jsr >$ef5c
  1995. dec -1,u
  1996. rts
  1997. pshs a
  1998. clr -5,u
  1999. ldd ,y
  2000. bpl L_EFD8
  2001. inc -5,u
  2002. cmpd #$8000
  2003. bne L_EFD1
  2004. addd #$0001
  2005. L_EFD1 coma
  2006. comb
  2007. addd #$0001
  2008. std ,y
  2009. L_EFD8 lda ,s
  2010. ldb ,y+
  2011. mul
  2012. pshs b
  2013. lda 1,s
  2014. ldb ,y+
  2015. mul
  2016. adca #$00
  2017. adda ,s+
  2018. bge L_EFEC
  2019. lda #$7f
  2020. L_EFEC tst -5,u
  2021. beq L_EFF1
  2022. nega
  2023. L_EFF1 sta ,x+
  2024. puls a,pc
  2025. L_EFF5 pshs a,b,x,y,u
  2026. leas -2,s
  2027. tfr s,u
  2028. ldx #$0000
  2029. ldy 13,u
  2030. leay 1,y
  2031. lda 12,u
  2032. L_F005 beq L_F00D
  2033. ldb ,y+
  2034. abx
  2035. deca
  2036. bra L_F005
  2037. L_F00D stx ,u
  2038. lda 12,u
  2039. asra
  2040. L_F012 beq L_F01B
  2041. asr ,u
  2042. ror 1,u
  2043. asra
  2044. bra L_F012
  2045. L_F01B ldd ,u
  2046. stb [<15,u]
  2047. leas 2,s
  2048. puls a,b,x,y,u,pc
  2049. L_F024 pshs a,b,x,y,u
  2050. leas -2,s
  2051. tfr s,u
  2052. ldx #$39e8
  2053. tfr x,y
  2054. lda #$12
  2055. sta ,u
  2056. L_F033 beq L_F047
  2057. lda #$09
  2058. L_F037 ldb 9,y
  2059. addb ,y+
  2060. asrb
  2061. stb ,x+
  2062. deca
  2063. bne L_F037
  2064. leay 9,y
  2065. dec ,u
  2066. bra L_F033
  2067. L_F047 leas 2,s
  2068. puls a,b,x,y,u,pc
  2069. tst >$3931
  2070. beq L_F05F
  2071. pshs a,b,x,y,u
  2072. clr >$3930
  2073. clr >$3931
  2074. jsr >$e69d
  2075. puls a,b,x,y,u
  2076. bra L_F062
  2077. L_F05F jsr >$ee9a
  2078. L_F062 jmp >$e0eb
  2079. pshs a,b,x,y,u
  2080. L_F067 ldy #$3958
  2081. tst >$3930
  2082. bne L_F075
  2083. jsr >$f0c0
  2084. bra L_F0A3
  2085. L_F075 jsr >L_E64C
  2086. bcs L_F0A3
  2087. lda >$393a
  2088. anda #$7f
  2089. bne L_F0A3
  2090. lda #$80
  2091. ora >$393a
  2092. sta >$393a
  2093. jsr >$f0ce
  2094. bcc L_F067
  2095. lda #$01
  2096. sta >$3931
  2097. inc >$3939
  2098. ldx #$f0a5
  2099. jsr >$e67d
  2100. bcs L_F0A3
  2101. lda #$01
  2102. sta >$393b
  2103. L_F0A3 puls a,b,x,y,u,pc
  2104. jsr >$f188
  2105. lda #$00
  2106. sta >$393b
  2107. jsr >$f0c0
  2108. bcs L_F0B9
  2109. lda #$06
  2110. jsr >$e1df
  2111. bra L_F0BF
  2112. L_F0B9 ldx #$f3ba
  2113. jsr >$e685
  2114. L_F0BF rts
  2115. tst >$393b
  2116. bne L_F0CD
  2117. lda >$393a
  2118. anda #$7f
  2119. sta >$393a
  2120. L_F0CD rts
  2121. ldx #$38f8
  2122. ldy #$3958
  2123. jsr >$e625
  2124. lbcs L_F17B
  2125. tst >$3939
  2126. lbne L_F17B
  2127. lda >$3900
  2128. sta <$e0
  2129. lda <$e8
  2130. cmpa #$01
  2131. ble L_F143
  2132. inc <$dc
  2133. lda <$dc
  2134. cmpa #$04
  2135. bgt L_F111
  2136. deca
  2137. ldb #$09
  2138. mul
  2139. ldx #$3905
  2140. leax d,x
  2141. ldy #$38f8
  2142. lda #$09
  2143. jsr >$f39d
  2144. ldx #$3900
  2145. lda <$dc
  2146. ldb <$e0
  2147. stb a,x
  2148. L_F111 cmpa <$e8
  2149. bne L_F141
  2150. clr <$dc
  2151. lda <$e8
  2152. jsr >$f181
  2153. ldx #$3904
  2154. ldb #$01
  2155. ldy #$38ee
  2156. pshs b,y
  2157. pshs a,x
  2158. lbsr L_EF08
  2159. leas 6,s
  2160. lda <$e8
  2161. jsr >$f181
  2162. ldx #$3900
  2163. ldy #$38e1
  2164. pshs a,x,y
  2165. lbsr L_EFF5
  2166. leas 5,s
  2167. L_F141 bra L_F153
  2168. L_F143 ldb <$e0
  2169. stb <$e1
  2170. ldy #$38f8
  2171. ldx #$38ef
  2172. lda #$09
  2173. jsr >$f39d
  2174. L_F153 lda <$dc
  2175. bne L_F17B
  2176. lda <$e1
  2177. suba <$e3
  2178. sta <$e2
  2179. jsr >$f28e
  2180. pshs cc
  2181. tst <$da
  2182. beq L_F16B
  2183. jsr >$f38a
  2184. bra L_F16E
  2185. L_F16B jsr >$f36a
  2186. L_F16E puls cc
  2187. bcc L_F17B
  2188. lda <$e7
  2189. cmpa #$10
  2190. bgt L_F17E
  2191. jsr >$f3a5
  2192. L_F17B andcc #$fe
  2193. rts
  2194. L_F17E orcc #$01
  2195. rts
  2196. cmpa #$04
  2197. ble L_F187
  2198. lda #$04
  2199. L_F187 rts
  2200. jsr >$f1c5
  2201. lbcs L_F1C4
  2202. lda <$de
  2203. ldx #$39e7
  2204. ldb #$0c
  2205. ldy #$397b
  2206. pshs b,y
  2207. pshs a,x
  2208. lbsr L_EF08
  2209. leas 6,s
  2210. lda #$14
  2211. suba <$e7
  2212. pshs a
  2213. ldx #$3984
  2214. ldb #$0c
  2215. L_F1AE lda ,x
  2216. adda ,s
  2217. bpl L_F1B5
  2218. clra
  2219. L_F1B5 suba #$0a
  2220. lsla
  2221. lsla
  2222. sta ,x
  2223. leax 9,x
  2224. decb
  2225. bne L_F1AE
  2226. leas 1,s
  2227. andcc #$fe
  2228. L_F1C4 rts
  2229. ldb <$de
  2230. jsr >$f25c
  2231. clr ,x
  2232. lda <$de
  2233. inca
  2234. clrb
  2235. jsr >$f25c
  2236. pshs a,b,x
  2237. lda <$e8
  2238. jsr >$f3a5
  2239. sta <$e8
  2240. clr <$e5
  2241. lda <$e4
  2242. sta <$e3
  2243. L_F1E2 ldx 2,s
  2244. lda ,x
  2245. sta <$e1
  2246. suba <$e3
  2247. bpl L_F1ED
  2248. clra
  2249. L_F1ED ldb 1,s
  2250. stb <$df
  2251. sta <$e2
  2252. jsr >$f28e
  2253. ldb 1,s
  2254. subb <$df
  2255. ble L_F221
  2256. lda <$df
  2257. cmpa <$de
  2258. bne L_F206
  2259. ldb 1,s
  2260. subb <$de
  2261. L_F206 incb
  2262. stb <$e5
  2263. dec ,s
  2264. inc 1,s
  2265. ldb 1,s
  2266. lda ,s
  2267. jsr >$f268
  2268. subb <$e5
  2269. jsr >$f25c
  2270. stx 2,s
  2271. clr <$e5
  2272. tst ,s
  2273. bra L_F249
  2274. L_F221 tst <$da
  2275. bne L_F229
  2276. inc <$e5
  2277. bra L_F23F
  2278. L_F229 tst <$e5
  2279. beq L_F23F
  2280. lda ,s
  2281. ldb 1,s
  2282. jsr >$f268
  2283. subb <$e5
  2284. stb 1,s
  2285. jsr >$f25c
  2286. stx 2,s
  2287. clr <$e5
  2288. L_F23F ldx 2,s
  2289. leax 9,x
  2290. stx 2,s
  2291. inc 1,s
  2292. dec ,s
  2293. L_F249 lbne L_F1E2
  2294. puls a,b,x
  2295. ldb <$de
  2296. bne L_F259
  2297. jsr >$f3a5
  2298. orcc #$01
  2299. rts
  2300. L_F259 andcc #$fe
  2301. rts
  2302. pshs a,b
  2303. lda #$09
  2304. mul
  2305. ldx #$39f0
  2306. leax d,x
  2307. puls a,b,pc
  2308. pshs b
  2309. sta ,-s
  2310. ble L_F28C
  2311. ldy #$39e8
  2312. lda #$09
  2313. mul
  2314. leay d,y
  2315. ldx #$39e8
  2316. ldb 1,s
  2317. subb <$e5
  2318. lda #$09
  2319. mul
  2320. leax d,x
  2321. L_F283 lda #$09
  2322. jsr >$f39d
  2323. dec ,s
  2324. bne L_F283
  2325. L_F28C puls a,b,pc
  2326. lda <$e2
  2327. ldb <$da
  2328. beq L_F29C
  2329. decb
  2330. beq L_F2A4
  2331. decb
  2332. beq L_F2BC
  2333. bra L_F2C8
  2334. L_F29C cmpa #$04
  2335. ble L_F2A2
  2336. inc <$da
  2337. L_F2A2 bra L_F2ED
  2338. L_F2A4 cmpa #$04
  2339. bge L_F2B2
  2340. ldb <$de
  2341. stb <$df
  2342. clr <$da
  2343. clr <$e6
  2344. bra L_F2BA
  2345. L_F2B2 cmpa #$08
  2346. ble L_F2BA
  2347. ldb #$02
  2348. stb <$da
  2349. L_F2BA bra L_F2ED
  2350. L_F2BC cmpa #$08
  2351. bge L_F2C8
  2352. ldb #$03
  2353. stb <$da
  2354. ldb <$df
  2355. stb <$e9
  2356. L_F2C8 cmpa #$08
  2357. ble L_F2D2
  2358. ldb #$02
  2359. stb <$da
  2360. bra L_F2ED
  2361. L_F2D2 cmpa #$06
  2362. bge L_F2EB
  2363. inc <$db
  2364. clr <$da
  2365. ldb <$df
  2366. subb <$e9
  2367. lda <$e8
  2368. mul
  2369. cmpd #$0004
  2370. ble L_F2EB
  2371. ldb <$e9
  2372. stb <$df
  2373. L_F2EB bra L_F2F5
  2374. L_F2ED lda <$da
  2375. bne L_F2F5
  2376. inc <$ea
  2377. bra L_F301
  2378. L_F2F5 clr <$ea
  2379. inc <$df
  2380. lda <$e2
  2381. cmpa <$e6
  2382. ble L_F301
  2383. sta <$e6
  2384. L_F301 lda <$db
  2385. beq L_F338
  2386. clr <$db
  2387. lda <$e6
  2388. cmpa #$0a
  2389. blt L_F332
  2390. ldb <$df
  2391. subb <$de
  2392. lda <$e8
  2393. mul
  2394. cmpd #$0004
  2395. blt L_F332
  2396. ldb <$df
  2397. decb
  2398. stb <$de
  2399. lda <$e6
  2400. adda <$e3
  2401. cmpa <$e7
  2402. bls L_F336
  2403. sta <$e7
  2404. suba #$1c
  2405. bpl L_F32E
  2406. clra
  2407. L_F32E sta <$e4
  2408. bra L_F336
  2409. L_F332 ldb <$de
  2410. stb <$df
  2411. L_F336 clr <$e6
  2412. L_F338 lda <$df
  2413. cmpa #$23
  2414. bne L_F34E
  2415. lbsr L_F024
  2416. asr <$de
  2417. asr <$df
  2418. lda <$e8
  2419. lsla
  2420. cmpa #$10
  2421. bge L_F361
  2422. sta <$e8
  2423. L_F34E ldb <$ea
  2424. lda <$e8
  2425. mul
  2426. cmpd #$000a
  2427. lblt L_F367
  2428. lda <$de
  2429. ble L_F367
  2430. bra L_F364
  2431. L_F361 jsr >$f3a5
  2432. L_F364 orcc #$01
  2433. rts
  2434. L_F367 andcc #$fe
  2435. rts
  2436. lda <$dd
  2437. ldx #$38ea
  2438. ldb <$e1
  2439. stb a,x
  2440. inca
  2441. cmpa #$04
  2442. ble L_F37A
  2443. lda #$01
  2444. L_F37A sta <$dd
  2445. lda #$04
  2446. ldy #$38e3
  2447. pshs a,x,y
  2448. lbsr L_EFF5
  2449. leas 5,s
  2450. rts
  2451. ldy #$38ef
  2452. ldx #$39e8
  2453. lda <$df
  2454. deca
  2455. ldb #$09
  2456. mul
  2457. leax d,x
  2458. lda #$09
  2459. bra L_F39D
  2460. L_F39D ldb ,y+
  2461. stb ,x+
  2462. deca
  2463. bne L_F39D
  2464. rts
  2465. clr <$dc
  2466. clr <$de
  2467. clr <$df
  2468. clr <$ea
  2469. clr <$e7
  2470. clr <$da
  2471. clr <$e6
  2472. clr <$db
  2473. ldb #$01
  2474. stb <$e8
  2475. rts
  2476. pshs a,b,dp,x
  2477. jsr >$f3a5
  2478. clr >$3939
  2479. ldb #$7f
  2480. ldx #$38eb
  2481. lda #$04
  2482. L_F3C9 stb ,x+
  2483. deca
  2484. bne L_F3C9
  2485. stb <$e3
  2486. ldb #$01
  2487. stb <$dd
  2488. clr <$e4
  2489. lda #$01
  2490. sta >$3930
  2491. ldd #$f04b
  2492. std <$00
  2493. bsr L_F3E8
  2494. andcc #$fe
  2495. bra L_F3E6
  2496. L_F3E6 puls a,b,dp,x,pc
  2497. L_F3E8 bsr L_F418
  2498. ldb #$09
  2499. stb >dev_02_1
  2500. ldb #$7b
  2501. stb >dev_02_2
  2502. bsr su_f412
  2503. ldb #$0a
  2504. stb >dev_02_1
  2505. ldb #$3d
  2506. stb >dev_02_2
  2507. bsr su_f412
  2508. ldb #$2b
  2509. stb >dev_02_1
  2510. ldb #$ad
  2511. stb >dev_02_2
  2512. ldb #$20
  2513. stb >dev_02_0
  2514. rts
  2515. su_f412 lda >dev_02_0
  2516. blt su_f412
  2517. rts
  2518. L_F418 clr >dev_02_0
  2519. L_F41B lda >dev_02_0
  2520. anda #$40
  2521. bne L_F41B
  2522. rts
  2523. su_f423 lda #$40
  2524. sta >dev_02_0
  2525. L_F428 lda >dev_02_0
  2526. anda #$40
  2527. beq L_F428
  2528. rts
  2529. su_f430 tst >dev_02_0
  2530. jmp >$e0eb
  2531. su_f436 clra
  2532. sta >$4653
  2533. rts
  2534. su_f43b pshs cc
  2535. orcc #$40
  2536. ldx #$4438
  2537. stx >$4656
  2538. ldx #$fc45
  2539. stx >$4659
  2540. clra
  2541. sta >$4653
  2542. sta >$4661
  2543. ldx #$f760
  2544. stx >$4654
  2545. lda #$00
  2546. ldb #$3f
  2547. ldx #$4438
  2548. jsr >$f4b0
  2549. lda #$01
  2550. ldb #$3f
  2551. ldx #$4481
  2552. jsr >$f4b0
  2553. ldx #$44c1
  2554. L_F46F clr ,x+
  2555. cmpx #$4561
  2556. bcs L_F46F
  2557. lbsr L_F48D
  2558. lda #$10
  2559. clrb
  2560. ldx #$4581
  2561. ldy #$45a3
  2562. L_F483 sty ,x++
  2563. stb ,y+
  2564. deca
  2565. bge L_F483
  2566. puls cc,pc
  2567. L_F48D ldd #$39e8
  2568. std >$4662
  2569. std >$4664
  2570. ldx #$39e8
  2571. L_F499 clr ,x+
  2572. cmpx #$3b2c
  2573. bcs L_F499
  2574. ldx #$44c9
  2575. ldd >$4662
  2576. L_F4A6 std ,x
  2577. leax 10,x
  2578. cmpx #$4561
  2579. bcs L_F4A6
  2580. rts
  2581. pshs cc,a,b,y
  2582. orcc #$10
  2583. lsla
  2584. ldy #$442b
  2585. stx a,y
  2586. tstb
  2587. beq L_F4DE
  2588. stb -6,x
  2589. lda #$a9
  2590. sta ,x
  2591. sta -5,x
  2592. clra
  2593. sta -8,x
  2594. inca
  2595. sta -9,x
  2596. lda #$08
  2597. sta -7,x
  2598. ldy #$f535
  2599. sty -2,x
  2600. ldy #$f4e0
  2601. sty -4,x
  2602. L_F4DE puls cc,a,b,y,pc
  2603. pshs y,u
  2604. clra
  2605. cmpb #$08
  2606. bgt L_F4FC
  2607. ldu #$f519
  2608. leau b,u
  2609. L_F4EC dec -7,x
  2610. bge L_F4F4
  2611. bsr L_F53C
  2612. bra L_F4F6
  2613. L_F4F4 lsl -5,x
  2614. L_F4F6 rola
  2615. decb
  2616. bne L_F4EC
  2617. jmp ,u
  2618. L_F4FC tfr d,y
  2619. subb #$08
  2620. lslb
  2621. ldu #$f523
  2622. leau b,u
  2623. clrb
  2624. L_F507 dec -7,x
  2625. bge L_F50F
  2626. bsr L_F53C
  2627. bra L_F511
  2628. L_F50F lsl -5,x
  2629. L_F511 rolb
  2630. rola
  2631. leay -1,y
  2632. bne L_F507
  2633. jmp ,u
  2634. nop
  2635. lsla
  2636. lsla
  2637. lsla
  2638. lsla
  2639. lsla
  2640. lsla
  2641. lsla
  2642. puls y,u,pc
  2643. nop
  2644. nop
  2645. lslb
  2646. rola
  2647. lslb
  2648. rola
  2649. lslb
  2650. rola
  2651. lslb
  2652. rola
  2653. lslb
  2654. rola
  2655. lslb
  2656. rola
  2657. lslb
  2658. rola
  2659. puls y,u,pc
  2660. dec -7,x
  2661. blt L_F53C
  2662. lsl -5,x
  2663. rts
  2664. L_F53C pshs b
  2665. ldb -8,x
  2666. incb
  2667. andb -6,x
  2668. L_F543 cmpb -9,x
  2669. beq L_F543
  2670. stb -8,x
  2671. ldb b,x
  2672. lslb
  2673. stb -5,x
  2674. ldb #$07
  2675. stb -7,x
  2676. puls b,pc
  2677. pshs y,u
  2678. dec >3,x
  2679. beq L_F5C2
  2680. dec >0,x
  2681. bpl L_F566
  2682. bsr L_F5DB
  2683. bra L_F56A
  2684. L_F566 lsl >4,x
  2685. L_F56A bcc L_F5B7
  2686. clra
  2687. cmpb #$08
  2688. bgt L_F590
  2689. ldu #$f519
  2690. leau b,u
  2691. L_F576 dec >3,x
  2692. beq L_F5C2
  2693. dec >0,x
  2694. bpl L_F586
  2695. bsr L_F5DB
  2696. bra L_F58A
  2697. L_F586 lsl >4,x
  2698. L_F58A rola
  2699. decb
  2700. bne L_F576
  2701. jmp ,u
  2702. L_F590 tfr d,y
  2703. subb #$08
  2704. lslb
  2705. ldu #$f523
  2706. leau b,u
  2707. clrb
  2708. L_F59B dec >3,x
  2709. beq L_F5C2
  2710. dec >0,x
  2711. bpl L_F5AB
  2712. bsr L_F5DB
  2713. bra L_F5AF
  2714. L_F5AB lsl >4,x
  2715. L_F5AF rolb
  2716. rola
  2717. leay -1,y
  2718. bne L_F59B
  2719. jmp ,u
  2720. L_F5B7 pshs x
  2721. ldx >5,x
  2722. jsr [<-4,x]
  2723. puls x,y,u,pc
  2724. L_F5C2 inc >3,x
  2725. puls y,u
  2726. bra L_F5F6
  2727. dec >3,x
  2728. beq L_F5F6
  2729. dec >0,x
  2730. bmi L_F5DB
  2731. lsl >4,x
  2732. rts
  2733. L_F5DB pshs b,y
  2734. ldy >1,x
  2735. ldb ,y+
  2736. sty >1,x
  2737. lslb
  2738. stb >4,x
  2739. ldb #$07
  2740. stb >0,x
  2741. puls b,y,pc
  2742. L_F5F6 leas ,u
  2743. puls x,u,pc
  2744. jsr >$e28b
  2745. sta >$4659
  2746. jsr >$e28b
  2747. sta >$465a
  2748. ldx #su_fb1b
  2749. jsr >$e67d
  2750. bcc L_F613
  2751. lda #$6a
  2752. jsr >$e1df
  2753. L_F613 rts
  2754. pshs y
  2755. ldy >$4656
  2756. lda >$4658
  2757. pshs a
  2758. ldb -8,y
  2759. subb -9,y
  2760. decb
  2761. andb -6,y
  2762. cmpb >$4658
  2763. bcs L_F643
  2764. L_F62B jsr >$e28b
  2765. pshs a,b
  2766. ldb -9,y
  2767. sta b,y
  2768. lda -9,y
  2769. inca
  2770. anda -6,y
  2771. sta -9,y
  2772. puls a,b
  2773. dec ,s
  2774. bgt L_F62B
  2775. puls a,y,pc
  2776. L_F643 lda #$80
  2777. ora >$4653
  2778. sta >$4653
  2779. lda #$1b
  2780. jsr >$e1df
  2781. L_F650 jsr >$e28b
  2782. dec ,s
  2783. bgt L_F650
  2784. puls a,y,pc
  2785. jsr >$e28b
  2786. clrb
  2787. lsla
  2788. lsla
  2789. rolb
  2790. lslb
  2791. ldx #$442b
  2792. ldx b,x
  2793. stx >$4656
  2794. lsra
  2795. lsra
  2796. sta >$4658
  2797. rts
  2798. ldx #$fb62
  2799. jsr >$e67d
  2800. bcc L_F67C
  2801. lda #$6a
  2802. jsr >$e1df
  2803. L_F67C rts
  2804. ldx #$fdb1
  2805. jsr >$e685
  2806. bcc L_F68A
  2807. lda #$5a
  2808. jsr >$e1df
  2809. L_F68A rts
  2810. L_F68B jsr [<-2,x]
  2811. bcc L_F68B
  2812. rts
  2813. pshs x
  2814. ldb #$04
  2815. jsr [<-4,x]
  2816. lsra
  2817. lsra
  2818. lsra
  2819. ldx #$4581
  2820. leax a,x
  2821. ldy ,x
  2822. lda ,y
  2823. clrb
  2824. lsra
  2825. rorb
  2826. lsra
  2827. rorb
  2828. lsra
  2829. rorb
  2830. beq L_F6AF
  2831. inca
  2832. L_F6AF inca
  2833. leay a,y
  2834. nega
  2835. deca
  2836. L_F6B4 ldb ,y+
  2837. stb a,y
  2838. cmpy >$45a1
  2839. bcs L_F6B4
  2840. inca
  2841. leay a,y
  2842. pshs x,y
  2843. ldy ,x
  2844. pshs y
  2845. ldx #$4581
  2846. ldb #$10
  2847. L_F6CD ldy ,x
  2848. cmpy ,s
  2849. bls L_F6DA
  2850. leay a,y
  2851. sty ,x
  2852. L_F6DA leax 2,x
  2853. decb
  2854. bne L_F6CD
  2855. puls y
  2856. puls x,y
  2857. sty ,x
  2858. puls x
  2859. ldb #$08
  2860. jsr [<-4,x]
  2861. sta ,y+
  2862. beq L_F706
  2863. tfr a,b
  2864. L_F6F3 pshs b
  2865. cmpb #$08
  2866. bls L_F6FB
  2867. ldb #$08
  2868. L_F6FB jsr [<-4,x]
  2869. sta ,y+
  2870. puls b
  2871. subb #$08
  2872. bhi L_F6F3
  2873. L_F706 sty >$45a1
  2874. rts
  2875. ldb #$04
  2876. jsr [<-4,x]
  2877. lsra
  2878. lsra
  2879. lsra
  2880. ldy #$4581
  2881. ldy a,y
  2882. lda ,y+
  2883. inca
  2884. ldb ,y+
  2885. pshs a,b,x
  2886. ldb #$08
  2887. pshs b,y
  2888. ldy #$f5ca
  2889. ldx #$f554
  2890. pshs x,y
  2891. leax 4,s
  2892. jsr >$fbbf
  2893. leas 11,s
  2894. rts
  2895. ldb #$04
  2896. jsr [<-4,x]
  2897. lsra
  2898. lsra
  2899. lsra
  2900. ldy #$4561
  2901. leay a,y
  2902. ldb #$10
  2903. jsr [<-4,x]
  2904. std ,y
  2905. rts
  2906. ldx #$44c1
  2907. L_F74F ldd ,x
  2908. std 2,x
  2909. ldd #$0000
  2910. std 5,x
  2911. leax 10,x
  2912. cmpx #$4561
  2913. bcs L_F74F
  2914. rts
  2915. leas ,u
  2916. puls x,u,pc
  2917. ldx >$4662
  2918. ldy #$f792
  2919. ldb #$12
  2920. L_F76D lda ,y+
  2921. sta ,x+
  2922. decb
  2923. bne L_F76D
  2924. cmpx #$3b2c
  2925. bcs L_F77C
  2926. ldx #$39e8
  2927. L_F77C ldy #$44c9
  2928. ldb #$10
  2929. L_F782 stx ,y
  2930. leay 10,y
  2931. decb
  2932. bne L_F782
  2933. L_F789 cmpx >$4664
  2934. beq L_F789
  2935. stx >$4662
  2936. rts
  2937. andb #$00
  2938. neg <$00
  2939. neg <$00
  2940. neg <$00
  2941. neg <$00
  2942. neg <$00
  2943. neg <$ff
  2944. neg <$00
  2945. neg <$00
  2946. ldb #$04
  2947. jsr [<-4,x]
  2948. lsra
  2949. lsra
  2950. lsra
  2951. lsra
  2952. inca
  2953. ldy >$465b
  2954. pshs y
  2955. ldy #$44c1
  2956. L_F7B8 lsl 1,s
  2957. rol ,s
  2958. bcc L_F7C0
  2959. bsr L_F7CE
  2960. L_F7C0 leay 10,y
  2961. cmpy #$4561
  2962. bcs L_F7B8
  2963. jsr >$f8e5
  2964. leas 2,s
  2965. rts
  2966. L_F7CE pshs a,b,x
  2967. clra
  2968. pshs a
  2969. ldd 5,y
  2970. subd 2,y
  2971. bpl L_F7E0
  2972. com ,s
  2973. comb
  2974. coma
  2975. addd #$0001
  2976. L_F7E0 std 5,y
  2977. lda 1,s
  2978. deca
  2979. beq L_F809
  2980. deca
  2981. lsla
  2982. leax >L_F816,pcr
  2983. leax a,x
  2984. lda 5,y
  2985. ldb ,x
  2986. mul
  2987. pshs a,b
  2988. lda 5,y
  2989. ldb 1,x
  2990. mul
  2991. pshs a,b
  2992. lda 6,y
  2993. ldb ,x
  2994. mul
  2995. addd ,s++
  2996. tfr a,b
  2997. clra
  2998. addd ,s++
  2999. L_F809 tst ,s+
  3000. bpl L_F812
  3001. coma
  3002. comb
  3003. addd #$0001
  3004. L_F812 std 5,y
  3005. puls a,b,x,pc
  3006. L_F816 suba #$00
  3007. fcb $55 ; lsrb
  3008. fcb $55 ; lsrb
  3009. nega
  3010. neg <$33
  3011. leau 10,y
  3012. adda 4,y
  3013. sbca <$20
  3014. neg <$1c
  3015. fcb $72,$19,$9a ; negcom >$199a
  3016. lbsr L_3E40
  3017. fcb $55 ; lsrb
  3018. sync
  3019. cmpa >$1249
  3020. fcb $11,$11
  3021. fcb $10,$00
  3022. rts
  3023. ldb #$02
  3024. jsr [<-4,x]
  3025. lsla
  3026. rola
  3027. rola
  3028. cmpa #$02
  3029. bcc L_F84B
  3030. lsla
  3031. ldx #$442b
  3032. ldx a,x
  3033. stx >0,u
  3034. L_F84B rts
  3035. ldb #$04
  3036. jsr [<-4,x]
  3037. lsra
  3038. lsra
  3039. lsra
  3040. ldx #$4561
  3041. ldx a,x
  3042. stx >$465d
  3043. rts
  3044. ldb #$04
  3045. jsr [<-4,x]
  3046. lsra
  3047. lsra
  3048. lsra
  3049. ldx #$4561
  3050. ldx a,x
  3051. stx >$465b
  3052. rts
  3053. pshs u
  3054. lda #$04
  3055. ldb #$00
  3056. bra L_F884
  3057. pshs u
  3058. lda #$04
  3059. ldb #$02
  3060. bra L_F884
  3061. pshs u
  3062. lda #$07
  3063. ldb #$05
  3064. L_F884 ldy #$0000
  3065. bra L_F899
  3066. pshs u
  3067. lda #$04
  3068. bra L_F894
  3069. pshs u
  3070. lda #$07
  3071. L_F894 ldy #$ffff
  3072. clrb
  3073. L_F899 pshs y
  3074. pshs a,b
  3075. lda #$10
  3076. pshs a
  3077. ldd >$465b
  3078. pshs a,b
  3079. ldy #$44c1
  3080. L_F8AA lsl 1,s
  3081. rol ,s
  3082. bcc L_F8D0
  3083. tst 5,s
  3084. bne L_F8C3
  3085. ldb 3,s
  3086. ldb b,y
  3087. jsr [<-4,x]
  3088. tfr d,u
  3089. ldb 4,s
  3090. stu b,y
  3091. bra L_F8D0
  3092. L_F8C3 ldb #$04
  3093. jsr [<-4,x]
  3094. lsra
  3095. lsra
  3096. lsra
  3097. lsra
  3098. ldb 3,s
  3099. sta b,y
  3100. L_F8D0 leay 10,y
  3101. dec 2,s
  3102. bne L_F8AA
  3103. leas 7,s
  3104. puls u
  3105. rts
  3106. ldb #$04
  3107. jsr [<-4,x]
  3108. lsra
  3109. lsra
  3110. lsra
  3111. lsra
  3112. inca
  3113. pshs a,u
  3114. L_F8E7 ldu >$465b
  3115. ldb #$02
  3116. lbsr L_FA61
  3117. deca
  3118. bne L_F8E7
  3119. ldx >$4662
  3120. L_F8F5 ldd $10,x
  3121. anda >$465d
  3122. andb >$465e
  3123. cmpd >$465d
  3124. bne L_F95F
  3125. ldd $10,x
  3126. coma
  3127. comb
  3128. tfr d,u
  3129. ldb #$00
  3130. lbsr L_FA61
  3131. lda 11,x
  3132. tfr a,b
  3133. anda #$70
  3134. andb #$07
  3135. addb >$4661
  3136. bge L_F920
  3137. clrb
  3138. bra L_F926
  3139. L_F920 cmpb #$05
  3140. ble L_F926
  3141. ldb #$05
  3142. L_F926 pshs b
  3143. ora ,s+
  3144. sta 11,x
  3145. leay >zb_001,pcr
  3146. clra
  3147. ldb 13,x
  3148. lda d,y
  3149. adda 12,x
  3150. bge L_F93C
  3151. clra
  3152. bra L_F940
  3153. L_F93C bvc L_F940
  3154. lda #$7f
  3155. L_F940 sta 12,x
  3156. ldd #$0000
  3157. std $10,x
  3158. leax $12,x
  3159. cmpx #$3b2c
  3160. bcs L_F953
  3161. ldx #$39e8
  3162. L_F953 cmpx >$4664
  3163. beq L_F953
  3164. stx >$4662
  3165. dec ,s
  3166. bne L_F8F5
  3167. L_F95F puls a,u,pc
  3168. zb_001 fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3169. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3170. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3171. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3172. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3173. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3174. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3175. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3176. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3177. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3178. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3179. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3180. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3181. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3182. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3183. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3184. L_FA61 fcb $34
  3185. ror >$4f8e
  3186. suba #$00
  3187. pshs a,x
  3188. ldy #$44c1
  3189. L_FA6D lsl 10,s
  3190. rol 9,s
  3191. bcc L_FABE
  3192. ldx 8,y
  3193. ldb 4,s
  3194. ldb b,y
  3195. lda ,s
  3196. bne L_FA83
  3197. lsrb
  3198. lsr a,x
  3199. rolb
  3200. bra L_FA94
  3201. L_FA83 cmpa #$0a
  3202. bne L_FA94
  3203. ldb 4,s
  3204. ldd b,y
  3205. lsr ,x
  3206. lslb
  3207. rol ,x
  3208. tfr a,b
  3209. lda ,s
  3210. L_FA94 stb a,x
  3211. ldb 4,s
  3212. cmpb #$00
  3213. beq L_FAAC
  3214. ldd 2,y
  3215. addd 5,y
  3216. std 2,y
  3217. ldd $10,x
  3218. ora 1,s
  3219. orb 2,s
  3220. std $10,x
  3221. L_FAAC leax $12,x
  3222. cmpx #$3b2c
  3223. bcs L_FAB7
  3224. ldx #$39e8
  3225. L_FAB7 cmpx >$4664
  3226. beq L_FAB7
  3227. stx 8,y
  3228. L_FABE leay 10,y
  3229. inc ,s
  3230. lsr 1,s
  3231. ror 2,s
  3232. lbcc L_FA6D
  3233. leas 3,s
  3234. puls a,b,x,y,u,pc
  3235. L_FACE ldx #$fdb1
  3236. jsr >$e685
  3237. bcc L_FAD8
  3238. bra L_FACE
  3239. L_FAD8 rts
  3240. lda >$03f7
  3241. anda ,y
  3242. cmpx #$03f8
  3243. inca
  3244. com <$f7
  3245. fcb $60,$00 ; neg 0,x
  3246. eorb >$35fb
  3247. lbsr zb_002
  3248. adda #$03
  3249. eorb >$9003
  3250. orb >$ce03
  3251. eorb >$3403
  3252. ldb >$9103
  3253. stb >$3600
  3254. addb >$17f8
  3255. jmp 3,x
  3256. eorb >$5d03
  3257. eorb >$7603
  3258. eorb >$8a00
  3259. stb >$64f7
  3260. inca
  3261. com <$f7
  3262. fcb $0b,$00 ; dec <$00
  3263. eorb >$dbf8
  3264. jmp >$6e9f
  3265. su_fb19 rora
  3266. lsrb
  3267. su_fb1b pshs cc
  3268. orcc #$10
  3269. lda #$02
  3270. ora >$393a
  3271. sta >$393a
  3272. lda #$80
  3273. anda >$393a
  3274. beq L_FB3C
  3275. lda #$fd
  3276. anda >$393a
  3277. sta >$393a
  3278. puls cc
  3279. jsr >$f606
  3280. rts
  3281. L_FB3C puls cc
  3282. lda #$04
  3283. anda >$393a
  3284. beq L_FB47
  3285. bra L_FB5A
  3286. L_FB47 lda #$04
  3287. ora >$393a
  3288. sta >$393a
  3289. ldx >$4662
  3290. cmpx >$4664
  3291. bne L_FB5A
  3292. jsr >$f496
  3293. L_FB5A ldx >$4659
  3294. jsr >$fbf0
  3295. bra L_FBA6
  3296. pshs cc
  3297. orcc #$10
  3298. lda #$02
  3299. ora >$393a
  3300. sta >$393a
  3301. lda #$80
  3302. anda >$393a
  3303. beq L_FB83
  3304. lda #$fd
  3305. anda >$393a
  3306. sta >$393a
  3307. puls cc
  3308. jsr >$f66f
  3309. rts
  3310. L_FB83 puls cc
  3311. lda #$04
  3312. anda >$393a
  3313. beq L_FB8E
  3314. bra L_FBA1
  3315. L_FB8E lda #$04
  3316. ora >$393a
  3317. sta >$393a
  3318. ldx >$4662
  3319. cmpx >$4664
  3320. bne L_FBA1
  3321. jsr >$f496
  3322. L_FBA1 ldx #$4438
  3323. bsr L_FBBF
  3324. L_FBA6 lda #$fd
  3325. anda >$393a
  3326. sta >$393a
  3327. ldx >$4662
  3328. cmpx >$4664
  3329. bne L_FBBE
  3330. lda #$fb
  3331. anda >$393a
  3332. sta >$393a
  3333. L_FBBE rts
  3334. L_FBBF pshs x,u
  3335. leau ,s
  3336. L_FBC3 ldx ,u
  3337. ldy #$fad9
  3338. bsr L_FBCF
  3339. jsr ,y
  3340. bra L_FBC3
  3341. L_FBCF pshs a,b
  3342. L_FBD1 jsr [<-2,x]
  3343. ldb ,y
  3344. bcc L_FBE3
  3345. bpl L_FBDE
  3346. leay 1,y
  3347. bra L_FBD1
  3348. L_FBDE ldy 1,y
  3349. puls a,b,pc
  3350. L_FBE3 andb #$7f
  3351. beq L_FBEB
  3352. leay b,y
  3353. bra L_FBD1
  3354. L_FBEB ldy 3,y
  3355. puls a,b,pc
  3356. clra
  3357. ldb ,x+
  3358. pshs a,b
  3359. ldb #$08
  3360. pshs b,x
  3361. ldy #$f5d0
  3362. ldx #$fc0a
  3363. pshs x,y
  3364. leax 4,s
  3365. jsr >L_FBBF
  3366. leas 9,s
  3367. rts
  3368. pshs y,u
  3369. clra
  3370. cmpb #$08
  3371. bgt L_FC27
  3372. ldu #$f519
  3373. leau b,u
  3374. L_FC16 dec ,x
  3375. bge L_FC1F
  3376. jsr >L_F5DB
  3377. bra L_FC21
  3378. L_FC1F lsl 4,x
  3379. L_FC21 rola
  3380. decb
  3381. bne L_FC16
  3382. jmp ,u
  3383. L_FC27 tfr d,y
  3384. subb #$08
  3385. lslb
  3386. ldu #$f523
  3387. leau b,u
  3388. clrb
  3389. L_FC32 dec ,x
  3390. bge L_FC3B
  3391. jsr >L_F5DB
  3392. bra L_FC3D
  3393. L_FC3B lsl 4,x
  3394. L_FC3D rolb
  3395. rola
  3396. leay -1,y
  3397. bne L_FC32
  3398. jmp ,u
  3399. suba ,x++
  3400. anda #$ce
  3401. suba #$4d
  3402. bne L_FCA4
  3403. bita <$04
  3404. inca
  3405. bne L_FCC6
  3406. fcb $02,$49 ; negcom <$49
  3407. fcb $31,$bc,$68 ; leay [<$fcbf,pcr]
  3408. bcc L_FC89
  3409. sbcb #$20
  3410. fcb $01,$41 ; neg <$41
  3411. leay -10,x
  3412. leay 5,x
  3413. fcb $05,$04 ; lsr <$04
  3414. suba #$00
  3415. dec 10,x
  3416. bita #$80
  3417. dec 11,x
  3418. jmp <$34
  3419. neg <$01
  3420. bita #$05
  3421. bitb #$5a
  3422. suba #$61
  3423. fcb $41 ; nega
  3424. cmpa #$79
  3425. fcb $ad,$ea ; jsr
  3426. lsrb
  3427. lsl <$7f
  3428. stu >$d022
  3429. com <$d1
  3430. nega
  3431. subd <$ff
  3432. fcb $65,$02 ; lsr 2,x
  3433. neg 2,x
  3434. L_FC89 fcb $14 ; hcf
  3435. dec <$80
  3436. neg <$48
  3437. L_FC8E coma
  3438. fcb $02,$22 ; negcom <$22
  3439. bhi L_FCB5
  3440. bhi L_FCC5
  3441. leax -15,y
  3442. nega
  3443. daa
  3444. neg <$02
  3445. fcb $41 ; nega
  3446. eorb >$224a
  3447. fcb $14 ; hcf
  3448. fcb $45 ; lsra
  3449. ror 6,s
  3450. L_FCA3 lsl >$988a
  3451. L_FCA4 equ L_FCA3+1
  3452. fcb $51 ; negb
  3453. fcb $15 ; hcf
  3454. adca <$99
  3455. sbcb 2,s
  3456. bmi L_FCF6
  3457. lsra
  3458. coma
  3459. asr <$e1
  3460. fcb $5b ; decb
  3461. sta <$a1
  3462. L_FCB5 adcb 6,s
  3463. ora #$7a
  3464. anda #$50
  3465. bita #$2a
  3466. sbca #$e4
  3467. std <$68
  3468. fcb $cd ; hcf
  3469. L_FCC2 lsrb
  3470. fcb $02,$29 ; negcom <$29
  3471. L_FCC5 fcb $87,$93 ; discarda #$93
  3472. L_FCC6 equ L_FCC5+1
  3473. ldb >$445a
  3474. addd >$a193
  3475. fcb $51 ; negb
  3476. comb
  3477. eorb #$a6
  3478. ora #$3e
  3479. clr >$cbb2
  3480. jmp a,y
  3481. lsra
  3482. suba 9,x
  3483. bsr L_FCED
  3484. bgt L_FD19
  3485. stx <$68
  3486. jsr <$8c
  3487. adcb #$4f
  3488. bhi L_FC8E
  3489. eorb >$3c73
  3490. pshu b,x,s,pc
  3491. abx
  3492. L_FCED ora <$1a
  3493. ldx <$27
  3494. bmi L_FCC2
  3495. cmpx >$d037
  3496. L_FCF6 cmpx #$5e37
  3497. L_FCF7 equ L_FCF6+1
  3498. fcb $45 ; lsra
  3499. cwai #$54
  3500. lsl ,-x
  3501. fcb $e9,$cc,$23 ; adcb <$fd24,pcr
  3502. ora <$dc
  3503. lsr >$4a78
  3504. bvs L_FD0A
  3505. L_FD08 addd #$bf6f
  3506. L_FD0A equ L_FD08+2
  3507. eorb -11,u
  3508. bita 1,x
  3509. anda <$fd
  3510. orcc #$08
  3511. lbra L_0AA4
  3512. jsr >$0ae2
  3513. L_FD19 leay $f834,y
  3514. nop
  3515. bvc L_FD5A
  3516. clr >$7955
  3517. lsra
  3518. anda #$53
  3519. andb >$a79e
  3520. asr [,y]
  3521. lsr <$7b
  3522. dec 8,u
  3523. lda [a,y]
  3524. eorb 12,u
  3525. mul
  3526. neg <$27
  3527. ldd >$6211
  3528. cmpb <$06
  3529. tst <$40
  3530. tst -12,y
  3531. bne L_FCF7
  3532. rora
  3533. comb
  3534. beq L_FD91
  3535. lda #$80
  3536. anda >$4653
  3537. beq L_FD69
  3538. ldy >$4656
  3539. ldb -8,y
  3540. subb -9,y
  3541. decb
  3542. andb -6,y
  3543. cmpb >$4658
  3544. L_FD5A bls L_FD69
  3545. lda #$0b
  3546. jsr >$e1df
  3547. lda #$7f
  3548. anda >$4653
  3549. sta >$4653
  3550. L_FD69 lda #$40
  3551. anda >$4653
  3552. beq L_FD7D
  3553. lda #$bf
  3554. anda >$4653
  3555. sta >$4653
  3556. lda #$1a
  3557. jsr >$e1df
  3558. L_FD7D lda #$20
  3559. anda >$4653
  3560. beq L_FD91
  3561. lda #$df
  3562. anda >$4653
  3563. sta >$4653
  3564. lda #$0a
  3565. jsr >$e1df
  3566. L_FD91 puls a,b,y,pc
  3567. pshs a
  3568. lda >$4661
  3569. cmpa #$07
  3570. bge L_FDA0
  3571. inca
  3572. sta >$4661
  3573. L_FDA0 puls a,pc
  3574. pshs a
  3575. lda >$4661
  3576. cmpa #$f9
  3577. ble L_FDAF
  3578. deca
  3579. sta >$4661
  3580. L_FDAF puls a,pc
  3581. pshs a,y
  3582. lda #$40
  3583. ora >$4653
  3584. sta >$4653
  3585. ldy #dev_02_0
  3586. lda ,y
  3587. bita #$40
  3588. bne L_FDDA
  3589. lda #$25
  3590. sta 1,y
  3591. clra
  3592. sta 2,y
  3593. L_FDCC lda ,y
  3594. bmi L_FDCC
  3595. lda #$40
  3596. sta ,y
  3597. L_FDD4 lda ,y
  3598. bita #$40
  3599. beq L_FDD4
  3600. L_FDDA lda #$00
  3601. sta ,y
  3602. L_FDDE lda ,y
  3603. bita #$40
  3604. bne L_FDDE
  3605. lda #$64
  3606. sta ,y
  3607. L_FDE8 lda ,y
  3608. bita #$40
  3609. beq L_FDE8
  3610. clra
  3611. sta >$465f
  3612. sta >$4660
  3613. ldy #$fe01
  3614. sty >dp_base
  3615. andcc #$bf
  3616. puls a,y,pc
  3617. pshs a,b,x,y,u
  3618. ldu #dev_02_0
  3619. lda ,u
  3620. bita #$20
  3621. lbeq L_FED4
  3622. ldy >$4664
  3623. cmpy >$4662
  3624. lbeq L_FED4
  3625. lda ,y
  3626. leax 2,u
  3627. bita #$01
  3628. beq L_FE24
  3629. leax 1,x
  3630. L_FE24 ldb #$0d
  3631. stb 1,u
  3632. stb ,x
  3633. L_FE2A ldb ,u
  3634. bmi L_FE2A
  3635. ldb #$00
  3636. stb 1,u
  3637. ldy >$4664
  3638. leay 1,y
  3639. lda >$4660
  3640. lsra
  3641. beq L_FE41
  3642. L_FE3E deca
  3643. bpl L_FE3E
  3644. L_FE41 lda ,y+
  3645. sta 2,u
  3646. lda ,y+
  3647. sta 2,u
  3648. lda ,y+
  3649. sta 2,u
  3650. lda ,y+
  3651. sta 2,u
  3652. lda ,y+
  3653. sta 2,u
  3654. lda ,y+
  3655. sta 2,u
  3656. lda ,y+
  3657. sta 2,u
  3658. lda ,y+
  3659. sta 2,u
  3660. lda ,y+
  3661. sta 2,u
  3662. lda ,y+
  3663. sta ,x
  3664. ldd ,y++
  3665. sta ,x
  3666. L_FE6D lda ,u
  3667. bmi L_FE6D
  3668. stb ,x
  3669. ldb ,y+
  3670. L_FE75 lda ,u
  3671. bmi L_FE75
  3672. stb ,x
  3673. ldb ,y+
  3674. L_FE7D lda ,u
  3675. bmi L_FE7D
  3676. stb ,x
  3677. ldb ,y+
  3678. L_FE85 lda ,u
  3679. bmi L_FE85
  3680. stb ,x
  3681. L_FE8B lda ,u
  3682. bmi L_FE8B
  3683. lda >$465f
  3684. sta >$4660
  3685. stb >$465f
  3686. ldy >$4664
  3687. lda ,y
  3688. anda #$fc
  3689. sta ,u
  3690. leay $12,y
  3691. cmpy #$3b2c
  3692. bcs L_FEAF
  3693. ldy #$39e8
  3694. L_FEAF sty >$4664
  3695. bita #$80
  3696. beq L_FED4
  3697. lda #$20
  3698. ora >$4653
  3699. sta >$4653
  3700. lda #$02
  3701. anda >$393a
  3702. beq L_FEC8
  3703. bra L_FED1
  3704. L_FEC8 cmpy >$4662
  3705. bne L_FED1
  3706. clr >$393a
  3707. L_FED1 lbsr L_E69D
  3708. L_FED4 puls a,b,x,y,u
  3709. jmp >$e0eb
  3710. fcb $00,$00,$00,$00,$00,$00,$00
  3711. zzzz fcb $00,$00
  3712. zb_002 fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3713. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3714. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3715. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3716. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3717. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3718. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3719. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3720. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3721. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3722. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3723. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3724. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3725. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3726. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3727. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
  3728. fcb $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$8b
  3729. int_vect fdb $0000,$0000,$0000,l_firq,l_irq,$0000,$0000,l_reset
  3730. ==========================
  3731. Remember to correct the byte offsets, <$e9 to <-$17, and <$ee to <-$12, in 4 places, before assembling.
下載 Printable view

網址

Embed with JavaScript

Embed with iframe

Raw text