N Device Put Characters - FujiNetWIFI/fujinet-firmware GitHub Wiki

Description

Put at least one character to the destination socket. If ICBLL/ICBLH is more than 1, and a buffer is pointed to by ICBAL/ICBAH, then the contents of that buffer are flushed out the socket.

As a convenience, an EOL $9B is translated to a CR/LF ($0D/$0A).

Parameters

  • IOCB
  • ICBAL/ICBAH - Pointer to buffer, if sending more than one character.
  • ICBLL/ICBLH - Buffer length, if sending more than one character.

Returns

  • Standard CIO errors apply.

Examples

BASIC

Assuming a socket has been opened with the following command:

OPEN #1,12,0,"N:TCP:192.168.1.8"

You can send a single character, defined in A:

PUT #1,A

Or, you can send an entire line at once:

PRINT #1;"THIS IS A LINE OF TEXT"