AmigaDOS

del.icio.us del.icio.us
Digg Digg
Furl Furl
Reddit Reddit
Rojo Rojo
Add to OnlyWire

AmigaDOS provides the disk operating system portion of the AmigaOS. This includes file systems, file and directory manipulation, the command line interface, file redirection and so on.

In AmigaOS 1.x, the AmigaDOS portion was based on a TRIPOS port by MetaComCo, written in BCPL. Because BCPL does not use native pointers, as do C and most other low-level programming languages and assembler programs, using more advanced functionality of the operating system was difficult and prone to errors. The third-party AmigaDOS Resource Project[1] (ARP, formerly the AmigaDOS Replacement Project[2]), a project begun by Amiga developer Charlie Heath, replaced many of the BCPL utilities with smaller and often more sophisticated equivalents written in C and assembler, and provided a wrapper library, arp.library, which 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.

As from AmigaOS 4.0, the DOS abandoned completely any legacy with BCPL, and starting from AmigaOS 4.1, it has been rewritten with full 64bit support.

Contents

Console

Amiga console is a standard Amiga virtual device and it is piloted by Console.Handler. It could be accessed as quite as any other device by invoking it with semicolons Con:.

Amiga Console evolved from a primitive interface present in 1.1, and become stable with OS 1.2 and 1.3 when it was introduced AmigaShell, driven by NewConsole.Handler. First Amiga console has various features that were up to date when it was created in 1985, like Command Template Help, redirection to null ("Nil:"), ANSI color terminal. New Console Handler introduced the device Newcon: that allowed many more features, like for example Command History, pipelines, automatic creation of files when output was redirected, and its design was so advanced that when internet became popular, the console could also receive redirection from Amiga internet stacks as quite this redirection stream was a standard Amiga Device ("TCP:", example: "copy file to tcp:site"), etc.

Amiga console has a standard character set since 1985. Differently from other system of its age, Amiga did not implemented a character set of its own, but developers wisely decided to implement an International Organization for Standardization ANSI/ISO compliant. Amiga Character set is ISO-8895-1 (Latin 1) that includes ASCII character set (first 128 characters), and it is also used in E-Mail and WWW standards.

Euro Currency character

ISO-8859-1 standard does not support Euro currency character (""), as it was created many years before the introduction of that currency. Modern Amiga character sets includes that character by remapping the keyboard.

Modern Amiga systems like AmigaOS and MorphOS are about to introduce UNICODE as character set, but legacy programs are uncapable to support it.

MorphOS supportes UNICODE internally and uses various charsets to maintan retro-compatibility with ancient Amiga programs.


Line Feed

As like in Unix systems, Amiga console accepts only Linefeed ("LF") as End-of-line ("EOL") character.

Amiga console ha support for accented characters as well also for charcters created by combinations of "dead keys" on the keyboard.

Syntax of AmigaDOS commands

This is an example of typical AmigaDOS command syntax:

AmigaShellPrompt> DIR Df0:
This shows the content of a directory of a floppy disk and elencates directories but without entering the directory tree.
AmigaShellPrompt> DIR SYS: OPT A
AmigaShellPrompt> DIR SYS: ALL
The argument word "OPT A" or also the argument word "ALL" show the entire content of a volume or device, entering and expanding all directory tree. "Sys:" is the obliged name that indicates the boot device, whatever it could be, floppy, hard disk or CD. Note that Amiga uses always the slash character ("/") in command arguments or also directory paths.

Command redirection

AmigaDOS can redirect output of a command to printer, null device, files, pipes, and to special Amiga devices.

AmigaShellPrompt> DIR >Speak: ALL
Redirects the output of "dir" command of the current device to speech synthesis handler, reading the content of the entire volume or disk with natural voice. Note the semicolon character ":" that indicates the AmigaOS considers the speech systhesis handler (that is just a software device driver piloting the Amiga audio chip Paula) as this software handler was like as any other Amiga standard device. This a normal behaviour of AmigaOS for any kind of phisical or virtual drives, volumes, handlers and devices.

Command template

Command template of AmigaDOS was minimal but useful. AmigaDOS was one of the early DOS providing this help for the users.

AmigaShellPrompt> DIR?
The question mark character "?" invokes the command template.

Output is:

OPT/K ?
This minimal help tells the user that he could use the argument word OPT with the command DIR. "OPT" is facultative (/K), and needs to receive a character key as argument to perform additional functions of that DOS command.

