-
Notifications
You must be signed in to change notification settings - Fork 78
N: SIO Command 'S' Status
Bill Kendrick edited this page May 27, 2022
·
3 revisions
This is a command for Devices $71-$78 - The N: Device (see SIO-Commands-for-Device-IDs-$71-to-$78).
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)
| 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 |
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 |
// 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];/* 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;
}Put other related command links here.
Copyright 2024 Contributors to the FujiNetWIFI project.
Join us on Discord: https://discord.gg/7MfFTvD
- 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 - SIO Command $DC Open App Key
- CP-M Support
- BBS
- Official Hardware Versions
- Prototype Board Revisions
- FujiNet Development Guidelines
- Atari Programming
- Apple Programming
- C64 Programming
- ADAM Programming
- Testing Plan
- Hacker List
- FujiNet VirtualMachine