NEWDOS/80 MODIFICATIONS.

An explanation of the modifications made by ALAN JOHNSTONE
to the NEWDOS/80 V2 disk operating system.
The information presented here is free for your own use with
the provisor that it never be used for commercial purposes.
The Disk has all documentation needed to implement and use
the mods described.
The information that allowed for the modifications is all
contained in the NEWDOS/80 operating manual by APPARAT. The
important point is to read the manual first if you do not
understand any of the processes discussed here. Today we will
cover version 6.0 of the modifications and try to explain
some of the less obvious points.
Distribution of the modifications does not include a copy of
the NEWDOS/80 DOS. Anything distributed by Alan has been
written by himself and is his to give out. The set of mods
distributed can be added to your system to update your
NEWDOS/80. You must have an original NEWDOS/80 system and
must be zapped to the current zap level.
Firstly there is a file on the disk called README/NOW. List
this to see what you should do. You may print it if that is
easier. You should also list or print DISK/DOC. Next go into
basic and run LISTDOC. This will allow you to list or print 
the relevant documentation to get yourself started. It will
also infer "RTFM" or if all else fails read the flaming
manual.

DOS OVERVIEW

BOOT/SYS located at the beginning of the disk has the job of
finding SYS0/SYS, loading then executing it. SYS0/SYS on
NEWDOS/80 is located in the very next granule on the disk
(sector 5)and its job is to initialise the system and bring
in SYS1/SYS which keeps track of and analyses the commands
you type in.
The mods hook on to the end of SYS0/SYS at HEX 5200, look at
the system switches, add some extra values to the system
command, sees what you have selected and moves the
appropriate bits up into high memory and then passes on to
the normal DOS initialisation.
The fact that they are in high memory can cause some problems
with other programs that load there. What you have to do is
change the SYSTEM command for specifying the maximum high
memory at boot (AP=). Make this a value below where your
programs load and the mods are guaranteed to load below this
value, leaving high memory intact. eg.SYSTEM AP=F7FF and the
mods will load below this, leaving from F7FF to FFFF for your
own programs.eg. spooler etc.
The AJ mods will not be loaded if you hold down the (SHIFT)
key during the boot process. This may be useful if you are
loading some games programes or doing some development. The
NEWDOS/80 manual states that holding down the (UP ARROW) key
will stop their keyboard driver coming in, so holding down
both the (SHIFT) and (UP ARROW) will stop the lot from
loading.

INSTALLATION

How to get the mods on to NEWDOS/80. You need a virgin system
disk with at least 10 grans free in drive 0. In drive 1 you
need another disk with BASIC and the AJ mods available.
Firstly copy from the system disk, SYS0/SYS to SYS0/OLD on
the mods disk. Then go to BASIC and run "CMDMERGE". It asks
you for the Output file to which you answer SYS0/SYS:0. The
first Input file it asks should be answered with SYS0/OLD.
The program will then ask for another Input file, to which
you answer SYSADD/CIM. When it asks for another input file
you just press enter. This has taken SYS0/OLD and added
SYSADD/CIM to the end and adjusted the entry points and then
placed it in SYS0/SYS.
You must now do a DIR A /SYS and check under the EXT column
to make sure that SYS0/SYS has only 1 extent. If it is not
you must insert a new disk in drive 1 and do:
COPY :0 :1,,FMT,CBF,/SYS. Then transfer disk in 1 to drive 0.
Verify that SYS0/SYS:0 is now only 1 extent.
The zaps must now be applied. Go into BASIC and run "ZAPPER".
This will now give you a menu to allow you to apply the zaps.
You may also use this to apply any of APPARAT'S zaps. Select
apply zaps files, which asks you for the zap file name. The
documentation on the disk will explain what zaps to use. For
example if you specify SYS2/ZAP it will then ask you for an
UNZAP file so that if you do go wrong, you can always bring
DOS back to standard. You should specify SYS2/UNZ. ZAPPER
will then go through and if everything is correct it will
state VERIFICATION COMPLETE. ZAP REQUIRED? You should answer
YES or NO. If you type YES it will actually apply the zaps as
it repeats the process.
Now you should BOOT your system and no changes should be
apparent. You should enter SYSTEM 0 and there should be a lot
of new parameter's. You now have to go through and set to Y
those features that you want active. eg SYSTEM 0 BR=Y,BT=Y
etc. Next time you boot up you will see that instead of just
the normal NEWDOS/80 you will get a message saying that the
changes by Alan are installed.

FEATURES

