SIO Command Status ($53) ['S']
This is a command for Devices $71-$78 - The N: Device (see SIO-Commands-for-Device-IDs-$71-to-$78).
Description
For Atari, Return the status of the currently opened protocol channel, in the following format:
| Offset | Description |
|---|---|
| 0 | LO Byte of # of bytes waiting |
| 1 | HI Byte of # of bytes waiting |
| 2 | 0=Disconnected, 1=Connected |
| 3 | Extended Error code |
It is expected that the buffer point to the DVSTAT location in the OS ($02EA)
Parameters
| DCB | Value |
|---|---|
| DDEVIC | $71 |
| DUNIT | $01 - $04 |
| DCOMND | $53 'S' |
| DSTATS | $40 |
| DBUF | DVSTAT |
| DTIMLO | $0F |
| DBYT | 4 |
| DAUX1 | N: Status DAUX1 Values |
| DAUX2 | N: Status DAUX2 Values |
Coleco Adam Implementation
AdamNet has a specific STATUS command (which can be retrieved using the EOS REQUEST STATUS and EOS GET STATUS BYTE commands), this is used to return a bit field
| bit # | Description |
|---|---|
| 0 | Client has data available |
| 1 | Client is connected |
| 2 | Client has an error |
| 3 | Server connection available (client is waiting) |
| 4 | Server error |
| 5 | NOT USED |
| 6 | NOT USED |
| 7 | NOT USED |
Examples
Atari BASIC
REM Request Status (CMD 83 'S')
XIO 13,#1,0,0,"N:"
REM Read DVSTAT results from OS variables 746-749 ($02EA)
BW = PEEK(746) + PEEK(747)*256
CONNECTED = PEEK(748)
ERROR = PEEK(749)
PRINT "BYTES WAITING: ";BW
PRINT "CONNECTED: ";CONNECTED
ATARI
CC65
// Get # of bytes waiting
OS.dcb.ddevic=0x71;
OS.dcb.dunit=1;
OS.dcb.dcomnd='S';
OS.dcb.dstats=0x40;
OS.dcb.dbuf=&status;
OS.dcb.dtimlo=0x0f;
OS.dcb.dbyt=4;
OS.dcb.daux=0;
siov();
bw=(status[1]<<8)+status[0];
connected=status[2];
ADAM
Z88DK C
/* THIS USES EOSLIB: http://github.com/tschak909/eoslib */
#define NET 0x09
#define ACK 0x80
#define CONNECTED 2 /* second bit */
bool connected(void)
{
DCB *dcb;
while (eos_request_device_status(NET,dcb) < ACK);
return eos_get_device_status(NET) & CONNECTED;
}
See Also
Put other related command links here.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
- Home
- What is FujiNet?
- The Definition of Done
- Board bring up for FujiNet Platform.IO code
- The Complete Linux CLI Guide
- The Complete macOS CLI Guide
- Development Env for Apps
- FujiNet-Development-Guidelines
- System Quickstarts
- FujiNet Flasher
- Setting up a TNFS Server
- FujiNet Configuration File: fnconfig.ini
- AppKey Registry - AppKey-Registry-Page
- CP-M Support
- BBS
- Official Hardware Versions
- Prototype Board Revisions
- FujiNet Development Guidelines
- The Network Protocol Handbook
- Atari Programming
- Apple Programming
- C64 Programming
- ADAM Programming
- Intellivision Programming
- Testing Plan
- Hacker List
- FujiNet VirtualMachine
Copyright 2026 Contributors to the FujiNetWIFI project.
Join us on Discord: https://discord.gg/7MfFTvD