-
Notifications
You must be signed in to change notification settings - Fork 74
CIO and FMS copy commands
Different FMSes handle the copy command differently, and thus we need to effectively parse the filenames being passed back and forth between the CIO and our driver so that things will work correctly.
The C command has some interesting quirks:
- Filenames must be a maximum of 15 characters, including device spec. Anything longer and you get FILENAME TOO LONG.
- The IOCB read from is passed a filename buffer containing both filename paths with device specs, seperated by comma, e.g.
SELECT ITEM OR RETURN FOR MENU
C
COPY--FROM, TO?
D1:OKI92A,D2:OKI92A
Results in IOCB #1 being opened with a filename value of:
D1:OKI92A,D2:OKI92A
Indicating that we need to tokenize by the comma character and only parse the first part of the comma.
opening from E: is a special case in the DOS 2.0 FMS, the editor is not re-opened, and the existing IOCB #0 is used.
MyDOS does not exhibit the quirks when using copy, it seems the buffer is tokenized by comma, and the source is opened on IOCB #1 with the first filename, with IOCB #2 opening with the second filename.
Source or destination not containing a filename (E:, P:, etc.), is passed to CIO as: e.g. "E:**", as an aside, MyDOS will open E: if specified on IOCB #7.
If A device is specified as destination without a filename, the source filename will be concatenated. e.g.
Select Item (RETURN for menu):C
File source, destination?
D2:TEST,P:
IOCB #1 will have the following filename:
D1:TEST
IOCB #2 will have the following filename:
P:TEST
The same FMS, but a drastically different DUP implemented as a CLI.
- Copy command opens each file on a seperate IOCB.
- Filenames without extensions have a . added to the end, e.g.
D1:TEST
becomes
D1:TEST.
- If destination does not have a filename (e.g. E: P: N:), then the filename is concatenated, so:
D1: COPY D2:TEST E:
Opens an IOCB #1 with filename:
D2:TEST.
and opens an IOCB #2 with filename:
E:TEST.
For source paths without a filename, copy will append a wildcard specification of ., e.g.
D1: COPY E: D2:TEST2
COPY will open IOCB #1 with the following filename
E:*.*
and will open IOCB #2 for writing with the following filename
D2:TEST2
Important
There is no period in the TEST2 filename, copy
doesn't add one in this case.
Similar code-base to OS/A+ 2, with the difference that the Apple DOS FMS is used, instead of the Atari DOS 2.0 FMS.
OS/A+ 4.1 COPY uses a fixed file length of 33 characters, padded with spaces. e.g. given a COPY command of
D1: COPY D1:ADOS.COM D2:
COPY will open source as IOCB #1 as:
"D1:ADOS.COM "
and destination as IOCB #2 as:
"D2:ADOS.COM "
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