From 6d4a8f4e2ba8a46d745e4df30e211953b295853b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kyle=20J=C2=A0Cardoza?= Date: Tue, 9 Jul 2024 11:55:22 -0400 Subject: [PATCH] Documentation of kernel API --- doc/syscalls.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/syscalls.md b/doc/syscalls.md index 63c0009..54d748b 100644 --- a/doc/syscalls.md +++ b/doc/syscalls.md @@ -470,10 +470,22 @@ Argument Structure: }; ``` +Device drivers in 65X-DOS identify themselves to the kernel by +means of their "major number" -- the index into the internal +device driver table at which the device driver's address can +be found. Specific devices managed by a driver are distinguished +from each other by "minor number" -- an arbitrary number which +holds meaning only to the driver. + Each device driver in 65X-DOS registers one or more major/minor -number pairs to one or more "default" aliases. These aliases are +number pairs to one or more "default" names. These aliases are what appear in a fully qualified pathname for a file before the -`:` separator character. +`:` separator character. You might compare this to a "drive letter" +in MS-DOS type systems, or to entries in the `/dev` directory on +a Unix-like system. For example, the SD card driver might register +the device name `sd0` for the first SD card. Drivers which do not +expose file-like functionality still expose default names, because +they use the `ioctl` interface to control their settings. This call attempts to add a secondary name to an existing device. This alias will work exactly like the default name, which will still