FriendTWO

format_list_bulleted Contenido keyboard_arrow_down
ImprimirCitar

AmigaDOS is the disk operating system for 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 port of TRIPOS from MetaComCo, written in BCPL. BCPL does not use native pointers, so the more advanced functionality of the operating system was difficult to use and prone to errors. The third-party AmigaDOS Resource Project (ARP, formerly known as the AmigaDOS Replacement Project), a project started 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 application pipeline problems 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 compatibility with 1.x wherever possible. Starting with AmigaOS 4, AmigaDOS abandoned its legacy with BCPL. Starting with AmigaOS 4.1, AmigaDOS has been extended with 64-bit file access support.

Console

The Amiga console is a standard Amiga virtual device, usually assigned to CON: and controlled by console.handler. It developed from a primitive interface in AmigaOS 1.1, and stabilized with versions 1.2 and 1.3, when it became known as AmigaShell and its original handler was replaced by newconsole.handler (NEWCON:).

The console has several features that were considered cutting edge when it was created in 1985, such as Command Template Help, null redirection (" NIL: ") and the ANSI color terminal. The new console controller, which was implemented in version 1.2, enables many more features, such as command history, pipes, and automatic file creation when output is redirected. When TCP/IP stacks like AmiTCP were released in the early 1990s, the console could also receive redirection from Internet-enabled Amiga device drivers (for example, TCP:, copy file To TCP: Site/Port).

Unlike other systems originally released in the mid-1980s, AmigaDOS does not implement a proprietary character set; the developers chose to use the ANSI–ISO ISO-8859-1 (Latin 1) standard, which includes the ASCII character set. As on Unix systems, the Amiga console only accepts the newline (" LF ") as an end-of-line (" EOL ") character. The Amiga console supports accented characters, as well as characters created by "dead key" on the keyboard.

AmigaDOS Command Syntax

This is an example of the typical AmigaDOS command syntax:

Dir DF0:
Without entering the directory tree, this shows the content of a directory of a diskette and also lists the subdirectories.
Dir SYS: ALL
The "ALL" argument makes the command display all the content of a volume or device, entering and expanding all directory trees. "SYS:" is a default name that is assigned to the starter device, regardless of its physical name.

Redirect Command

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

Dir  SPEAK: ALL
Redirects the output of the "dir" command to the voice synthesis controller. The character of two points ":" indicates that SPEAK: points to an AmigaDOS device. While a typical use of a device is that of file systems, the names of special purpose devices like this are commonly used in the system.

Command templates

AmigaDOS commands are expected to provide a "template" standard that describes the arguments they can accept. This can be used as a basic "help" for commands, although third-party replacement console shells and drivers, such as Bash or Zshell (ported from Unix), or KingCON often provide more detailed help for built-in commands.

By requesting the template for the " Copy ", you get the following result:

Copy?
FROM, TO/A, ALL/S, QUIET/S
This string means that the user should use this command along with the arguments FROM and TOwhere the latter is compulsory (/A). Key words of argument ALL and QUIET are modifiers (/S) and change the results of the Copy command (ALL makes all files copied in a directory, while QUIET will cause the command not to generate results at the standard output).

By reading this template, a user may know that the following syntax is acceptable for the command:

Copy DF0:Filename TO DH0:Directory/Filename

Command completion and pausing console output

A user can terminate a program by invoking the combination of Ctrl+C or Ctrl+D Press space or any print character on the keyboard suspends console output. Output can be resumed by pressing the backspace (to remove all input) or by pressing Enter (which will cause the input to be processed as a command as soon as the current command stops executing).

Wildcards

Like other operating systems, AmigaDOS also provides wildcard characters that substitute for any character or any sequence of random characters in a string. Here is an example of wildcards in AmigaDOS commands:

Dir #.info
Find in the current directory any file containing ".info" at the end as suffix, and display only these files in the output.

The analysis of this is as follows. The wild card "?" returns "any character". The prefix with a "#" indicates "any number of repetitions". This can be seen as analogous to the regular expression ". * &#3. 4;.

Scripting

AmigaDOS also has the facility to deal with batch programming, which it calls "script" programming, and has a series of commands like 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 built-in text editor program called Ed (not related to Ed on Unix), or with any other third-party text editor. To invoke a script program, AmigaDOS uses the command Execute: to execute the script called "myscript".

This method of running scripts keeps the console window busy until the script finishes its scheduled job. Users cannot interact with the console window until the script ends or is interrupted.

While:

Copy?
FROM, TO/A, ALL/S, QUIET/S
This string means that the user should use this command along with the arguments FROM and TOwhere the latter is compulsory (/A). Key words of argument ALL and QUIET are switches (/S) and change the results of the Copy command (ALL makes all files copied in a directory, while QUIET will make the command not generate results).

Protection Bits

