AMIGADOS is the disk operating system of the AmigaOS , which includes file systems , file and directory manipulation, the command-line interface , and file redirection .
In AmigaOS 1.x, AmigaDOS is based on a TRIPOS port by MetaComCo , written in BCPL . BCPL does not use native pointers , so the more advanced functionality of the operating system was difficult to use and error-prone. The third-party AmigaDOS Resource Project (ARP, formerly the AmigaDOS Replacement Project), a project begun by Amiga developer Charlie Heath, replaced many of the BCPL utilities with smaller, more sophisticated equivalents written in C and assembler, and provided a wrapper library, arp.library. This eliminated the interfacing problems in applications by automatically performing conversions from native pointers (such as those used by C or assembler) to BCPL equivalents and vice versa for all AmigaDOS functions.
From AmigaOS 2.x onwards, AmigaDOS was rewritten in C, retaining 1.x compatibility where possible. Starting with AmigaOS 4, AmigaDOS abandoned its legacy with BCPL. Starting from AmigaOS 4.1, AmigaDOS has been extended with 64-bit file-access support.
* 1 Console
* 2 Syntax of AmigaDOS commands
* 2.1 Command redirection * 2.2 Command template * 2.3 Breaking commands and pausing console output * 2.4 Wildcard characters
* 3 Scripting
* 3.1 Protection bits * 3.2 Local and global variables
* 4 Case sensitivity * 5 Volume naming conventions * 6 Conventions of names and typical behaviour of virtual devices
* 7.1 Official variants of
* 8 Filename extensions * 9 Notes * 10 References * 11 External links
The console has various features that were considered up to date when
it was created in 1985, like Command
Unlike other systems originally launched in the mid 1980s, AmigaDOS
does not implement a proprietary character set; the developers chose
to use the ANSI–ISO standard
ISO-8859-1 (Latin 1) , which includes
SYNTAX OF AMIGADOS COMMANDS
This is an example of typical AmigaDOS command syntax:
1> DIR DF0:
Without entering the directory tree, this shows the content of a directory of a floppy disk and lists subdirectories as well.
1> DIR SYS: ALL
The argument "ALL" causes the command to show the entire content of a volume or device, entering and expanding all directory trees. "SYS:" is a default name that is assigned to the boot device, regardless of its physical name.
1> DIR > SPEAK: ALL
Redirects the output of the "dir" command to the speech synthesis handler. The colon character ":" indicates that SPEAK: points to an AmigaDOS device. While a typical use for a device is file systems , special-purpose device names such as this are commonly used in the system.
AmigaDOS commands are expected to provide a standard "template" that
describes the arguments they can accept. This can be used as a basic
"help" feature for commands, although third-party replacement console
handlers and shells, such as Bash or
Zshell (ported from
On requesting the template for the command "Copy", the following output is obtained:
1> COPY ?
FROM, TO/A, ALL/S, QUIET/S
This string means that the user must use this command in conjunction with FROM and TO arguments, where the latter is compulsory (/A). The argument keywords ALL and QUIET are switches (/S) and change the results of the command Copy (ALL causes all files in a directory to be copied, while QUIET will cause the command to generate no output).
By reading this template, a user can know that the following syntax is acceptable for the command:
COPY DF0:Filename TO DH0:Directory/Filename
BREAKING COMMANDS AND PAUSING CONSOLE OUTPUT
A user can terminate a program by invoking the key combination Ctrl+C or Ctrl+D. Pressing space or any printing character on the keyboard suspends the console output. Output may be resumed by pressing the ← Backspace key (to delete all of the input) or by pressing ↵ Enter (which will cause the input to be processed as a command as soon as the current command stops running).
Like other operating systems, AmigaDOS also provides wildcard characters that are substitutes for any character or any sequence of random characters in a string. Here is an example of wildcard characters in AmigaDOS commands:
1> DIR #?.info
searches the current directory for any file containing ".info" at its end as suffix, and displays only these files in the output.
The parsing of this is as follows. The "?" wildcard indicates "any character". Prefixing this with a "#" indicates "any number of repetitions". This can be viewed as analogous to the regular expression ".*".
AmigaDOS also has the feature of dealing with batch programming, which it calls "script" programming, and has a number of commands such as ECHO, IF, THEN, ENDIF, VAL, and SKIP to deal with structured script programming. Scripts are text-based files and can be created with AmigaDOS's internal text editor program, called ED (unrelated to Unix's Ed ), or with any other third-party text editor. To invoke a script program, AmigaDOS uses the command EXECUTE.
1> EXECUTE myscript
executes the script called "myscript".
This method of executing scripts keeps the console window busy until the script has finished its scheduled job. Users cannot interact with the console window until the script ends or until they interrupt it.
1> RUN EXECUTE myscript
The AmigaDOS command "Run" executes any DOS command or any kind of program and keeps the console free for further input.
Protection bits are flags that files, links and directories have in the filesystem. To change them one can either use the command PROTECT, or use the INFORMATION entry from the ICONS menu in Workbench on selected files. AmigaDOS supports the following set of protection bits (abbreviated as HSPARWED):
* H = Hold (reentrant commands with the P-bit set will automatically become resident on first execution. Requires E, P and R bits set to work. Does NOT mean "Hide". See below.) * S = Script (Batch file. Requires E and R bits set to work.) If this protection bit is set on, then AmigaDOS is able to recognize and automatically run a script by simply invoking its name. Without S bit scripts can still be launched using the EXECUTE command. * P = Pure (indicates reentrant commands that can be made resident in RAM and then no longer need to be loaded any time from flash drives, hard disks or any other media device. Requires E and R bits set to work.) * A = Archive (Archived bit, used by various backup programs to indicate that a file has been backed up) * R = Read (Permission to read the file, link or content of directory) * W = Write (Permission to write the file, link or inside a directory) * E = Execute (Permission to execute the file or enter the directory. All commands need this bit set, or they won't run. Requires R bit set to work.) * D = Delete (Permission to delete the file, link or directory)
The H-bit has often been misunderstood to mean "Hide". In Smart File System (SFS) files and directories with H-bit set are hidden from the system. It is still possible access hidden files but they don't appear in any directory listings.
Demonstration of H-bit in action:
AmigaPrompt> which list Workbench:C/List AmigaPrompt> list workbench:c/list Directory "workbench:c" on Thursday 30-Oct-08 list 6464 --p-rwed 25-Feb-02 22:30:00 1 file - 14 blocks used AmigaPrompt> which list Workbench:C/List AmigaPrompt> protect workbench:c/list +h AmigaPrompt> which list Workbench:C/List AmigaPrompt> list workbench:c/list Directory "workbench:c" on Thursday 30-Oct-08 list 6464 h-p-rwed 25-Feb-02 22:30:00 1 file - 14 blocks used AmigaPrompt> which list RES list
Notice how the LIST command becomes resident after execution when the H-bit is set.
LOCAL AND GLOBAL VARIABLES
As any other DOS,
There are both global and local variables, and they are referred to with a dollar sign in front of the variable name, for example . Global variables are available system-wide; local variables are only valid in the current shell. In case of name collision, local variables have precedence over global variables. Global variables can be set using the command SETENV, while local variables can be set using the command SET. There are also the commands GETENV and GET that can be used to print out global and local variables.
The examples below demonstrate simple usage:
1> setenv foo blapp 1> echo $foo blapp 1> set foo bar 1> echo $foo bar 1> getenv foo blapp 1> get foo bar 1> type ENV:foo blapp 1> setenv save foo $foo 1> type ENV:foo bar 1> type ENVARC:foo bar
Note the SAVE flag of the SETENV command and how global variables are available in the filesystem
Global variables are kept as files in ENV:, and optionally saved on disk in ENVARC: to survive reboot and power cycling. ENV: is by default an assign to RAM:Env, and ENVARC: is an assign to SYS:PREFS/ENV-ARCHIVE where SYS: refers to the boot device. On bootup, the content of ENVARC: is copied to ENV: for accessibility.
When programming AmigaDOS scripts, one must keep in mind that global variables are system-wide. All script-internal variables shall be set using local variables, or one risks conflicts over global variables between scripts. Also, global variables require filesystem access, which typically makes them slower to access than local variables.
Since ENVARC: is also used to store other system settings than just string variables (such as system settings, default icons and more), it tends to grow large over time, and copying everything over to ENV: located on RAM disk becomes expensive. This has led to alternative ways to set up ENV: by using dedicated ramdisk handlers that only copy files over from ENVARC: when the files are requested. Examples of such handlers are and.
AmigaDOS is in general case-insensitive . Indicating a device as
"Dh0:", "DH0:" or "dh0:" always refers to the same partition; however,
for file and directory names, this is filesystem-dependent, and some
filesystems allow case sensitivity as a flag upon formatting. An
example of such a file system is Smart
Note also that re-casing of file, directory and volume names is
allowed using ordinary methods; the commands "rename foo Foo" and
"relabel Bar: bAr:" are valid and do exactly what is expected, in
contrast to for example on
VOLUME NAMING CONVENTIONS
Partitions and physical drives are typically referred to as DF0: (floppy drive 0), DH0: (hard drive 0), etc. However, unlike many operating systems, outside of built-in physical hardware devices like DF0: or HD0:, the names of the single disks, volumes and partitions are totally arbitrary: for example a hard disk partition could be named Work or System, or anything else at the time of its creation. Volume names can be used in place of the corresponding device names, so a disk partition on device DH0: called Workbench could be accessed either with the name DH0: or Workbench:. Users must indicate to the system that "Workbench" is the volume "Workbench:" by always typing the colon ":" when they are entering information in a requester form or into AmigaShell.
If an accessed volume name cannot be found, the operating system will prompt the user to insert the disk with the given volume name, or allow the user to cancel the operation.
In addition, logical device names can be set with the "assign" command to any directory or device; programs often assigned a virtual volume name to their installation directory (for instance, a fictional wordprocessor called Writer might assign Writer: to DH0:Productivity/Writer). This allows for easy relocation of installed programs. The default name SYS: is used to refer to the volume that the system was booted from. Various other default names are provided to refer to important system locations. e.g. S: for startup scripts, C: for AmigaDOS commands, FONTS: for installed fonts, etc.
Assignment of volume labels can also be set on multiple directories, which will be treated as a union of their contents. For example, FONTS: might be assigned to SYS:Fonts, then extended to include, for example, Work:UserFonts using the add option of the AmigaDos assign command. The system would then permit use of fonts installed in either directory. Listing FONTS: would show the files from both locations.
CONVENTIONS OF NAMES AND TYPICAL BEHAVIOUR OF VIRTUAL DEVICES
The physical device DF0: shares the same floppy drive mechanics with
PC0:, which is the
CrossDOS virtual device capable of reading PC
formatted floppy disks. When any PC formatted floppy disk is inserted
into the floppy drive, then the DF0: floppy
AmigaDOS supports various filesystems and variants. The first
filesystem was simply called
AmigaOS 2.x, FFS became an official part of the OS and was soon
expanded to recognise cached partitions, international partitions
allowing accented characters in file and partition names, and finally
AmigaOS 4.x and
Other filesystems like
FAT32 from Windows or ext2
AmigaOS 4.1 adopted a new filesystem called JXFS capable to support partitions over a terabyte of size.
Alternate filesystems from third-party manufacturers include
Professional FileSystem , which is a filesystem with an easy
structure, based on metadata , allowing high internal coherence,
capable of defragmenting itself on the fly, and does not require to be
unmounted before being mounted again; and Smart FileSystem which is a
journaling filesystem which performs journaled activities during
system inactivities, and has been chosen by
OFFICIAL VARIANTS OF AMIGA FILESYSTEMS
OLD FILE SYSTEM/FAST FILE SYSTEM
* OFS (DOS0) * FFS (DOS1) * OFS International (DOS2) * FFS International (DOS3) * OFS Directory Caching (DOS4) * FFS Directory Caching (DOS5)
FAST FILE SYSTEM 2 (AMIGAOS4.X/MORPHOS)
* OFS Long filenames (DOS6) * FFS Long filenames (DOS7)
Both DOS6 and DOS7 feature International filenames featured in DOS2 and DO3, but not Directory Caching, which was abandoned due to bugs in the original implementation. DOS4 and DOS5 are not recommended for use for this reason.
Dostypes are backwards compatible with each other, but not forward
compatible. A DOS7 formatted disk cannot be read on original Amiga
FFS, and a DOS3 disk cannot be read on a KS1.3 Amiga. However, any
disk formatted with DOS0 using FFS or FFS2 can be read by any version
With the July 2007 Update of AmigaOS 4.0 in 2007, the first two plug-ins for FFS2 were released:
* FS_PLUGIN_CACHE: increases performance of FFS2 by introducing a new method of data buffering. * FS_PLUGIN_ENCRYPT: data encryption plug-in for partitions using the Blowfish algorithm.
AmigaDOS has only a single mandated filename extension: ".info", which must be appended to the filename of each icon. If a file called MYPROG exists, then its icon file must be called MYPROG.INFO. In addition to image data, the icon file also records program metadata such as options and keywords, its own position on the desktop (AmigaOS can "snapshot" icons in places defined by the user), and other information about the file. Directory window size and position information is stored in the ".info" file associated with the directory, and disk icon information is stored in "Disk.info" in the root of the volume.
With the exception of icons, the
* ^ "Archived copy". Archived from the original on 2007-03-11.
* ^ Commodore