This document talks about some of the basics with starting up, setting up, using, administering and shutting down the typical AMOS-based system. By typical, I mean specifically AMOS/32, the most common version, which runs on the majority of 68K-based Alpha Micro systems; despite this, however, this document is still largely applicable to AMOS/L and the oldest S-100 WD-16 systems (less so for the most current Windows XP/EAMOS systems, which are well-documented and have their own unique characteristics). Note that this document does not cover complex administration tasks, nor does it cover the entire length and breadth of the AMOS command set, nor does it cover tools such as VUE and MULTI in anything but an elemental sense.
This document assumes you have some working knowledge of use and basic administration of a multi-user system such as Windows NT/Windows Server or a Unix or Un*x derivative operating system.
AMOS has some unusual features for an operating system. One of the most unusual is that the 68K, a big-endian chip, is run effectively in little-endian mode due to bus line swaps needed for preserving data file compatibility with the WD-16 systems. Although the kernel (called the "monitor") preemptively multitasks, AMOS is also a strictly real-memory operating system: it does not use an MMU, nor does it require one. Memory is partitioned into fixed segments and programs are expected to be relocatable to whatever address they are loaded without any patching. Programs can also be marked as "reentrant" and/or "reusable," i.e., respectively, that their memory image(s) can be run simultaneously by multiple users without interference, and/or that the image can be held and called again with the expectation it can self-initialize without being explicitly reloaded.
On the Alpha Micro DB-9 side, this is the wiring schedule (with 8P8C colours) for RJ-45 female to 25-pin RS-232 DB-9 (DE-9) male. Both the DB-9 (DE-9) and DB-25 modular converters can easily be found at places like Fry's for a few bucks. Colours refer to the wires within the adaptor. In this orientation, the female RJ-45 "lock snag" is at the bottom with line 1 on the left, and the male DB-9 (DE-9) has pin positions 1-5 on the top row with pin 1 on the left.
There is no real convention for where the console terminal port usually sits, so you may need to try different ports before you find it. If the ports are arranged horizontally left to right, try the left-most port; if they are arranged left to right and top to bottom, try the upper left port or bottom right port. Either way, configure your terminal for 19.2kbps, 8N1 or 9600bps, 8N1. If you don't have a real Alpha Micro terminal, you might have some garbage when you boot, which is expected. Somewhat later we will discuss how to change the characteristics of your terminal if you have this problem.
All files are in 6.3 format, which is to say, six letter filenames and three letter extensions. Like most operating systems, there are a number of reserved file extensions (this list is not exhaustive):
Remembering the PPN and disk number for a whole bunch of accounts would be irritating and tough to juggle, so you can establish an alias called an ersatz for a (disk,PPN) pair. There are several common ersatzes on just about every system:
Similarly, OPR:, the operator/system administrator account, is virtually always DSK0:[1,2]. There can be operator accounts ([1,2]) on other disks with administrative privileges to accounts on those disks, but not to the system at large.
There are no subdirectories in AMOS.
If you omit the disk name, then the current one you are logged into is assumed. If you omit either part of the PPN, like [,5], or the PPN altogether, then the current one you are logged into is also assumed. Things like COPY DSK1:=DSK0:, for example, don't copy the whole disk; it copies from the current PPN you are in on DSK0: to the same PPN on DSK1:, assuming it exists.
Wildcards (*,?) are valid in filenames, file extensions and PPNs (e.g., [*,5] and [*2,???] are legal, although [2*,5] is not -- note that ??? would match a number of one or two digits as well as three), but not disk device specifications. The idiom [] is the same as [*,*], so COPY DSK1:[]=DSK0:[] would copy all files (because COPY also assumes *.* by default). To refer to all disks, use ALL:.
PPNs can also be used to designate things akin to ACLs and user groups. By default, a particular file is readable and (for executable files) executable by anyone, but can only be written to or deleted by people logged into its PPN or a PPN with the same project number (the first number of the two). Thus, assigning people the same project number allows them to be in the same "workgroup" and access and manipulate each others' files. For AMOS filesystems with "extended files" in them, this can be made much more granular. Remember, anyone logged into OPR: can read, write, change and delete anything.
Systems may also have usernames for login, but this is different from a PPN/password system. If you get a username prompt and you don't have a login, try System Service, which is the default administrative user on a minimally-configured system. This username is usually attached to the SYS: account. Another common pre-configured username is DEMO, which is often attached to OPR:.
Terminals are much more flexible, dynamic entities than on many operating systems. Every terminal must have a job attached to be functional, but the job attached to the terminal may change. In addition, you can force input into a job as if the terminal the job is attached to were entering the commands (in fact, this is very common in the system initialization file).
We'll talk about adding more jobs and terminals presently.
To manage license caps and lock installable software options to a particular machine, many installed software packages require a PIC (Product Installation Code) keyed to the SSD. The PIC enforces certain options and, where applicable, maximum user caps. If you do not have a PIC for a particular package and system combination, do not try to install the software or you may damage your system with a failed install. Later versions of AMOS may not require you to enter a PIC for certain packages like AlphaTCP, so check your documentation.
Typically, the PIC will come from the vendor or VAR who sold you the package. Your SSD's serial number is usually on the exterior of the system case and must be provided to the VAR to generate the PIC when you purchase it.
If this is done right, on an AM-62 or compatible terminal you should see something like 'System booting, please wait' in the status line and the Alpha Micro logo and copyright scroll into view. After that, the lines in SYS:AMOS32.INI will be executed.
At that point, most systems will put you at an AMOS command prompt (., a single dot), usually in the OPR: account. If this doesn't happen, type LOG OPR: and, if requested, the operator account password. You will now have administrative privileges.
On certain systems, you may need to enter a username/password first, and you will usually be placed in whatever PPN is the default for that username. If you don't have a username, try System Service or DEMO. (I have some tips on how to legally! break into a used Alpha Micro you may have acquired on the Eagle 450 page, showing the steps how I got control over that particular machine.)
Shutdown requires generally no special preparation. Make sure all users are out of any applications, including you, and are logged off the system. At that point, barring special caching or backend setups, you can simply turn off the main system, followed by external drives, printers and finally the console terminal. However, if you are using devices with write-behind caching or just want to be paranoid, unmount those devices with MOUNT diskspec:/U, such as MOUNT FLP0:/U. Your system should have these "special devices" marked.
Commands consist of a command name, any switches (switches start with /), an input file, and for those files generating output, an output file such as any of the following:
TYPE/P SYS:AMOS32.INISwitches can also come at the end of a command line, although most people coming from a DOS or Unix background (like me) will probably put them in leading position and that's fine too. However, if you are using a system prior to AMOS 2.0, you must put them at the end: TYPE SYS:AMOSL.INI /P If you are using, say, 1.3C, remember to convert examples below to this format.COPY/Q/NOD COPY.TXT=ORIGINAL.TXT
Redirection (<, >) is supported on later versions of the operating system, and so is piping, although these operations are not chain-able. If this doesn't work right, type SET REDIR to make sure that redirection is enabled. The REDIR command can "steal" the output from a command if you are otherwise unable to redirect.
Later versions of the AMOS command line understand quoted strings and backslashes. You might also be able to hit CTRL-R to retype a line.
There is no concept of "searching the path" on AMOS. Instead, commands are sought for in a particular hard-coded order: SYS:name.LIT, then name.LIT in the current account, then SYS:name.CMD, then SYS:name.DO, then name.{CMD,DO} in the current account, then name.{CMD,DO}[,0]. If you don't know where a command is, try FIND name.* or if that doesn't exist, its equivalent DIR ALL:[]name.*
Here is a table of the typical filesystem commands you will use in AMOS, along with their DOS/Windows CMD.EXE and Un*xy equivalents. An asterisk (*) indicates that there might not be online help for that particular command. Common options are in (parentheses).
AMOS | Un*xy Thing | MS-DOS |
dir (/w) (/f) | ls (-C) (-l) | dir (/w) ([default]) |
erase | rm | del |
copy | cp | copy |
append | cat | copy /c |
rename | mv | ren |
type | cat | type |
type/p | more | more |
find | find | dir /s |
rename/prot(*) | chmod | - |
Commands like COPY and RENAME that require you to specify an output filespec work a little differently. For example, to rename file A.LST to B.LST, the command would be RENAME B.LST=A.LST (like the RENAME disk command for Commodore 1541 disk drives). You can also specify a full device and PPN if necessary: for example, to copy all files named EGREP.* from, say, DSK5:[100,100] to the current PPN, then you would enter COPY EGREP.*=DSK5:EGREP.*[100,100] or the equivalent.
This does not in general apply to CDs if you have a CD-ROM system. If you have ISOCD, you can use this to browse any ISO 9660 CD, but it cannot mount them as AMOS devices. AMOS-format CDs such as the AlphaCD can be mounted using the ACD command to set up the logical disks on the CD-ROM as ACDn. (Remember to unload it when you're done with ACD /U.)
To edit a file, type VUE filespec:. You can enter a new filename that doesn't exist, in which case VUE will ask if you want to create it. VUE will refuse to edit files with certain extensions, such as .LIT or .BAK -- rename them if you want to open it anyway. A backup file will be created (.BAK) if the file already existed, and the editor will start.
VUE is a modal editor. Press ESC to switch back and forth between edit and command modes.
VUE is much nicer on an Alpha Micro terminal because the cursor keys and special editing keys work; otherwise, you're pretty much condemned to key combinations. The equivalents for most basic operations are:
Special sequences start with a colon, and comments with a semicolon. For example, this script prints a message and edits the file specified on the command line:
; only show output of commands, not the commands themselvesRemember to put the file in a standard place like CMD: if you want to access it from other accounts.
; to show commands, use T
:R
; this acts like a here-document
:<
Now editing the file $0.
Notice that arguments start with 0.
>
VUE $0
If you put a command file called START.CMD into a particular PPN, it will execute when you log into that account (very handy for automated tasks and the like).
To start MULTI and play with it, type MULTI.
The following tasks can generally be done "hot" without restarting:
Note that this doesn't find soft problems such as defective (but physically intact) directory entries and the like. The equivalent to fsck is DSKANA but DSKANA can destroy a disk if run while other users are accessing it! It is strongly advised you read the System Administrator's manual before trying to repair or scan a disk for soft errors, or you could make the problem worse. If you just want to scan a disk without attempting to repair it, use DSKANA/C.
The SYSACT prompt is an asterisk *. To list all the PPNs on the device, type L (or use the PPN command). For help, type H. You cannot remove accounts without clearing files first. If you want to wipe the disk, use option I but this will erase all data!
To exit SYSACT, type CTRL-C or press Cancel on any Alpha Micro terminal.
MONTST AMOS32,TEST.INIThis will launch the AMOS/32 monitor (i.e., the kernel) with the new system initialization file. If this works as expected, then replace SYS:AMOS32.INI with your new file and restart the system. If it doesn't, simply reboot (either from command level or hitting the reset button) and try again.
If your terminal is so hosed that you can't even edit the INI file, grabbing it over FTP and editing it remotely on another computer might be worth a shot if your Alpha Micro has a running copy of AlphaTCP.
AlphaTCP is AMOS' grafted-on TCP/IP stack, essentially an implementation of (per developer Steven Lawson) SpiderTCP and SpiderStreams, emulating System V, with later work to add Unix-like signal handling and a faked-up fork(). In fact, some of its command set feels a lot like Unix. AlphaTCP will only run on an '020 or later, and an '030 or later is strongly recommended, but machines upgraded with Roadrunners will work too so even your AM-1000 can come play if you pony up the green. Ethernet is preferred, but SLIP over a serial port is possible.
Certain machines and hardware options may demand a minimum version of AlphaTCP, or they will not function. If your particular setup came preconfigured with a particular version of AlphaTCP, do not downgrade it. (Upgrading is of course safe.)
AlphaTCP has several versions, but the minimum version that is "truly useful" is 1.3A due to the considerable stability and architectural improvements made in this release. 1.3 also was the first version with a HTTP web server, which makes sites like this even possible! Later versions add performance, fix some minor bugs and add many additional features, but if the cost of a new AlphaCD has your teeth chattering and you're running 1.3A, don't worry about it -- you won't get all the newest stuff, but you do have all the essentials and there are no known remotely exploitable security issues either. In fact, I fuzzed my 1.3C Eagle pretty badly on several ports and didn't get anything of consequence. Of course, running cleartext services like telnetd or ftpd on an WAN is a nice way to get pwn3d, so you shouldn't do that, and there is no ssh for AMOS. That's why mine sits behind a firewall for external access.
Note that BOOTP/DHCP support as a client requires 1.5.
For client applications, AlphaTCP 1.3A minimally implements NSLOOK (nslookup, DNS queries), ARP, PING, NETSTA (i.e. netstat in 6 characters), a strange PS modeled on Unix ps purely for AlphaTCP applications with a corresponding UKILL, RUPTIM (ruptime), TCPMON (a simple packet monitoring interface), UUD/UUE (uudecode/uuencode), EMAIL (an SMTP MTA interface), TELNET, FTP and TFTP. FINGER was added in 1.3B, URL (essentially a tiny curl for FTP and HTTP only) and WHOIS in 1.4, AMPM (the Alpha Micro Product Manager) in 1.5, and after great delay the very essential TROUTE (traceroute) in 1.5A. Furthering the Unix-isms, many of these use hyphenated switches, not AMOS' standard slashed switches.
There is no web browser for AlphaTCP other than what URL offers, but there is a Gopher client that we maintain at Floodgap.
Enter terminal type and memory required (default is 64K)If you don't see your terminal type in the list you get with ?, you might need to install it. 1.3 lacks a VT100 compatible .TDV which seriously impacts the breadth of clients that can talk to it, but I have the customized one I use on the Downloads page which will work for most VT100 emulators including xterm and Mac OS X Terminal. A comfortable memory allocation if you can afford it is 640K, which is the typical amount I ask for when I log into my machine, but strictly speaking you should only allocate the minimum amount to run what you need without impacting the free memory pool on the system.
or a question mark (?) to see a list of supported terminals
Example: >am65a 64k
After that, you will get a login prompt. Login with your username/password. If you don't know a login username, try System Service or DEMO.
To find out what job has been dynamically allocated to you, type JOBALC (and similarly your job and pseudoterminal will also show up if you type TRMDEF). If you have 1.3C or later, the VTID command will also tell you your source IP and source port number.
To log off of a machine, type LOGOFF and a summary of usage will be printed before you disconnect.
All services are managed by TCPEMU, which is analogous to inetd with an attitude problem. Setting up TCPEMU and AlphaTCP is such a big topic that you really need to read the manual for it. Configuring and building an AlphaTCP installation from scratch is not exactly intuitive until you've done it a few times and made all the possible mistakes (this is indeed how I learned too). This document will assume you have a system preconfigured or someone assisted you with the initial bring-up.
Assuming you're past that point, the file TCP:NETWRK. (notice the overtly blank extension!) contains the IP address for the particular interface in question, assuming you are using a static IP and not DHCP. TCP:RESOLV. is the analogue of /etc/resolv.conf; the line tryhostfile will cause the DNS client to look at TCP:HOSTS. (in fact, first before any DNS query is made in 1.4+) for any relevant entries. Services that TCPEMU runs are in TCP:CONFIG. but you should really understand what this is doing before you edit it! Changes can be made live, but it would be best to followup with a restart to ensure that they stick.
The web server uses some ingenious but not entirely obvious tricks to map a apparently much larger filesystem onto the simple AMOS PPN scheme, and this can really trip you up if you don't understand it fully. To keep aliasing from being a problem, I recommend just keeping your names in the 6.3 format and then you don't have to worry about what long filename will map into what short one. By default, the home document is TCP:HTTPD.HTM, but files can be stored anywhere; for example, this file is /www/amos.htm, which maps into WWW:AMOS.HTM. Note that the default "default file" in a "directory" is HOME.HTM, not INDEX.HTM. Any ersatz with a PUBLIC.PPN file in it is servable by the webserver; don't put this in SYS: because that would be really stupid and dumb, wouldn't it?
As a consequence of how filename mapping is performed, it isn't possible to serve any file from the root "directory" except HTTPD.HTM (and ROBOTS.TXT, which is "special-cased"), unless you redefine where the root is using the -m option in 1.4+. Since this isn't possible in 1.3, you are limited to those two files in the root, so start defining ersatzes for everything else. FAVICON.ICO is served from TCP:FAVICO.ICO, but this isn't supported in 1.3 either.
1.3A supports imagemaps and hit counters internally. CGI scripts are also supported, but must be pre-defined in TCP:HTTPD.APP. For example, here is the one for the local systat:
#systatCGIs do not need to emit headers, but they can if they want. You can write CGIs in AlphaBASIC too, and have them accept arguments and POSTs, but you should read the manual for security considerations first.
Application=systat
Command=SYSTAT
Memory=50k
Kill=Yes
Decode=No
Account=SYS:
Mime=text/plain
Unlike most of the configuration files, MIME.TYP is stored under LIB:, not TCP:.
There are some other differences in HTTPD relative to later versions which are not properly documented in the AlphaTCP manual.
One final note: older versions of FTPD bug out on many graphical clients due not only to the strange filesystem but the missing SIZE command. 1.4A fixed this problem and other issues with crummy clients, but your ugly but dependable command line ftp is not bothered by any of this and works just fine with any version of FTPD. You can cd directly to a PPN, just like LOG from the command prompt. You should be running FTPD with the -n -o options to make it act "like you expect it to," and you may need to force your client not to use passive mode. For example, when connecting to this server from my Fedora workstation, I start ftp with the -A option so passive mode is turned off.