Previous Thread
Next Thread
Print Thread
How do I login? #26322 19 Feb 03 10:15 AM
A
Anonymous
Unregistered
Anonymous
Unregistered
A
I have plenty of experience with various dialects of BASIC and OS versions but none whatsoever with AMOS or A-Shell. How do I log in at the dot prompt? TIA

Tom L

Re: How do I login? #26323 19 Feb 03 12:52 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Welcome to the world of AMOS and A-Shell, where we use the "log" command roughly in place of the "cd" command in UNIX or DOS. Log is actually a better name, because for us, the log command is actually a combination logging into the system and changing to a particular directory.

The argument to the LOG command is combination of a device and "PPN". Devices have names like "DSK0:" and PPNs are pairs of octal numbers from 0-377 separated by a comma. (PPN stands for "Project, Programmer Number which maybe gives a clue to the idea behind it. In practice, applications tend to be grouped into a single "project", and the "programmer number" is used for some further division of files within that project.) Some examples:

Code
.LOG DSK0:[1,4]
.LOG DSK0:1,4
.LOG 1,4
.LOG dsk0:
.log ,4
.log sample:
  
These examples illustrate that all dot-prompt commands are case insensitive (like DOS), and that you can specify both the device and PPN, or either one, or also just the second part of the PPN. In cases where you omitted a part, the assumption is that your current logged-in location will supply the default. So for example, "log ,4" will log you from DSK1:[123,7] to DSK1:[123,4] or from DSK0:[1,2] to DSK0:[1,4].

Devices are analogous to drive letters in DOS, only in our case, they generally consist of at least 3 letters followed by a 1-3 digit number.

We also support "ersatz" devices, which are consist of 2-6 alphanumeric characters (starting with an alphabetic character) and followed by a colon. These are simply aliases, and are defined in a text file DSK0:ERSATZ.INI[1,4]. In the examples above, "sample:" would have to be an ersatz device.

Unlike most other operating systems, it is possible here to have a dot prompt but not be logged in. This is why you are getting a "?login please" or "?not logged in" error. Some commands can be executed while not logged in (like the LOG command itself), but most cannot. The other notable exception is any command file (same idea as a BAT file under DOS or a shell script under UNIX) can be started, but it had better start off with a LOG command or else it won't be able to accomplish much.

Unlike most other operating systems, passwords are associated here with directory names, but only optionally. If, for example, there is a password on DSK0:[1,2], then when you LOG there, you will be prompted for it.

Aside from that, A-Shell identifies you by the name you logged into the operating system with.

Since A-Shell is an emulation of AMOS which runs on Windows/UNIX systems (with do not have AMOS-style device:PPN organization), we map the AMOS device:PPNs to directories. This is done explicitly via DEVICE= statements in the miame.ini file (see the A-Shell Users Guide) and implicitly by converting each PPN from a pair of numbers to a single 6 digit number. For example, DSK0:[1,4] may be equivalent to C:\vm\miame\dsk0\001004 or /u/dsk0/001004.

To start off, you can always count on DSK0:[1,4] (or the equivalent ersatz name SYS:) existing, since that is where the system commands are kept. So you can start with:

Code
.LOG SYS:
  
From there, you can use DIR/W to get a list of the commands (which have LIT extensions.) You can use PPN to get a list of PPNs on a device, or DIR/W :[] to get a list of all the files on a device. DEVTBL will display a list of all the devices, and ERSATZ will display a list of the ersatz devices. A special device ALL: can be used to get a directory of all devices (e.g. DIR/W ALL:[] will list all the files on all the devices and all the PPNs.) SYSACT will allow you to create a new PPN on an existing device. Most commands will display some help if you execute them with a /? or /H switch.

Hopefully that will be enough to get you started (and probably make you dangerous...)


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3