Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly x86 > Re: int 0x13 ut...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 35 of 57 Topic 4584 of 4729
Post > Topic >>

Re: int 0x13 utility

by "Wolfgang Kern" <spamtrap@[EMAIL PROTECTED] > Mar 30, 2008 at 01:53 PM

JJ "João Jerónimo" wrote:

>>> Wolfgang Kern wrote:
>>>> But if you write your own HD-driver, the physical CHS-limit is:
>>>> 16 heads, 255 sectors, 65536 tracks(cylinders), and this gives
>>>> us 267386880 sectors (= 127.5 GB).
>>>> So if the the hardware can handle it then it works almost like LBA28
>>>> (max= 128 GB), ...except for the unconvenient calculation needs.

>>> But is this a DOS or a BIOS level driver?

>> You will encounter I/O-permission issues if you try this on windoze
>> or in a winDOS-box.

> Do this, what?
> What does windows have to do with the discussion? Of course you cannot
call
> the BIOS if you want to write a disk driver for windows, because windows
> runs in 32-bit Protected Mode, but the BIOS runs in 16-bit Real Mode,
and
> relies on RM segment arithmetic, default operant/address sizes, stack
sizes
> and memory addressing limits. A PC running in Real Mode can only access
1MB
> of memory and have no sup****t for paging, so basically can't call the
BIOS
> unless you return to Real Mode, or use Virtual 8086 Mode.

That's what I mean. DOS-executables running in a windoze-DOS-box can
access I/O if the Os grants permission (ie:'LOCK', Admin-rights...).
I disassembled sblaster.com used in my DOS-box of win98se, it direct
hooks interrupt 66/67h and rd/wr from ****ts e000h... without problems.

> Read Intel docs for details on differences between RM and PM execution
> environments:
> http://www.intel.com/design/pentium4/do***entation.htm#manuals

thanks, I'm with AMD and know the difference since a while ... :)

>> My first disk-editor ran on DOS 3.0, and had its
>> own HD-routines, so bypassing all limits from DOS and BIOS int13.

> Yes, but regular DOS programs that use file I/O typically use DOS system
> calls. This means that it's limited by the routines DOS relies on for
disk
> access.

yes.

> For example, DOS-based operating systems usually rely on BIOS disk I/O
> routines. So if, for example, this routines are limited to 8GB, of
course
> DOS disk I/O will be limited to this size, and the same holds true for
DOS
> file I/O.

sure.

> Physical CHS addressing allows a limit of some Gigabytes. However, the
> original IBM PC BIOS uses some rather stupid bit fields to pack the CHS
> addresses. This stupid bit fields make CHS addressing unnecessarily
limited
> to 503MB when used through the BIOS. However, BIOS developers eventually
> created a custom CHS addressing that maps virtual addresses to physical
> ones. This virtual addressing (and mapping) allows up to 8GB.

yeah.

>> All it did:
>>  tem****ary replace HD-IRQ vectors (just to not confuse DOS)
>>  fill the HDC-registers as desired (incl. command-byte as the last)
>>  wait for acknowledge
>>  read or write sector(s)
>> [find all required details in RBIL-****ts (01F0../0170..)]

> Although User Mode programs in PM-based operating systems don't access
the
> hardware directly because they are forbidden to do so (there's a general
> protection fault that notifies the OS is they try to do so), proper DOS
> programs were supposed and encouraged to do DHA if they needed it.

Right, the topic says int13 ....
But utility programs like format,defrag,wipe-clean,diskedit,partit ...
all need to override the given limits from INT13/OS and usually got
their own routines to direct access the hardware.

> However, "normal"/"****table" programs did not do so. I'm not sure, but I
> think really no one was doing file I/O directly even on DOS (exception
> perhaps for defrag and so): they used kernel's filing calls instead.

Yes.

>> I kept this very rare now used CHS functions in my PM32 Os, just for
>> the op****tunity to read from old drives when they become replaced.

> If you don't want to run your PM32 OS on old PCs, you can even drop CHS
> sup****t completely, because LBA uses linear addresses to access the hard
> drive. For example, if you want to address the 654th sector of your hard
> drive, you can refer to LBA sector number 653 (because LBA is zero
based,
> that is, the very first sector of your hard drive has number 0, just
like
> your RAM memory). However, you you use CHS addressing, you'll have to
> compute three numbers to build the address. This addresses would depend
> upon the physical geometry of the disk.

Almost right, except that disk geometry is a fiction on modern HDs anyway
and old CHS-disks wont do much when accessed via LBA.
The reason for why I keep my CHS-funtions is just to be able for hardware
upgrades (copy users data from old CHS-drives to a new machine).

__
wolfgang
 




 57 Posts in Topic:
int 0x13 utility
Alex Buell <spamtrap@  2008-03-22 15:30:31 
Re: int 0x13 utility
dave <spamtrap@[EMAIL   2008-03-22 16:27:30 
Re: int 0x13 utility
Rugxulo <spamtrap@[EM  2008-03-23 08:45:10 
Re: int 0x13 utility
Alex Buell <spamtrap@  2008-03-23 08:37:22 
Re: int 0x13 utility
Hendrik van der Heijden   2008-03-24 14:50:21 
Re: int 0x13 utility
Alex Buell <spamtrap@  2008-03-24 21:15:00 
Re: int 0x13 utility
Rugxulo <spamtrap@[EM  2008-03-25 01:11:15 
Re: int 0x13 utility
=?UTF-8?B?Sm/Do28gSmVyw7N  2008-03-25 13:57:36 
Re: int 0x13 utility
"H. Peter Anvin"  2008-03-28 15:59:06 
Re: int 0x13 utility
ArarghMail803NOSPAM <s  2008-03-28 20:07:11 
Re: int 0x13 utility
"Rod Pemberton"  2008-03-29 23:04:27 
Re: int 0x13 utility
ArarghMail803NOSPAM <s  2008-03-30 00:47:36 
Re: int 0x13 utility
"Rod Pemberton"  2008-03-30 15:45:39 
Re: int 0x13 utility
ArarghMail803NOSPAM <s  2008-03-30 17:31:05 
Re: int 0x13 utility
"Rod Pemberton"  2008-03-31 15:17:38 
Re: int 0x13 utility
ArarghMail803NOSPAM <s  2008-03-31 19:18:36 
Re: int 0x13 utility
=?UTF-8?B?Sm/Do28gSmVyw7N  2008-03-29 15:13:27 
Re: int 0x13 utility
"Wolfgang Kern"  2008-03-31 03:32:05 
Re: int 0x13 utility
Red Rooster <spamtrap  2008-04-01 17:03:34 
Re: int 0x13 utility
Alex Buell <spamtrap@  2008-04-05 08:02:22 
Re: int 0x13 utility
ArarghMail804NOSPAM <s  2008-04-05 18:52:10 
Re: int 0x13 utility
"Rod Pemberton"  2008-04-05 20:13:01 
Re: int 0x13 utility
Alex Buell <spamtrap@  2008-04-06 10:19:57 
Re: int 0x13 utility
Alex Buell <spamtrap@  2008-03-25 17:11:21 
Re: int 0x13 utility
Alex Buell <spamtrap@  2008-03-25 17:15:08 
Re: int 0x13 utility
=?UTF-8?B?Sm/Do28gSmVyw7N  2008-03-26 02:38:35 
Re: int 0x13 utility
"Wolfgang Kern"  2008-03-26 13:53:39 
Re: int 0x13 utility
=?UTF-8?B?Sm/Do28gSmVyw7N  2008-03-26 23:39:22 
Re: int 0x13 utility
Dirk Wolfgang Glomp <  2008-03-27 07:41:53 
Re: int 0x13 utility
=?UTF-8?B?Sm/Do28gSmVyw7N  2008-03-29 14:36:11 
Re: int 0x13 utility
Dirk Wolfgang Glomp <  2008-03-29 21:05:34 
Re: int 0x13 utility
NoSpam@[EMAIL PROTECTED]   2008-03-30 13:25:19 
Re: int 0x13 utility
"Wolfgang Kern"  2008-03-27 09:00:59 
Re: int 0x13 utility
=?UTF-8?B?Sm/Do28gSmVyw7N  2008-03-29 15:07:31 
Re: int 0x13 utility
"Wolfgang Kern"  2008-03-30 13:53:33 
Re: int 0x13 utility
NoSpam@[EMAIL PROTECTED]   2008-03-31 13:06:51 
Re: int 0x13 utility
Tim Roberts <spamtrap  2008-04-01 03:21:14 
Re: int 0x13 utility
Alex Buell <spamtrap@  2008-03-25 17:22:43 
Re: int 0x13 utility
Alex Buell <spamtrap@  2008-03-26 07:57:12 
Re: int 0x13 utility
=?UTF-8?B?Sm/Do28gSmVyw7N  2008-03-26 23:36:04 
Re: int 0x13 utility
Alex Buell <spamtrap@  2008-03-27 10:15:49 
Re: int 0x13 utility
Alex Buell <spamtrap@  2008-03-31 00:23:24 
Re: int 0x13 utility
Alex Buell <spamtrap@  2008-03-31 09:22:44 
Re: int 0x13 utility
"Rod Pemberton"  2008-03-31 15:17:48 
Re: int 0x13 utility
Alex Buell <spamtrap@  2008-04-01 08:31:58 
Re: int 0x13 utility
ArarghMail803NOSPAM <s  2008-04-01 04:00:41 
Re: int 0x13 utility
ArarghMail803NOSPAM <s  2008-04-01 04:07:45 
Re: int 0x13 utility
Alex Buell <spamtrap@  2008-04-02 08:57:03 
Re: int 0x13 utility
ArarghMail804NOSPAM <s  2008-04-02 20:03:49 
Re: int 0x13 utility
Alex Buell <spamtrap@  2008-04-03 22:11:23 
Re: int 0x13 utility
ArarghMail804NOSPAM <s  2008-04-03 23:11:29 
Re: int 0x13 utility
Alex Buell <spamtrap@  2008-04-04 08:33:51 
Re: int 0x13 utility
ArarghMail804NOSPAM <s  2008-04-04 12:58:10 
Re: int 0x13 utility
Spiro Trikaliotis <sp  2008-04-06 11:34:12 
Re: int 0x13 utility
ArarghMail804NOSPAM <s  2008-04-06 18:02:51 
Re: int 0x13 utility
Alex Buell <spamtrap@  2008-04-04 21:04:11 
Re: int 0x13 utility
ArarghMail804NOSPAM <s  2008-04-04 21:31:33 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 2:04:32 CDT 2008.