www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/05/12/03:04:33

From: "A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk>
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Date: Thu, 11 May 1995 14:02:35 BST
Subject: Re: Checking for disk in drive (erratum)

>   Phelps tried this:-
>   AH = 0x02; /* BIOS disk read */      AL = 0x01; /* read one sector */
>   BX = (int)disk_buffer; /* pointer to buffer???? */
>   CH = 0x00; /* track zero?? */        CL = 0x00; /* sector zero?? */
>   DH = 0x00; /* head zero?? */         DL = 0x00; /* drive A?? */
>   ES = _go32_my_ds(); /* fill in DS */
>   call interrupt 0x13

>   All 3 of my interrupt books say that the buffer address should be input in
> ES:BX ...

  He put a segment address in EX correctly, but paired it with BX containing a
Gnu C <protected> mode address and not with a real-mode address. The result is
neither one thing nor the other. No wonder he got a "bad address" fault AH=2.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019