Guard bits are flags that files, links, and directories have on the file system. To change them, you can use the Protect command or the information entry of the Icons menu. in Workbench on the selected files. AmigaDOS supports the following set of protection bits (abbreviated as HSPARWED):

  • H = Maintain (reentry commands with the P-bit set will automatically become resident in the first execution. Requires E, P and R bits set to work. No. means "hide." See below.)
  • S = Script (batch file. Requires E and R bits set to work.) If this protection bit is enabled, then AmigaDOS can automatically recognize and execute a script by simply invoking its name. Without S bit, the scripts can still be started with the command Run.
  • P = Pure (indicates re-entry commands that can be made residents of RAM and that no longer need to be loaded at any time from flash drives, hard drives or any other media device). Requires E and R bits set to work.)
  • A = File (bit archived, used by several backup programs to indicate that a backup of a file has been made)
  • R = Read (Permission to read directory file, link or content)
  • W = Write (Permission to write the file, link or within a directory)
  • E = Run (Permission to run the file or enter the directory. All commands need this set bit, or will not run. Requires the R bit set to work.)
  • D = Delete (Permission to remove file, link or directory)

The H bit has often been wrong interpreted to mean "Hide". In Smart File System (SFS), files and directories with the H bit set are hidden from the system. Hidden files are still accessible but do not appear in any directory listings.

Demonstration of the 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
Note how the list command becomes a resident after the execution when the bit is set H.

Local and global variables

Like any other DOS, the Amiga deals with environment variables that are used in batch programming.

There are global and local variables, and they are referenced with a dollar sign in front of the variable name, for example $myvar. Global variables are available throughout the system; Local variables are only valid in the current shell. In case of name collision, local variables take precedence over global variables. Global variables can be set with the SetEnv command, while local variables can be set with the Set command. There are also the GetEnv and Get commands that can be used to print global and local variables respectively.

The following examples demonstrate simple usage:

setenv foo blapp
I $foo
blapp
set foo barI $foo
bar
getenv foo
blapp
get foo
bar
type ENV:foo
blapp
setenv save foo $foo
type ENV:foo
bar
type ENVARC:foo
bar
Note the SetEnv command save indicator and how global variables are available in the file system.

Global variables are saved as files in ENV: and optionally saved to disk in ENVARC: to survive reboot and power cycle. ENV: is by default a mapping to RAM: Env, and ENVARC: is a mapping to SYS: Prefs/Env-archive where SYS: refers to the boot device. At startup, the content of ENVARC: is copied to ENV: for accessibility.

When programming AmigaDOS scripts, keep in mind that global variables are system-wide. All internal variables of the script will be set using local variables, or one risks conflicts over global variables between scripts. Also, global variables require access to the file system, which generally makes them slower to access than local variables.

Since ENVARC: is also used to store other system settings besides string variables (such as system settings, default icons, and more), it tends to grow very large over time, and copying everything into ENV: located on the RAM disk becomes expensive. This has led to alternative ways of configuring ENV: by using dedicated RAM disk controllers that only copy files from ENVARC: when the files are requested. Examples of such handlers are and.

An example that demonstrates the creative abuse of global variables, as well as Lab and Skip, is the AmigaDOS variant of the infamous GOTO.

Case Sensitivity

AmigaDOS is, in general, not case sensitive. Indicate a device as "Dh0:", "DH0:" or "dh0:" always refers to the same partition; however, for file and directory names, this is file system dependent, and some file systems allow case sensitivity as a flag when formatting. An example of such a file system is Smart File System. This is very convenient when dealing with software ported from the Un*x world, which is mostly case sensitive, but causes a lot of confusion in native Amiga applications, which assume case insensitivity. Therefore, advanced users will typically only use the case-sensitivity flag for file systems used for Un*x-originated software.

Note also that conversion of file names, directories, and volumes is allowed using ordinary methods; the "rename foo Foo" and "relabel Bar: bAr:" are valid and do exactly what is expected, unlike, for example, Linux where "mv foo Foo" results in the error message "mv:` foo 'and `Foo 'is the same file" on case-insensitive file systems such as VFAT.

Volume Naming Conventions

Physical drives and partitions are often referred to as DF0: (floppy drive 0), DH0: (hard drive 0), etc. However, unlike many operating systems, outside of the physical onboard hardware devices such as DF0: or HD0: the disk names, volumes, and individual partitions are completely arbitrary: for example, a hard drive partition might 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: named Workbench, can be accessed either with the name DH0: or Workbench:. Users must tell the system that "Workbench" is the volume "Workbench:" always writing the colon ":" when they enter information on an applicant form or in 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" to any directory or device; programs often assign a virtual volume name to their installation directory (for example, a fictional word processor named 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 from which the system was booted. Other default names are provided to refer to important system locations. eg S: for startup scripts, C: for AmigaDOS commands, FONTS: for installed fonts, etc.

