Handbook
Glossary
factorcode.org
h>b/b ( h -- b1 b2 )
Factor handbook
»
Input and output
»
Working with binary data
Prev:
w>h/h ( w -- h1 h2 )
Vocabulary
io.binary
Inputs
h
a 16-bit integer
Outputs
b1
an 8-bit integer
b2
an 8-bit integer
Word description
Outputs two integers, the least followed by the most significant 8 bits of the input.
Definition
USING:
kernel
math
;
IN:
io.binary
:
h>b/b
( h -- b1 b2 )
[
mask-byte
]
[
-8
shift
mask-byte
]
bi
;