It could be considered a very poor help feature, but when this template help function was created in 1985 AmigaDOS was one of the few system providing this facility. Amigans often enhanced AmigaShell with new console handlers, such as Bash or Zshell portings from Linux world, or Kingcon: replacement of the normal Amiga Console device CON:. These shells featured a complete set of help tools explaining all commands, their syntax, the complete templates, command history, etcetera.

If we invoke the template on the command Copy that is used in AmigaDOS to copy files we will obtain this output:

AmigaShellPrompt> Copy ?
FROM, TO/A, ALL/S, QUIET/S
This string means that user must use this command in conjunction with FROM and TO arguments, and provide an obliged path to teach the DOS where are the files. Argument TO is to be typed obligatory (/A). The argument keywords ALL and QUIET are switches (/S) and change the results of the command COPY. ALL if used, copies all files of a directory. QUIET argument disables the "echo" of the command, so it will perform the entire operation of copying files without prompting the user with ongoing operations status.

The minimal help shown in the window of CLI/Shell then informs the user of the correct command template and that he must enter a string like this:

Copy FROM df0:myfile TO dh0:mydata/myfile
or also:
Copy df0:myfile TO dh0:mydata/myfile

Example shown copies a file named myfile FROM Floppy Disk TO Hard Disk directory called mydata. Syntax of Amiga commands is often structured by its creators to being close enough to human language.

Command Break and Pausing Console Output

AmigaDOS can terminate a program and breaking it by invoking "CTRL"+"C" combination of keys.

The pression of "Space" tab on the keyboard suspends the Console Output, and it can be resumed by pressing on "Backspace" key.

Wildcard characters

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 follows an example of wildcard characters in AmigaDOS commands:

AmigaShellPrompt> DIR #?.info
searches the current directory for any file containing ".info" at its end as suffix, and displays only these files in the output.

Scripting

AmigaDOS ha also the feature of dealing with batch programming that in Amiga is called "Script" programming, and has also all sets of commands like Echo, If, Then, EndIf, Val, Skip, etcetera, to deal with structured script programming. Batch programs are text based files and can be created with AmigaDOS internal text editor command ED, or with any other third party text editor. To invoke a script program Amiga uses the command Execute.

AmigaShellPrompt> Execute myscript
executes the script called "myscript".

This method of executing scripts keeps busy the console window until the script has finished its scheduled job. Users cannot interact with console window until script ends or until they break it.

While:

AmigaShellPrompt> Run Execute myscript
The AmigaDOS command "Run" executes any Dos command or any kind of software and keeps free the console for further input.

If The protection bit "S" that means "Script" is set on, then Amiga is capable to recognize and run automatically the script by simply invoking its name.

Protection Bits

Protection bits are flag bits that could be set into any program, or data file. Amiga supports this set of protection bits (HSPARWED):

  • H = Hide (hides the file from the directory. However this flag has no effect in Amiga)
  • S = Script (Batch file)
  • P = Pure (indicates reentrant commands that can be made resident in RAM and then requiring no more to be loaded any time from disks, hard-disks or any other media device)
  • A = Archive (Archive bit)
  • R = Read (Permission to Read the file)
  • W = write (Permission to Write the file)
  • E = Edit (Permission to Edit the file)
  • D = Delete (Permission to Delete the file)

Local and Global Variables

As any other DOS, Amiga could deal with variables as used in batch programming. Global Variables are stored in ENV: (environment) device, phisically localized in System:Prefs/env-archive, and it has also local environment variables, that worked like the Unix version.[3] AmigaOS command to create an environment variable is SetENV.

Usage:

AmigaShellPrompt> Setenv A 10
creates the local variable A and assign it value of 10.

Case sensitivity

AmigaOS is case insensitive. Filenames like MyProg, myprog, MYPROG and MyPrOg are considered the same, and so the directory, volumes and device names. Indicating a device as Dh0:, DH0: or dh0: refers always to the same partition.

Conventions of names of devices

