17.08.2013 Views

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

Contents, cont'd. - Intermec

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CSUM<br />

Chapter 2 Program Instructions<br />

Field of Application Statement calculating the checksum of an array of strings.<br />

Syntax CSUM,,<br />

is the type of checksum calculation:<br />

1: Longitudinal redundancy check (LRC)<br />

2: Diagonal redundancy check (DRC)<br />

is the array of strings of which the checksum is to be<br />

calculated.<br />

is the variable in which the result will be presented.<br />

Remarks These types of checksum calculation can only be used for string arrays, not<br />

for numeric arrays.<br />

LRC:<br />

The even parity of all character bits in the array columnwise.<br />

Algorithm: LRC = LRC XOR (next character)<br />

(Initial value of LRC is 1:st character in the array.)<br />

DRC:<br />

The even parity of all character bits in the array diagonally.<br />

Algorithm: DRC = (Rotate Right DRC) XOR (next character)<br />

(Initial value of DRC is 1:st character in the array.)<br />

Example In this example, the DRC checksum of an array of strings is calculated:<br />

10 ARRAY$(0)="ALPHA"<br />

20 ARRAY$(1)="BETA"<br />

30 ARRAY$(2)="GAMMA"<br />

40 ARRAY$(3)="DELTA"<br />

50 CSUM 2,ARRAY$,B%<br />

60<br />

RUN<br />

PRINT B% :REM DRC CHECKSUM<br />

yields:<br />

252<br />

<strong>Intermec</strong> Fingerprint 7.2 – Reference Manual Ed. 3 52

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!