Advertisement
Guest User

New Checksum Check

a guest
Nov 29th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ChecksumCheck:
  2.         xref    Checksum
  3.         moveq   #0,d0           ; clear checksum cnt
  4.         lea     $200.w,a0       ; check from $200 until ROM's end
  5.         move.w  #((((ROMSz*$100000)-$200)/2)/2/4/8)-1,d7
  6.  
  7. .loop   rept    2*4*8           ; do =$80 bytes per loop
  8.         add.w   (a0)+,d0        ; add word to checksum cnt
  9.         endr
  10.         dbf     d7,.loop
  11.         cmp.w   Checksum.w,d0   ; does result match to expected checksum?
  12.         beq.s   .0              ; if yes, branch
  13.  
  14. .ChecksumError:
  15.         move.l  #$C0000000,vdp_control_port
  16.         move.w  #cRed,vdp_data_port
  17.         bra     *
  18. .0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement