[net.micro.mac] 3.1.1 list manager and GetWDInfo problems

mkg@lzaz.UUCP (Marsh Gosnell) (06/12/86)

There are two problems that I've encountered that you ought to know about.

The first is in the list manager that was distributed with the December
suppliment.  The include file defines the selFlags as a byte (which, however,
takes two bytes due to alignment).  If you want a list where you can only
select one item, you are supposed to set bit 7 in selFlags.  Unfortunately,
the list manager tests for selFlags being < 0 instead of testing the bit.
To properly work, you must make sure that the upper byte is set to a value
(I used hex FF) that makes the field negative if you want the only-one option.

In the second problem, if register D1 is not zeroed before calling GetWDInfo,
GetWDInfo will sometimes fail and return the root DirId instead of what you
want.  The problem is caused during the computation of the index into the
working directory table when the lower half of D1 is loaded with a value and
the whole thing divided by 10.  Since the ROM doesn't clear the upper half of
D1, if it contains a large enough non-zero value, the divide will fail due to
an overflow.  This problem is fixed in 3.2.
    Marsh Gosnell