;This Intel(r) Pentium(r) code calculates a simple CRC by ;successively XOR-ing all data within the specified block ;following parameters assumed to be passed ; EBP = Start Address of Data Block ; EDI = Address of last Word to be checked (End address minus 4 bytes) ;other registers used during algorithm: ; EAX = Calculated CRC returned ; ECX =transfer register ; EBX =address increment (flash bus width in bytes) .386P CODE_SEG SEGMENT USE32 ASSUME CS:CODE_SEG,DS:CODE_SEG ;setup usercode breakpoint BreakPoint: JMP BreakPoint ;set address increment to be 4 (4 bytes bus width) MOV EBX, 4 XOR EAX, EAX ;copy from source location and calculate CRC by XOR Loops: MOV ECX, [EBP] XOR EAX, ECX ADD EBP, EBX CMP EDI, EBP JGE Loops JMP BreakPoint ;****************************************************** ;CODE ENDS HERE. ;****************************************************** CODE_SEG ENDS END BreakPoint