Volume label mapping can also be set to multiple directories, which will be treated as a union of their contents. For example, FONTS: could be assigned to SYS:Fonts, then extended to include, for example, Work:UserFonts using the add of the AmigaDos assign command. The system would then allow the use of fonts installed in any directory. Listing Fonts: would show the files from both locations.

Naming conventions and typical behavior of virtual devices.

The physical device DF0: shares the same floppy drive mechanics with PC0:, which is the virtual CrossDOS device capable of reading PC-formatted floppy disks. When any PC-formatted floppy disk is inserted into the floppy drive, then the DF0: Amiga floppy disk icon will change to indicate that the disk is unknown to the normal Amiga device, and will display four signs of question mark ???? as the volume name "unknown" while the PC0: icon will appear and display the name of the PC-formatted drive. Any disk changes with Amiga formatted disks will reverse this behaviour.

File systems

AmigaDOS supports several file systems and variants. The first file system was simply called the Amiga FileSystem and was mainly suitable for floppy disks, because it did not support automatic booting from hard drives (on the floppy disk, booting was done using the bootblock code). It was soon superseded by FastFileSystem (FFS) and thus the original file system went by the name "Old" File System (OFS). FFS was more space efficient and quite a bit faster than OFS, hence the name.

With AmigaOS 2.x, FFS became an official part of the operating system and was soon expanded to recognize cached partitions, international partitions that allow accented characters in file and partition names, and finally (with MorphOS and AmigaOS 4) long file names, up to 108 characters. (from 31).

Both AmigaOS 4.x and MorphOS introduced a new version of FFS called FastFileSystem 2. FFS2 incorporated all the features of the original FFS, including, according to its author, "some minor changes". In order to preserve backwards compatibility, there were no major structural changes. (However, FF2 on AmigaOS 4.1 differs in that you can extend its features and capabilities with the help of plugins.) As with FFS2, the AmigaOS 4 and MorphOS version of Smart FileSystem is a fork of the original SFS and is not 100% compatible with it.

Other file systems like FAT12, FAT16, Windows FAT32 or Linux ext2 are available via easily installable system libraries (drag and drop) or third party modules like FAT95 (read/write support features), which can be found in the Aminet Software Repository. MorphOS 2 has built-in support for FAT file systems.

AmigaOS 4.1 adopted a new file system called JXFS capable of supporting partitions up to a terabyte in size.

Alternative third-party file systems include the Professional FileSystem, which is a file system with a simple structure, based on metadata, allows for high internal consistency, is capable of being defragmented on the fly, and does not need to be unmounted before to reassemble it; and intelligent FileSystem which is a journaling file system that performs daily activities during system idle, and has been chosen by MorphOS as its standard file system.

Official variants of the Amiga file systems.

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 File Names (DOS6)
  • FFS long file names (DOS7)

Both DOS6 and DOS7 feature international filenames that appear in DOS2 and DO3, but not in Directory Caching, which was dropped due to bugs in the original implementation. DOS4 and DOS5 are not recommended for use for this reason.

All new versions are backward compatible, but not necessarily backward 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 of the Amiga operating system. For this reason, DOS0 used to be the format of choice for software developers distributing on floppy disks, except when using a custom file system and boot block, a common practice in Amiga games. Where the software needed AmigaOS 2 anyway, DOS3 was generally used.

Fast File System 2 Plugins

With the "AmigaOS 4.0 July 2007 update" in 2007, the first two addons for FFS2 were released:

  • fs_plugin_cache: increases FFS2 performance by introducing a new buffer data storage method.
  • fs_plugin_encrypt: Data encryption add-on for partitions using the Blowfish algorithm.

File Name Extensions

AmigaDOS only has a single required filename extension: ".info", which must be appended to the filename of each icon. If a file named myprog exists, then its icon file should be named myprog.info. In addition to image data, the icon file also records the program's metadata, such as options and keywords, its own position on the desktop (AmigaOS can 'snapshot' icons at defined locations by the user) and other information about the file. The directory window size and position information is stored in the ".info" associated with the directory, and the disk icon information is stored in "Disk.info" at the root of the volume.

With the exception of icons, the Amiga system does not identify file types with extensions, but instead will examine the icon associated with a file or the file's binary header to determine the file type.

Contenido relacionado

GNU GRUB

GNU GRUB is a multi-boot loader, developed by the GNU project that allows us to choose which Operating System to boot from those...

Token Ring

Token Ring is a network architecture developed by IBM in the 1970s with logical ring topology and token-passing access technique, using a 3-byte frame. >...

Tetris

Tetris is a logic video game originally designed and programmed by Alekséi Pázhitnov in the Soviet Union. It was released on June 6, 1984, while working for...
Más resultados...
Tamaño del texto:
undoredo
format_boldformat_italicformat_underlinedstrikethrough_ssuperscriptsubscriptlink
save