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.

chksum 407B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. .PAGE 'CHECKSUM'
  2. *=$005E
  3. TEMP *=*+2
  4. *=$0500
  5. CLD
  6. SEI
  7. LDA #0
  8. STA $1000
  9. CMP $1000
  10. CHKPRO
  11. BNE CHKPRO
  12. LDA #$10
  13. JSR CHKSUM
  14. STA $1000
  15. BRK
  16. LDA #0
  17. STA $3000
  18. CMP $3000
  19. BNE CHKPRO
  20. LDA #$30
  21. JSR CHKSUM
  22. STA $3000
  23. BRK
  24. CHKSUM
  25. CLC
  26. STA TEMP+1
  27. LDA #0
  28. STA TEMP
  29. LDX #32
  30. LDY #0
  31. CHK1
  32. ADC (TEMP)Y
  33. INY
  34. BNE CHK1
  35. INC TEMP+1
  36. DEX
  37. BNE CHK1
  38. ADC #0
  39. STA TEMP+1
  40. LDA #$C0
  41. SEC
  42. SBC TEMP+1
  43. SBC #0
  44. RTS
  45. .END