Files
Sprinter-SDCC/docs/converted/Estex.txt
T
snark13 c71e249a4e Add full compiler toolchain, libc, examples and reference docs
First substantive commit: the entire Sprinter C compiler tree on top of
the bare README+gitignore initial commit.

What's in here:
  bin/sprinter-cc        — driver script invoking SDCC + linker + mkexe
  libc/                  — Sprinter-specific libc layer over ESTEX/BIOS
                           (conio, gfx, io, mem, stdio + headers)
  runtime/               — crt0 variants (default/small/banked/minimal)
                           + heap + bank trampolines
  toolchain/             — mkexe (SprintEXE packer, C + tests)
  examples/              — 30 demo programs (gfx, file I/O, env, time, …)
  lib/Makefile           — builds the libc archive (sprinter.lib)
  docs/                  — converted Sprinter manuals + asm reference samples
  third_party/           — solid-c reference compiler dump + sdcc setup script
  release_docs/          — packaging / release notes

gitignore overhaul:
  • Drop dangerous blanket patterns: *.asm (would hide docs/samples/*.asm)
    and *.exe (case-insensitive match was hiding third_party/solid-c/*.EXE
    on macOS APFS).  Replaced with examples/*/*.{asm,exe,…} and lib/*.lib.
  • Restore tracking of toolchain/mkexe/tests/{one,big}.bin — those are
    INPUT fixtures, not build outputs.
  • Collapse the duplicated SDCC/C/Sdcc sections into one section per
    concern (build outputs / vendored / OS-junk).
  • Add .sprinter-cc-*/, build/ (catches lib/build/ too), .claude/.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-03 16:13:21 +03:00

18 lines
5.1 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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.
Estex: Disk SubSystem (DSS) Programming Guide
Table of Contents
HYPERLINK "" \l "intro" 1. Introducing HYPERLINK "" \l "identify" 2. Identification of system functions HYPERLINK "" \l "diskfunc" 3. Disk devices functions
1. Introducing
   This document contains the list of functions and concepts of interaction with a disk subsystem.   DSS is a collection of very useful functions that reside in DSS itself, ready for use by any your programs. These functions are stored in library SYSTEM.DOS and allow management of files, memory allocation, loading and execution of the programs.

File specification

   The file specification is a string, containing a names of disk, directories separated by a symbol "\" and name of file. The names of disk drive and directories can be discard.for example:

C:\TEXT\DOC\text.doc

A:file.txt

\TEXT\info.txt

   The DSS used chars with colon suffix as names of disk devices (A:, B:, C: etc.) The name of disk can be written down before filename for specified disk there it placed. For example: command DIR C:DATFILE searches for DATFILE in the current directory of disk C:.   When disk name not specified DSS used current disk. At start DSS, the current disk is a disk whence was loaded DSS.   The filenames consist of two parts. The first part contain 8 chars of file name. The second part is not necessary and contain 3 chars of file type (also known as extentsion). At the writing of filename, both parts are separated by char point.For example: the names "NAME" and "NAME." is specified same file. In the name don'tallows symbols with codes less 32 and chars . " / \ [ ] : | < > + = ; ,    As the subdirectories files too, their names are formed by same way. The name of root directory always "\". And each subdirectories contain two items with names "." and "..". The name "." specified a current directory and name ".." specified name of parent(uplevel) directory.   Some console commands and DSS functions allow to use global symbols ? and * which can be usedfor filename templates.   The symbol ? means that any one char of filename. The symbol * means that it char can bereplaced by any symbols.

For example:*.txt - means, all files with type "txt"a??.* - means, files which contain three or less symbols and first symbol is "a"dc*.exe - means, files with type "exe" and began "dc"

File attributes

   The each bit of byte attributes specified various attribute. And It can be changed by DSS function.

bit 0 - Read onlybit 1 - Hiddenbit 2 - Systembit 3 - Volume labelbit 4 - Directorybit 5 - Archivebit 6 - Reservedbit 7 - Reserved

   Attribute "read only". When value is 1, file can be read, but can't be written or deleted.   Attribute "hidden". When value is 1, DSS can't manipulate with this file.   Attribute "system". Specified system file.   Attribute "volume label". In old version of MSDOS used for specified volume laben, now it can be used for long filenames. And must be 0 for compatibles.   Attribute "directory". When value is 1, means that this file is directory.   Attribute "archive". This bite sets in 1 when DSS writing in this file. It can be used in backup utilities for detect changed files.

File handle

   When any file are opened, DSS build File Control Block in DSS working areas.   The Handle (and assigned file) identified by number which returned DSS to program after file opening and used it in all further DSS calls. In other words, when file is opening, the program informsDSS his name and has taken back file handle. Which used in further file operations.   All necessary information for working with file are placed in DSS working areas.
2. Identification of system functions
00h (00) VERSION (Version of DSS)

input:

C - 00h

output:

D - version numberE - modification

The function return version number of DSS.
3. Disk devices functions
01h (01) CHDISK (Change current disk)

input:

A - disk number (0-A,1-B...)C - 01h

output:

A - error code, if CF=1A - number of disks, if CF=0

The function changes current disk device.


02h (02) CURDISK (Current disk number)

input:

C - 02h

output:

A - current disk number (0-A,1-B...)

The function returns number of current disk device.


03h (03) DSKINFO (Disk information)

input:

A - disk number (0-A,1-B...0FFh-current)C - 03h

output:

A - error code, if CF=1A - sectors per cluster, if CF=0HL - clusters per diskDE - free clustersBC - bytes per sector

The function returns information about disk device (capacity and free space).

for example:
LD C,03h ;Function DSKINFO
LD A,0FFh ;Information about current disk
RST 10h ;Execution of function
LD A,D ;There is a free
OR E ;space?
JR Z,NO_SPACE ;No, the disk is completely filled
09h (09) BOOTDSK (Number of boot disk)

input:

C - 09hB = 0

output:

A - number of boot disk (0-A,1-B...)

The function returns number of boot disk device whence was loaded DSS.