The documentation begins with the keyboard, screen and print
-er drivers and screen paging facility. With this you can
press the (CLEAR) key to see a new page or the (UP ARROW) key
to scroll up a line. This is enabled by pressing the (678)
keys together, which also creates a clunking noise to let you
know it is engaged. Type ahead can also be enabled and
displayed. See the documentation for full details.
Also included is a Resident System File Directory taking up
48 bytes in top of memory that has a set of directory
pointers to the system files, which means the system can go
straight to each overlay file on the disk without going to
the disk directory first. In use, problems can arise if you
pull out your system disk and insert a new disk which has
its files in different positions. To overcome this you have
to press the three keys (,./) to reload the directory
information.

DISK DRIVER MODS

Extended Disk Addressing. If you do a PDRIVE 0 you will see
a few new parameters eg DN=0,DS=0. You should go through
the PDRIVE tables and set PDRIVE 0 1 DN=1 A (ENTER)
PDRIVE 0 2 DN=2 A etc (this says that the logical drive is
the same as the physical drive) for each drive you want.
To the system you have 10 logical drives, not just the
original 3 or 4. Everytime you give the system a drive
number, which now means you can do a DIR 5 or COPY:6 :8, it
goes out to the appropriate PDRIVE entry for that logical
drive, sees DN=(physical drive number) and uses that as the
drive you actually work on. eg if you make DN=2 on drive 6
then that will equate logical drive 6 to physical drive 2 so
that a DIR 6 will access physical drive 2 with the PDRIVE
information of drive 6.
DS=0 is the drive select code. Normally drive 0 has a select
code of HEX 01, drive 1 has a select code of HEX 02, drive 2
has a select code of HEX 04 etc. That is the actual HEX value
it sends out to the port on the MOD III or the memory address
on the MOD I to tell the system exactly what drive select
line it is using to select the drive. This was originly put
in for people who had double sided drives and wanted to treat
both sides as separate drives. (NOTE. to select side 2 of a
double sided drive 0, the DS for drive 1 would be 9, 1 for
drive zero plus 8 to select the upper head of the drives.)
and wanted to treat both sides as separate drives or had to
do so because their previous DOS'S made them.
Automatic Disk Format Determination allows you to put any
disk into any drive physicaly able to take the disk and read
without setting up the PDRIVE tables. It obviously does not
allow you to put an 80 track disk into a 40 track drive and
read it. How it works is, if it detects any errors while
reading a sector in the directory, it will immediately say
we will approach this disk freshly and figure out what this
disk is.
The first thing it does is check the density to work out if
it is a single or double. It also does some checking to see
if you have a 40 track disk on a 80 track drive. It does this
by looking at what it believes is track 2 and if it finds
that when it reads it is actually track 1 then it knows you
have a 40 track disk in. It will also sort out if track 0 is
single density and track 1 is double or visa-versa.
It next looks to see if there is a PDRIVE table on the disk
and if so it will use that. It does this by looking for a
signature byte on the disk. It also checks if it is LDOS and
if not it works under the simple assumption that if its
single density then its single sided and 10 sectors per track
and 2 granules per lump etc. If it finds it is double density
it assumes 18 sectors per track, single sided and it also
makes a little change in the DOS to permit 6 sectors per
granule, which NEWDOS/80 does not normally permit.
NOTE: you cannot run a PDRIVE entry with 5 granules per
lump with these changes.
The way it is handled is by some hooks in the multiply/divide
routines that decide if this is a multiply or divide by 5 and
if this is a double density disk with 6 sectors per granule
(which includes LDOS as well as any other strange double
density) then we immediately change the 5 to 6 because we
assume we are trying to calculate a track number from a
relative sector number or lump number. Those are the points
where the system actually does it multiply or divide by 5.
So don't ever use GPL=5.
The changed NEWDOS/80 will generally read and write to most
double density and LDOS etc but no guarantees are made
because NEWDOS/80 will not necessary update directory
information exactly the way other DOS's would like you to.
It is recommended that you only use the changes for reading
other disks. LDOS has been quite successfully read and
written to from NEWDOS/80 and then successfully reread by
LDOS. So it can be done but no guarantees especially with
file update and date information.
Quite often you will get a program that runs under TRSDOS
or LDOS and goes down with illegal dos function the moment
you try to run it on NEWDOS/80 and this is because it is
trying to call in a dos overlay to scan the parameters for
it and return the results. For some reason APPARAT did not
supply this function with NEWDOS/80. You will find on the
mods disk a little program called GENPARAM which is a BASIC
program that installs PARAM/SYS as SYS29/SYS and sets up the
appropriate zaps to access it. This should now make a number
of those TRSDOS and LDOS programs start to work correctly.
This was originally written to allow EDAS to work correctly
on NEWDOS/80. There is also a file called EDASFIX/CMD which
can be put on with CMDMERGE.





     >6 M  P                                                                                                        