Calculating a Checksum
The following BASIC program can be used to determine the checksum for a line of data:
10 CHKSUM% = 0
20 TRANSACTION$ = “LINE OF DATA 0123456789”
30 NUMCHARS% = LEN (TRANSACTION$)
40 FOR INDEX% = 1 TO NUMCHARS%
50 SINGLECHAR$=MID$ (TRANSACTION$, INDEX%, 1)
60 CHKSUM% = CHKSUM% + ASC (SINGLECHAR$)
70 NEXT INDEX%
80 TEMP$ = STR$ (CHKSUM%)
90 TEMP$ = RIGHT$ (TEMP$,2)
100 PRINT TEMP$
110 END
ASCII Character Table
Decimal
Value
ASCII
Char
Decimal
Value
ASCII
Char
Decimal
Value
ASCII
Char
Decimal
Value
ASCII
Char
032
space
056
8
080
P
104
h
033
!
057
9
081
Q
105
i
034
"
058
:
082
R
106
j
035
#
059
;
083
S
107
k
036
$
060
<
084
T
108
l
037
%
061
=
085
U
109
m
038
&
062
>
086
V
110
n
039
'
063
?
087
W
111
o
040
(
064
@
088
X
112
p
041
)
065
A
089
Y
113
q
042
*
066
B
090
Z
114
r
043
+
067
C
091
[
115
s
044
,
068
D
092
\
116
t
045
-
069
E
093
]
117
u
046
.
070
F
094
^
118
v
047
/
071
G
095
_
119
w
048
0
072
H
096
'
120
x
049
1
073
I
097
a
121
y
050
2
074
J
098
b
122
z
051
3
075
K
099
c
123
{
052
4
076
L
100
d
124
|
Doc. No.: M00-051.00 Rev.: 10
Page 173 of 181
Содержание M00-051.00 FSC3000
Страница 60: ...Doc No M00 051 00 Rev 10 Page 60 of 181...
Страница 63: ...Doc No M00 051 00 Rev 10 Page 63 of 181...
Страница 69: ...Doc No M00 051 00 Rev 10 Page 69 of 181...
Страница 99: ...Doc No M00 051 00 Rev 10 Page 99 of 181...
Страница 105: ...CFN Product Codes Code Description 96 WASHROOM FACILITIES 97 LODGING Doc No M00 051 00 Rev 10 Page 105 of 181...
Страница 129: ...Petrol Training Screens Doc No M00 051 00 Rev 10 Page 129 of 181...
Страница 130: ...CNG Training Screens Doc No M00 051 00 Rev 10 Page 130 of 181...
Страница 133: ...034 ULS Premium Diesel 010 Bio Diesel2 011 Bio Diesel5 012 Bio Diesel10 Doc No M00 051 00 Rev 10 Page 133 of 181...
Страница 181: ......