You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
817B

  1. IP=0 ;ZPAGE POINTER
  2. *=$F800
  3. START SEI
  4. LDY #0
  5. LDA #$20
  6. LOOP
  7. STA $8000,Y ;CLEAR SCREEN
  8. STA $8100,Y
  9. STA $8200,Y
  10. STA $8300,Y
  11. INY
  12. BNE LOOP
  13. CALC
  14. LDA #$B0 ;SET FOR $A SLOT
  15. STA IP+1
  16. LDA #0
  17. STA IP ;ZERO LO INDIRECT
  18. TAY
  19. LDX #16 ;16 PAGES IN 4K ROM
  20. CLC
  21. RT10 DEC IP+1 ;DO IT BACKWARDS
  22. RT20 ADC (IP),Y ;TOTAL CHECKSUM IN A
  23. INY
  24. BNE RT20
  25. DEX
  26. BNE RT10
  27. ADC #0 ;ADD IN LAST CARRY
  28. PHA
  29. AND #$F
  30. TAX
  31. LDA HEX,X
  32. STA $8029 ;POKE LOW NYBBLE
  33. PLA
  34. LSR A
  35. LSR A
  36. LSR A
  37. LSR A
  38. TAX
  39. LDA HEX,X
  40. STA $8028 ;POKE HIGH NYBBLE
  41. JSR WAIT
  42. LDA $8028
  43. EOR #$40
  44. STA $8028
  45. LDA $8029
  46. EOR #$40
  47. STA $8029
  48. JSR WAIT
  49. JMP CALC
  50. ;
  51. WAIT
  52. LDY #0
  53. W2
  54. LDX #0
  55. W3
  56. DEX
  57. BNE W3
  58. DEY
  59. BNE W2
  60. RTS
  61. HEX .BYTE '0123456789'
  62. .BYTE 1,2,3,4,5,6 ;SCREEN ALPHA
  63. *=$FFFC
  64. .WORD START
  65. .END