![Motorola MVME6100 Скачать руководство пользователя страница 57](http://html.mh-extra.com/html/motorola/mvme6100/mvme6100_installation-and-use-manual_245424057.webp)
3-24
Computer Group Literature Center Web Site
MOTLoad Firmware
3
Checksum Algorithm
The checksum algorithm is a simple unsigned word add of each word (4
byte) location in the image. The image must be a multiple of 4 bytes in
length (word-aligned). The content of the checksum location in the header
is not part of the checksum calculation. The calculation assumes the
location to be zero. The algorithm is implemented using the following
code:
Unsigned int checksum(
Unsigned int *startPtr, /* starting address */
Unsigned int endPtr
/* ending address */
) {
unsigned int checksum=0;
while (startPtr < endPtr) {
ch= *startPtr;
s+;
}
return(checksum);
}
MOTLoad Image Flags
The image flags of the header define various bit options that control how
the image will be executed.
Table 3-2. MOTLoad Image Flags
Name
Value
Interpretation
COPY_TO_RAM
0x00000001
Copy image to RAM at ImageRamAddress
before execution
IMAGE_MCG
0x00000002
MCG-specific image
IMAGE_POST
0x00000004
POST image
DONT_AUTO_RUN
0x00000008
Image not to be executed