Handbook
Glossary
crc16-binhex ( bytes -- n )
Vocabulary
binhex
.
private
Inputs
bytes
an
object
Outputs
n
an
object
Definition
USING:
kernel
locals.backend
math
sequences
;
IN:
binhex.private
:
crc16-binhex
( bytes -- n )
0
[
load-local
8
<iota>
0
get-local
[
load-local
0
get-local
[
load-local
load-local
dup
15
bit?
-1
get-local
0
get-local
[
2
load-locals
2
*
65535
bitand
-1
get-local
7 0
get-local
-
bit?
[
1
+
]
when
2
drop-locals
]
curry
curry
[
[
4129
bitxor
]
when
]
bi*
2
drop-locals
]
curry
call
1
drop-locals
]
curry
each
1
drop-locals
]
reduce
16
[
dup
15
bit?
[
2
*
65535
bitand
]
[
[
4129
bitxor
]
when
]
bi*
]
times
;