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

Re: How start BASIC without diskette?



Just to get you up and running with DOS, ProDOS is mostly the same on
this level (though very different on the inside):

You can type DOS commands at the BASIC prompt as soon as DOS is loaded.
DOS commands are not BASIC however; they don't put file name parameters
in quotes like BASIC strings for example, they don't accept BASIC
variables as parameters, and they use named parameters for many things.
Also they can't be directly included in BASIC programs without a little
hack.

CATALOG shows information on the files on the active disk. In ProDOS,
CAT shows an abbreviated CATALOG. In DOS, it gives file name, size in
blocks, and file types. Press space to go on if the list doesn't fit on
the screen. DOS file type mean: A Applesoft (i.e. Microsoft) BASIC, I
Integer BASIC, B binary, T Text.

You RUN FILENAME to start Applesoft or Integer BASIC programs, while you
BRUN FILENAME to start binary programs. Some text files are batch files
that can be run by EXEC FILENAME, while some are really just text and
can't be run at all. If you want to retrieve a BASIC program without
starting it right away, you LOAD FILENAME, and you SAVE FILENAME to
store it. BLOAD and BSAVE do the same to binary code. VERIFY FILENAME
checks that a file was stored without read errors (I think it exists
only in DOS, not in ProDOS). You can DELETE FILENAME to get rid of
stuff, and LOCK FILENAME to prevent just that. UNLOCK FILENAME makes
deleting possible again.

Say INIT HELLO to format a disk in DOS and save the current BASIC
program as "autoboot program", which is by convention always called
HELLO. This convention makes sense since the name is fixed at formatting
time and can't be easily checked later. You can always DELETE HELLO
right after formatting if you don't want any program auto-booted.

If you booted DOS 3.3 (not ProDOS or an older DOS), you can usually say
INT to go to Integer BASIC (prompt ">"), and FP to go to Applesoft
(prompt "]" or a national variant). Both commands imply a BASIC "NEW"
command, so be careful.

In ProDOS, there is no formatting command, you have to load the version
of disk tools that comes with your ProDOS to do this, also you have to
copy the file BASIC.SYSTEM from your ProDOS master to the disk (via disk
tools) if you want to use it with BASIC. The BASIC "autoboot program" of
ProDOS BASIC.SYSTEM is always called STARTUP if I remember correctly,
not HELLO. Note that ProDOS 1.9 is the highest version that runs on a
II+ or Europlus. ProDOS disk format is different from DOS, so neither
can directly LOAD or RUN programs from each other's disks, nor display
their CATALOG.

In all DOS commands, if you want to use another drive controller card,
and/or the second drive on the same controller, you can give drive
and/or slot numbers. The first 5.25 inch disk controller card is by
convention always put into slot 6. So for example, you CATALOG,D2 to get
the file list of the other (second) drive on the first controller, and
you CATALOG,S5 to get it from first drive the next controller (in slot
5). Also possible is stuff like LOAD DUMB,S4,D1 that combines both
parameters. The new slot and drive then become "current" for subsequent
commands without slot and/or drive numbers. Every slot offers a maximum
of two drives (D1 and D2), cards that offer more drives do this by
pretending to sit in more than one slot.

To include DOS commands in BASIC programs, the following hack is used:
You PRINT the commands, preceded by CTRL-D (Character number 4).

So for example if you say

10 D$=CHR$(4)

you can then at a later point

100 PRINT D$;"CATALOG"

to get a list of files (NOT the word CATALOG) onto the screen.


One final thing: You can reboot the system from a slot after the
computer is already turned on with the command PR#<slotnumber>, for
example PR#6 to boot from slot 6. Only the first drive on any controller
card is bootable, something like PR#6,D2 doesn't exist.

-- 
Linards Ticmanis