Handbook
Glossary
port-write ( src n-remaining port n-write -- )
Vocabulary
io
.
ports
.
private
Inputs
src
an
object
n-remaining
an
object
port
an
object
n-write
an
object
Outputs
None
Definition
USING:
accessors
alien
io.buffers
io.ports
kernel
math
math.order
math.private
;
IN:
io.ports.private
::
port-write
( src n-remaining port n-write -- )
port
buffer>>
:>
buffer n-remaining buffer
size>>
min
:>
n-chunk n-chunk port
wait-to-write
n-write src
>c-ptr
<displaced-alien>
n-chunk buffer
buffer-write
n-remaining n-chunk
fixnum-fast
dup
0
>
[
src
swap
port n-write n-chunk
fixnum+fast
port-write
]
[
drop
]
if
;
inline
recursive