[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with commannds



In article <adjohann-0506960553000001@196.3.168.53>, adjohann@global.co.za
(BinaryMan) writes:

>   I was just given an Apple II, and I don't know a thing about it. Could
>you help me telling me the main commands, the stuff I would need (I got a
>5'25 drive but no HD), and everything I must know about it. ....



DOS MINI-MANUAL


DOS 3.3 Versions:

    Today, most "DOS 3.3 users" do not actually use DOS 3.3. Beagle Bros
introduced patches which resulted in much better speed and a CATALOG which
shows number of Free Sectors. Their ProntoDOS or some modification of it
is,
for practical purposes, the "current version".

    ES DOS ][ adds a few mods to ProntoDOS-- Catalog shows Free Sectors
and
Number of Tracks, default is to scroll entire Catalog (scrolling stopped
by
pressing any key), and the
semi-colon can be used as a terminating 'wildcard' character.

    There are also several small, special-purpose versions of DOS 3.3. For
example, one game maker used RDOS to save space and to make its diskettes
harder to copy. 


    To get very far with DOS 3.3 you will need the DOS Manual. This is
especially true when it comes to using TEXT files. For now, the following
is a quickie guide to most Apple II DOS 3.3 commands:


LOAD NARF- loads a BASIC file named NARF.

SAVE NARF- saves current BASIC program in memory as file named NARF.

DELETE NARF - deletes file named NARF

CATALOG - lists contents of diskette to screen

RENAME NARF, NEWNARF - renames file NARF to NEWNARF

RUN NARF- loads and starts a BASIC file named NARF.

BLOAD NARF.PICTURE, A$2000 - loads in a binary file named NARF.PICTURE
starting at address $2000

BSAVE NARF, A$300, L$7F - saves $7F bytes of memory starting at address
$300 as a binary file named NARF. (BSAVE NARF, A768, L127 uses decimal
numbers to do the same thing.)

BRUN NARF.DISP, A$1000 - loads in a binary file named NARF.DISP starting
at address $1000 and starts executing machine instructions at address
$1000

LOCK NARF- locks file NARF (indicated by * in a CATALOG). LOCKed files
cannot be deleted, over-written, etc.

UNLOCK NARF - cancels LOCKed status of NARF.

VERIFY NARF - uses checksums to verify that NARF is not a damaged file

MON C, I, O - tells DOS to display Commands, Inputs from disk, Outputs to
disk. You can specify one, two, or all three (e.g. MON C, O  etc.).

NOMON C, I, O - cancels all MON requests. NOMON I cancels just the "I"
request.

MAXFILES 7 - sets the number of file buffers to 7. (Upon booting DOS, the
default for the MAXFILES value is 3.)

PR#1 - sets the destination for Apple outputs to the device in Slot 1
(usually a printer).  PR# 3 sets it to Slot 3, etc..  PR# 0 sets the
destination back to the display screen.
PR#6 - normally, boots the diskette in Drive 1, Slot 6.

IN# 6 - sets the source for Apple inputs to the device in Slot 6.
IN# 0 - sets the source for Apple inputs to the keyboard (default).

INT - (integer) puts system into Integer BASIC if it is present.

FP - (floating point) puts system into standard Applesoft BASIC.    

OPEN NARFOO - prepares to read or write a TEXT file named NARFOO.

READ NARFOO - tells DOS that INPUT and GET statements will obtain
characters from a TEXT file named NARFOO.

WRITE NARFOO - tells DOS that PRINTed characters will go to a TEXT file
named NARFOO.

CLOSE NARFOO - used to terminate access to a TEXT file named NARFOO. Just
CLOSE terminates access to all OPENed TEXT files. 

EXEC NARFGO - tells DOS to execute the BASIC and DOS commands found in a
TEXT file named NARFGO

The above TEXT file commands handle 'normal' sequential TEXT files. DOS
can also OPEN, READ, WRITE, ... random access TEXT files. (See DOS
manual.)


Most DOS commands also let you specify Drive and/or Slot.
For example CATALOG, D2  lists the contents of the diskette in Drive 2 to
screen. SAVE NARF,S5,D2 saves NARF to Drive 2 in Slot 5.

NOTE --> Using Drive or Slot parms in a DOS command sets the default Drive
or Slot. So, after CATALOG, D2, a plain LOAD or SAVE will access Drive 2.


To use a DOS command from the keyboard, type it in. (A few commands can be
issued only from a program.)  To use a DOS command in a program enclose it
in quotes preceded by PRINT CHR$(4). For example:

100 PRINT CHR$(4) "BLOAD NARF, A$2000"

Use variables in a command this way:

120 PRINT CHR$(4) "BSAVE NARF, A$2000, L"; NB

Line 120 says that the Length of NARF is the value of variable NB. NB is
used here to represent the number of bytes, a decimal number.
 

   One of the best features of DOS 3.3 is that any bootable DOS diskette
can create other bootable diskettes.

INIT HELLO - formats the diskette in the currently active drive, adds DOS,
and saves the current program as HELLO.

   The program that's automatically placed on the new diskette is the one
in memory when INIT is executed. The "hello program" is run when the
diskette is booted. Usually, the program is named HELLO; but, you can INIT
HOWDY, or any name you like. The program can be very simple, such as ...

100 PRINT CHR$(4) "CATALOG"
110 END

   Each DOS 3.3 diskette has a Volume Number set at the time it is
initialized. The default Volume Number used by INIT is 254. You can set
the number to something else at the time a diskette is initialized:

INIT HELLO, V19

Although several DOS commands can specify Volume--

LOAD NARF, D2, V5    ---

few DOS programs use Volume Number information. Unless an application
needs to employ Volume Numbers, it is best to stay with the default value
to avoid unnecessary complications.

   Here are a few DOS terms that will help explain what's going on:

   FORMAT means to write 35 empty Tracks of 16 256-byte sectors each,
verify
the Tracks and create a "Contents" record called the "VTOC". The VTOC has
such basic information as Number of Tracks, Sectors per Track, DOS
version,
..., and the 'map' of used/un-used sectors. DOS 3.3 writes the VTOC at
Track
17, Sector 0. FORMAT does not put a copy of DOS 3.3 on the diskette. 

   INIT HELLO means to FORMAT a diskette; AND, to Copy DOS to the
diskette,
mark-off the sectors used, and Save the current program under the name
HELLO.

   The current program-- i.e. whatever BASIC program is in memory when you
do the
INIT-- is the one which DOS will execute when the INITed diskette is
booted.
It is called the "greeting program" or "hello program" and is usually
named
"HELLO". You are free to load in and change the hello program or even
delete
it, just like any other. The one restriction is that once a disketted is
INITed, the name of the hello program is fixed for that diskette. This is
why
it's a good idea to stick with the name HELLO. You will always know what
the
hello program's name is.

   BOOT comes from the idea of 'pulling yourself up by your bootstraps'. 
The
Apple II disk controller ROM has just enough smarts to load-in DOS's
Bootstrap Loader from Track 0, Sector 0 (it comes in at address $800 ...).
The Loader loads in a still smarter, bigger routine from several sectors
of
Track 0. This routine is the one which loads in the rest of DOS, moves it
to
the proper place in memory, and ends up going to DOS's Cold Start routine.


   When it comes to the way it is stored on-disk, DOS 3.3 is not like the
PC's MSDOS or Apple's ProDOS. DOS 3.3 is 'hidden' on reserved tracks.
There
is no "DOS 3.3" file. If a DOS 3.3 diskette boots, DOS 3.3 is present.


   Below is some useful 'nuts-and bolts' information:

   In a DOS 3.3 Catalog sector, the third byte in each file's entry tells
the type of the file:

Byte Contents*     File Type
    00                     Text
    01                     Integer BASIC
    02                     AppleSoft BASIC
    04                     Binary
    08                     S type 
    10                     R: Relocatable object module
    20                     new A type
    40                     new B type


*DOS sets bit 7 of the byte if the file is locked. (e.g. 84 --> a locked
Binary file)

    Type R files show up in just a few applications. An R file begins with
6
bytes which a "loader" routine can use to tell Target location of file
contents, How many bytes to move, and Source location to move from.

    Although S, new A, and new B are included, no official application was
defined for them and no DOS commands were created to make any special use
of these files.-- Rubywand
_______

   There was an "R" type relocating loader included with the toolkit for
use with BASIC programs and relocatable routines being loaded into
upper memory.

  "S" was used by some programs for a generic image file, or something
that was not likely to be touchable with normal code.

   The LISA assembler used the second "B" type for its source files.  It
had a patched version of DOS that changed the file type list to read
"LARSBAIT", so the source files appeared in the catalog as "L" if you
booted LISA, or "B" if you booted a normal disk.

   The "B", "A", "R" and "S" special file types cannot be accessed by
BASIC programs (unless you patch DOS) - commands are only provided for
dealing with "B", "A", "I" and "T" files.

   The four special types can only be accessed using direct calls to the
File Manager. -- David Empson
_______

   DOS 3.3 file structure is not heirarchial-- there are no subdirectories
or
"folders". There are eight filetypes, of which B, A, I, and T are the most
common.  A DOS 3.3 Catalog display looks something like this:

   DISK VOLUME 254
 *A 002 THE LAST FILE
  B 033 TETRA/SOFT LOGO
  T 142 DAVE'S LIST OF DOS COMMANDS
  I  002 INTEGER BASIC PROGRAM
 ^^ ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 || ||| ||||||||||||||||||||||||||||||
 || ||| |______________________________Filename
 || |__________________________________File length (MOD 256)
 ||____________________________________File type
 |_____________________________________* means the file is locked


A NOTE ABOUT DOS 3.3 FILENAMES:
DOS 3.3 filenames may be up to 30 characters long, and must conform to the
following restrictions:
 a.  The first character must have an ASCII code greater than 63 ("@")
 b.  Commas and colons may not be used.
Apart from that, anything goes, including uppercase, lowercase, numbers,
symbols, and CONTROL characters.
 
All file commands (including CATALOG and INIT) have optional switches
available:

,Sn  Specifies disk controller slot number n, usually 6.  Default is
     the most recently accessed slot.

,Dn  Specifies which drive on the controller.  Unless patched, DOS 3.3
     only knows about D1 and D2.

,Vn  Seldom used; specifies a disk volume number.  Most disks are V254,
and
     the default is V0, which matches any disk. --Dave Althoff, Jr.
_________

ProDOS

    ProDOS is the official Apple ][ DOS which came after DOS 3.3. (By the
way,do not confuse "ProDOS" and "ProntoDOS". ProntoDOS is a slightly
modified DOS 3.3 which runs faster.)  ProDOS has lots of nice features--
mainly, you can
create sub-directories. ProDOS shares many commands with DOS 3.3, too;
but,
it does NOT have a command like DOS 3.3's INIT.

    To create a ProDOS disk you need a utility program (like a later
version
of Copy ][+)  to format the disk for ProDOS use. (Or, you can disk-copy a
ProDOS diskette.)  If you want the ProDOS diskette to be bootable and to
be
able to run BASIC programs, you must also copy a file named "PRODOS" and a
file named "BASIC.SYSTEM". The "hello program" for a bootable ProDOS disk
is
always named "STARTUP". --Rubywand


Rubywand