Partitions and physical drives are typically referred to as DF0: (floppy drive 0), DH0: (Device hard disk 0 or HD0: hard drive 0), etc. However, unlike many operating systems, outside of built-in phisical hardware devices like DF0: or HD0: the name of the single floppy disks, or the volumes or partition own names are totally arbitrary; for example a hard disk partition could be named HARDDISK or A, or MyDisk or any other name when it was partitioned. Volume names then will be recognized as have the same format as device names, so a disk partition on device DH0: called Workbench could be accessed either with the name DH0: or Workbench: (Note that once the name of the volume was set up, then the system adds automatically semicolon character to the name of the partition to indicate it is considered as a device as for example when showing a list of active devices. On the desktop, the name of the device appears right under device icon and without the semicolon. Users must indicate to the system that "Workbench" is a device "Workbench:" by always typing the semicolons ":" when they are entering informations in a requester form or into AmigaShell command based interface windows. This is mandatory.). If the partition is the same that started the boot sequence, it could also be accessed as Sys:. So there could various ways to indicate and access the partition that made the boot. In addition, virtual volume names could be set with the "assign" command to any directory or device; for example programs often assigned a virtual volume name to their installation directory; an example might be a fictionary worprocessor called FooBarWriter assigning FooBar: to DH0:Productivity/FooBarWriter. This allows for easy relocation of installed programs.

Conventions of names and typical behaviour of virtual devices

The phisical device DF0: share the same floppy drive mechanics with PC0: that is the CrossDOS virtual device capable to read PC formatted floppy disks. When any PC formatted floppy disk is inserted into the floppy drive, then the Df0: floppy Amiga icon will change to indicate that the disk is unknown for normal Amiga device, and it will show four question marks '????' as standard "unknown" volume name, while the PC0: icon will appear revealing the name of the PC formatted disk. Any disk change with Amiga formatted disks will invert this behaviour.

Filesystems

The AmigaOS supports various filesystems and variants.

First filesystem was simply called Amiga FileSystem, and was suitable mainly for floppy disks, because it does not support autoboot from Hard disks. it was soon replaced by FastFileSystem, and hence the original filesystem was de facto recognized with the name of "Old" FileSystem.

New FastFileSystem was soon expanded to recognize cached partitions, international partitions allowing accented characters in file and partition names, and finally longnames in files, upto 108 characters.

Since AmigaOS 4.0 is available a new version of FastFileSystem called FastFileSystem2 which can expand its features and capabilities with the aid of plug-ins. Amiga also supports two filesystems from third party manufacturers called Professional FileSystem that is a filesystem with an easy structure, based on metadata, allowing high internal coherence, capable to defrag itself on the fly, and do not requires to be unmounted before being mounted again; and Smart FileSystem that is a very interesting journaling filesystem which performs journaled activities during system inactivities, and has been choosen by MorphOS as standard filesystem.

AmigaOS version of Smart FileSystem is a fork of original SFS adopted by MorphOS, and is not compatible 100% with it.

Other filesystems like FAT16, FAT32 from Windows or ext2 from Linux are available through system libraries or third party modules or even into Aminet freeware software repository.

AmigaOS 4.1 adopted a new filesystem called JXFS capable to support partitions over a Terabyte of size.

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.0)

  • OFS Long filenames (DOS6)
  • FFS Long filenames (DOS7)

FastFileSystem2 Plug-ins

With first update of AmigaOS 4.0 in 2007, it has been released the first two plugins for FFS2:

  • fs_plugin_cache: increments performances of FFS2 by introducing a new method of data buffering.
  • fs_plugin_encrypt: data encryption plugin for partitions using Blowfish algorythm.

Filename Extensions

Amiga has only one obliged filename extension for filenames and is ".info" that is appended as suffix to filenames of icons. If it exists a filename called myprog, then myprog.info is the file containing icons, its position on the desktop (AmigaOS is capable to "snapshot" icons in places defined by the user), program metadata such as options and keywords, and other informations about the file.

There is no mandatory issue in Amiga to indicate programs and projects (datafiles) with extensions. Any user can rename files with any suffix if he likes to, or if there is the need to rename files for a matter of precision. Amiga will recognize executable by using the first sequence of bytes in the binary header of file (magic cookie number), and it will recognize the datafiles by the icons, or by its informations again contained in headers. A list of files like "data1", "data2", "data3", etc, will be considered the same even if it has been renamed "data1.lbm, "data2.jpg", "data3.lbm".

Amiga will open the correct software for any kind of file depending from the info contained in its icon, or by using Datatypes.


References

This article is from Wikipedia. All text is available under the terms of the GNU Free Documentation License.


Giant Panda

Mercedes Car
James Bond Guide
This site monitored by SitePinger.net