-
Notifications
You must be signed in to change notification settings - Fork 69
N: SIO Command $FF Query for Special Command DSTATS
Bill Kendrick edited this page May 27, 2022
·
2 revisions
This is a command for Devices $71-$78 - The N: Device (see SIO-Commands-for-Device-IDs-$71-to-$78).
This command is specifically for the implementation of CIO and other DOS level handlers (e.g. SpartaDOS X Kernel Drivers), to carry back specifics of a given SPECIAL SIO command. This is currently the DSTATS value (indicating read and write), since it is assumed any special commands utilize a 256 byte buffer, unless the DSTATS=0. If The value returned here is $FF, then the command is invalid, and the handler should react appropriately.
DCB | Value |
---|---|
DDEVIC | $71 |
DUNIT | $01 - $04 |
DCOMND | $FF |
DSTATS | $40 |
DBUF | 1 byte buffer for holding DSTATS value, e.g. DSTATS |
DTIMLO | $0F |
DBYT | 1 |
DAUX1 | Special SIO Command to ask about |
DAUX2 | 0 |
SPEC .proc
; HANDLE LOCAL COMMANDS.
LDA ZICCOM
CMP #$0F ; 15 = FLUSH
BNE L1 ; NO.
JSR PFLUSH ; DO FLUSH
LDY #$01 ; SUCCESS
RTS
; HANDLE SIO COMMANDS.
; GET DSTATS FOR COMMAND
L1 LDA #DEVIDN ; $71
STA DDEVIC
LDA ZICDNO ; UNIT #
STA DUNIT
LDA #$FF ; DS INQ
STA DCOMND
LDA #DSREAD
STA DSTATS
LDA #<INQDS
STA DBUFL
LDA #>INQDS
STA DBUFH
LDA #$01
STA DBYTL
LDA #$00
STA DBYTH
STA DAUXH
LDA #$0F
STA DTIMLO
LDA ZICCOM
STA DAUXL
JSR SIOV ; DO IT...
LDA DSTATS
BPL DSOK
DSERR TAY ; RET THE ERR
RTS
; WE GOT A DSTATS INQUIRY
; IF $FF, THE COMMAND IS
; INVALID
DSOK LDA INQDS
CMP #$FF ; INVALID?
BNE DSGO ; DO THE CMD
LDY #$92 ; UNIMP CMD
TYA
RTS
DSGO LDA #DEVIDN ; $71
STA DDEVIC
LDA ZICCOM
STA DCOMND
LDA INQDS
STA DSTATS
LDA #>TBUF
STA DBUFH
LDA #$00
STA DBUFL
STA DBYTH
LDA #$0F
STA DTIMLO
LDA ZICAX1
STA DAUXL
LDA ZICAX2
STA DAUXH
JSR SIOV
LDY DSTATS
TYA
RTS
.endp
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