SN8P2501D
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD Page 19 Version 1.5
2.1.5 CHECKSUM CALCULATION
The last ROM address are reserved area. User should avoid these addresses (last address) when calculate the
Checksum value.
Example: The demo program shows how to calculated Checksum from 00H to the end of user’s code.
; Save low end address to end_addr1
; Save middle end address to end_addr2
; Check if the YZ address = the end of code
; If Z != 00H calculate to next address
; Check if Z = low end address
; If Not jump to checksum calculate
; If Yes, check if Y = middle end address
; If Not jump to checksum calculate
; If Yes checksum calculated is done.
; Jump to checksum calculate