N: SIO Command 'W' Write - FujiNetWIFI/fujinet-firmware GitHub Wiki
SIO Command Write ($57) ['W']
This is a command for Devices $71-$78 - The N: Device (see SIO-Commands-for-Device-IDs-$71-to-$78).
Description
Write the requested number of bytes out to the protocol channel.
Parameters
ATARI
DCB | Value |
---|---|
DDEVIC | $71 |
DUNIT | $01 - $04 |
DCOMND | $57 'W' |
DSTATS | $80 |
DBUF | NULL |
DTIMLO | $0F |
DBYT | # of bytes to write |
DAUX1 | # of bytes to write LO |
DAUX2 | # of bytes to write HI |
ADAM
- Device 09 to 0C
- Use AdamNET Write (EOS WRITE CHARACTER DEVICE)
Byte | Description |
---|---|
0 | 'W' (the command byte) |
1-n | The bytes to write, maximum 1024. |
Examples
ATARI
CC65
if (xmit_buffer_len>0)
{
OS.dcb.ddevic=0x71;
OS.dcb.dunit=1;
OS.dcb.dcomnd='W';
OS.dcb.dstats=0x80;
OS.dcb.dbuf=&xmit_buffer;
OS.dcb.dtimlo=0x0f;
OS.dcb.dbyt=xmit_buffer_len;
OS.dcb.daux1=xmit_buffer_len;
OS.dcb.daux2=0;
siov();
xmit_buffer_len=0;
return;
}
ADAM
Z88DK C
/* This uses EOSLIB: http://github.com/tschak909/eoslib */
#define NET_DEV 0x09
const char *out="WHELLO WORLD!"; // Note the 'W' command byte.
void write_hello(void)
{
/* ASSUMES CHANNEL ALREADY OPEN */
eos_write_character_device(NET_DEV,out,sizeof(out));
}
See Also
Put other related command links here.