[comp.sys.intel] Word Reads on PC Clone

andys@logitek.co.uk (Andrew Smith) (01/03/89)

A problem recently occurred with a Triumph Adler P50 that I fitted a 
Western Digital Controller Hard disk controller to.

When the adaptor was fitted the machine booted correctly however when the 
ROM resident disk formatter was called (from DEBUG under DOS), a processor
TRAP occured and the machine entered its ROM based debugger. (The processor
is an 80186 on this particular beast and an undefined Opcode Exception occured)

Upon running a program that scans for valid ROM signatures (just to verify 
the correct base address for the adaptor) I was told that there were no ROMs
, the code for the fetch part was :-


			MOV ES,AX
			MOV SI,0
			ES:LODSW

which after being passed through DEBUG was returning 5055H in the AX rather 
than the expected AA55H, curious as a dump of the area showed the expected 
AA55H signature word.

Even more curious, when the code was modified to :-

			MOV ES,AX
			ES:MOV AX,word ptr 0

when the instruction ES:MOV AX,word ptr 0 was stepped to in debug, the EA   
display at the right showed ES:0000=5055, whereas if you typed 'd es:0000'
AA55H was shown. I concluded that debug was doing something different in
each case, and the most plausible explanation was a BYTE or WORD read. I
then re wrote the original code to perform to LODSB instructions and the 
code ran perfectly and showed the ROMs. Last of all if the code was block
moved (REP MOVSB not REP MOVSW) by byte from the controller ROM into RAM
it could be executed without exception and the disk could be formatted.


This sound very much to me like a problem with the expansion bus, has anyone
any thoughts or observations on the above or would anyone disaggree ?





Andy Smith (Evaluation Support LOGITEK PLC).