[net.micro.pc] Misc. IBM answers

dna@dsd.UUCP (01/09/84)

  Aww, what the heck, I might as well answer them all in the
same message..

>
> What is with the FORMAT program being position dependant?
>

  All programs on the PC are position dependant.  As has been
explained several times before, there is a problem with the
DMA controller in the PC.
  The DMA controller on the IBM-PC is an Intel 8237 device.
This chip only has sixteen address lines.  In order to allow
DMA to access all of memory, a set of DMA page registers was
added.  These page registers dump out the upper four bits of
the address durign DMA-ACK.  Unfortunately there is no carry
output from the 8237 (or any DMA controller that I know of
for that matter).  This means that should your I/O buffer cross
a page boundary, the wrong thing will happen.  Since there is
no way to increment the page number, the DMA controller will
happily transfer up to the end of the current page, then start
at the beginning of the CURRENT page.  This is a problem with
ALL DMA transfers on the PC (whether these be floppy, hard disk
or HDLC controller).  There are several software fixes to this
(such as checking the physical address and moving the buffer
somewhere else if a problem exists) and a very nice hardware
kludge that has been used by other manufacturers for years
(something to do with two page registers for each level and
using bit 15 to select which page reg to use..)

>
> Why does my system generate PARITY CHECK 2 errors durign
> disk accesses?
>

  If your system has an old IBM 64k memory card, this stands
a good chance of being your problem.  I was just told that up
until the end of LAST year, IBM would trade the old 64k cards
for the new expandable cards free of charge...  too late now.
Another alternative is the speed of your memories.  If you are
using 200 ns parts as IBM specifies, this could also be your
problem.  If your system has alot of memory in it and you do
alot of DMA (remember that all disk accesses are DMA) then the
200 ns parts may fail.  This is why IBM now ships all units with
150 ns parts in it.  *NOTE* this is unofficial.  I have no official
ties with IBM so take it for what it is worth.

>
> Does DOS function 48h work?
>
  YES.

  Need I say more?  Probably.  The first and most important thing
to remember is that any program loaded from a .EXE file is given
all available user memory.  If you don't believe this just check
your program segment prefix.  It will tell how much memory is
allocated to the program.  In order to use the function 48h, you
must FIRST return the memory you don't need.  Now as has been
said before, this may not be an easy task.  My application is
written in AZTEC-C, and they carefully set the stack pointer to
the top of the stack/data segment.  Most (if not all) programs
loaded with the IBM linker will have the stack segment on top.
This gives you an easy way to locate the top of your program
paragraph.  It is at SS:SP before executing any code.  I have
modified the AZTEC-C run-time package to return any unused memory
durign startup (and fixed a few other bugs in it as well).  It
should not be any big problem to patch your run-time package if
you have source.

   I hope I have sucessfully answered all these questiong.  I am
so close to throwing this PC-XT through the window due to the
absolutely horrible hardware/software design it uses.  If it were
not for IBM's name on the product I would not recommend it to
anyone.  As it is, the only real use for the IBM-PC is if you
are an end user wanting to run canned application programs.  For
that (and if you are lucky) it is a great machine.  Other than
that, forget it.

                                           Mike Spann

== Relay from Packet Radio by W6RAW ==