Path: utzoo!mnetor!tmsoft!dptcdc!jarvis.csri.toronto.edu!rutgers!iuvax!bobmon From: bobmon@iuvax.cs.indiana.edu (RAMontante) Newsgroups: comp.sys.ibm.pc Subject: Re: Hard drive/Controller Summary: Longish listing of code to look for. Message-ID: <21916@iuvax.cs.indiana.edu> Date: 10 Jun 89 14:23:44 GMT References: <14348@watdragon.waterloo.edu> Reply-To: bobmon@iuvax.cs.indiana.edu (RAMontante) Organization: malkaryotic Lines: 112 mdharding@dahlia.waterloo.edu (Matthew D. Harding) : - -But it is still not answered!!! Nearly everyone suggested that it is probably -not low-level formatted, and suggested using debug and the command g=c800:5 -to intiate the ROM program. However, this hangs my machine big time, generating -1) Divide overflow, or 2)clear screen and hang, or 3) cold reboot, or any combo -of the above. Many people suggested that I should do this if my controller is -Western Digital. I'm guessing it's not, but how can I be sure? There are no - [ ... ] -correct debug command)? Am I neck-deep in sh*t for the rest of my life? Well, I can't speak to your last question :-) but here is something that may be small helpful. It's a dump of the ROM on my HD controller. I have an Adaptec 2070A controller, and its ROM starts at a slightly different location than you cited for WD. (namely c800:ccc) I don't know if there's information in front of that or not (forgot to look), but this is what the beginning of my ROM's executable looks like. You might be able to find something similar in the c800:somewhere address space... Following is a hex display of the first few bytes of the code (from Buerg's excellent LIST utility). Then an unassembly from DEBUG, showing the instructions and with the initial text string commented in for clarity's sake. Note that the Adaptec program starts with a jump around their copyright notice, to the "real" start of the routine. If other mfr's do this as well, the start will be easier to find. Otherwise, if you're good enough with assembler you can look for code that does similar things. Hope this helps. ________________________________ LIST 1 06-10-89 07:20 HDFMT 000000 EB 25 90 28 63 29 20 63-6F 70 79 72 69 67 68 74 .%.(c) copyright 000010 2C 20 41 64 61 70 74 65-63 20 49 6E 63 2E 20 31 , Adaptec Inc. 1 000020 39 38 34 20 30 34 20 8C-C8 8E D8 8E C0 BC 00 30 984 04 ........0 000030 BD 00 20 B9 42 00 BE 00-00 B0 00 88 02 46 E2 FB .. .B........F.. 000040 C6 46 0E 00 C6 46 26 02-BA 00 1C E8 AC 0C E8 BC .F...F&......... 000050 08 BA 80 00 B9 01 00 B4-00 CD 13 BA 80 00 B9 01 ................ 000060 00 B4 11 CD 13 BA 81 00-B9 01 00 B4 11 CD 13 BA ................ 000070 4D 09 E8 4D 0C 72 F8 3D-03 00 72 F3 3D 09 00 77 M..M.r.=..r.=..w C:\TMP debug - -uc800:ccc C800:0CCC EB25 JMP 0CF3 C800:0CCE 90 NOP --(c) copyright, Adaptec Inc. 1984 04 -- delimiting dashes are mine -- bob, mon. C800:0CF3 8CC8 MOV AX,CS C800:0CF5 8ED8 MOV DS,AX C800:0CF7 8EC0 MOV ES,AX C800:0CF9 BC0030 MOV SP,3000 C800:0CFC BD0020 MOV BP,2000 C800:0CFF B94200 MOV CX,0042 C800:0D02 BE0000 MOV SI,0000 C800:0D05 B000 MOV AL,00 C800:0D07 8802 MOV [BP+SI],AL C800:0D09 46 INC SI C800:0D0A E2FB LOOP 0D07 C800:0D0C C6460E00 MOV BYTE PTR [BP+0E],00 C800:0D10 C6462602 MOV BYTE PTR [BP+26],02 C800:0D14 BA001C MOV DX,1C00 C800:0D17 E8AC0C CALL 19C6 C800:0D1A E8BC08 CALL 15D9 C800:0D1D BA8000 MOV DX,0080 C800:0D20 B90100 MOV CX,0001 C800:0D23 B400 MOV AH,00 C800:0D25 CD13 INT 13 C800:0D27 BA8000 MOV DX,0080 C800:0D2A B90100 MOV CX,0001 C800:0D2D B411 MOV AH,11 C800:0D2F CD13 INT 13 C800:0D31 BA8100 MOV DX,0081 C800:0D34 B90100 MOV CX,0001 C800:0D37 B411 MOV AH,11 C800:0D39 CD13 INT 13 C800:0D3B BA4D09 MOV DX,094D C800:0D3E E84D0C CALL 198E C800:0D41 72F8 JB 0D3B C800:0D43 3D0300 CMP AX,0003 C800:0D46 72F3 JB 0D3B C800:0D48 3D0900 CMP AX,0009 C800:0D4B 77EE JA 0D3B C800:0D4D 884610 MOV [BP+10],AL C800:0D50 BA3609 MOV DX,0936 C800:0D53 E8250C CALL 197B C800:0D56 2C30 SUB AL,30 C800:0D58 72F6 JB 0D50 C800:0D5A 3C01 CMP AL,01 C800:0D5C 77F2 JA 0D50 C800:0D5E 0C80 OR AL,80 C800:0D60 8AD0 MOV DL,AL C800:0D62 88460F MOV [BP+0F],AL C800:0D65 B84000 MOV AX,0040 C800:0D68 8ED8 MOV DS,AX C800:0D6A D2E2 SHL DL,CL C800:0D6C 88164300 MOV [0043],DL C800:0D70 8CC8 MOV AX,CS C800:0D72 8ED8 MOV DS,AX C800:0D74 BA7009 MOV DX,0970 C800:0D77 E8010C CALL 197B C800:0D7A 3C4E CMP AL,4E C800:0D7C 7456 JZ 0DD4 C800:0D7E 3C59 CMP AL,59 C800:0D80 75F2 JNZ 0D74 C800:0D82 E8EB0B CALL 1970 etc...