Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: int 0x13 utility
On Fri, 28 Mar 2008 15:59:06 -0700, "H. Peter Anvin"
<spamtrap@crayne.org> wrote:

<snip>
>
>Not just "pretty likely".  LBA support was added in Windows 95 OSR2,
>which I believe is MS-DOS 7.10.
>
Correct.
--
ArarghMail803 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html

To reply by email, remove the extra stuff from the reply address.


Report this thread to moderator Post Follow-up to this message
Old Post
ArarghMail803NOSPAM
03-29-08 09:00 AM


Re: int 0x13 utility
H. Peter Anvin wrote:
> João Jerónimo wrote: 
>
> Not just "pretty likely".  LBA support was added in Windows 95 OSR2,
> which I believe is MS-DOS 7.10.

Yes, MS-DOS 7.xx runs the programs responsible for starting up (including
basic hardware detection?) windows 95 (and parhaps 98 too) kernel. The last
"standalone" MS-DOS version was 6.22, or something like that.

Agreed with the LBA-support part of the post!

JJ


Report this thread to moderator Post Follow-up to this message
Old Post
João Jerónimo
03-30-08 12:09 AM


Re: int 0x13 utility
Dirk Wolfgang Glomp wrote: 
>
> If you write the driver for DOS it´s a DOS-driver, else if you write
> it for your own OS maybe you can call it BIOS-driver?

Nop. But I don't know whether DOS can have it's own drivers to control HDs.
DOS usually calls the BIOS, so one can replace the BIOS HD driver and have
DOS call it, thinking it's the original BIOS driver.

Did you understand, or need more explaining?

JJ


Report this thread to moderator Post Follow-up to this message
Old Post
João Jerónimo
03-30-08 12:09 AM


Re: int 0x13 utility
Wolfgang Kern wrote:
> JJ "João Jerónimo" asked:
> 
> 
>
> 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 support for paging, so basically can't call the BIOS
unless you return to Real Mode, or use Virtual 8086 Mode.

Read Intel docs for details on differences between RM and PM execution
environments:
http://www.intel.com/design/pentium...ion.htm#manuals

> 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.

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.

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.

> All it did:
>  temporary 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-ports (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.

However, "normal"/"portable" 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.

> I kept this very rare now used CHS functions in my PM32 Os, just for
> the opportunity 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
support 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.

JJ


Report this thread to moderator Post Follow-up to this message
Old Post
João Jerónimo
03-30-08 12:09 AM


Re: int 0x13 utility
Am Sat, 29 Mar 2008 14:36:11 +0000 schrieb João Jerónimo:

> Dirk Wolfgang Glomp wrote: 
>
> Nop. But I don't know whether DOS can have it's own drivers to control HDs
.
> DOS usually calls the BIOS, so one can replace the BIOS HD driver and have
> DOS call it, thinking it's the original BIOS driver.

Is that the driver you are lookink for?:
Udma2_25.zip...udma2_27.zip
xdma_v16.zip

UltraDMA Drivers for DOS
This is a set of four DOS UltraDMA hard-disk drivers. All the drivers
run UltraDMA disk(s) on PC mainboards using a "South Bridge" controller
chip from Intel, VIA, SiS, ALi and other vendors......

The drivers "intercept" I-O calls issued as Int 13h requests (Interrupt
13) to the BIOS. Only read or write requests are handled. All other
Int 13h requests (ss, I-O for other type devices, etc.) are "passed"
back to the BIOS or other drivers for handling. Each disk must handle
"logical block addressing" (LBA). The drivers accept 48-bit LBA mode
I-O requests for FreeDOS, MS-DOS 7.xx, and other newer DOS systems that
support LBA mode I-O. 24-bit CHS mode I-O requests are also accepted,
for MS-DOS 6.xx, PC-DOS 7 or earlier. As CHS requests are limited to
24-bit addresses, all data accessed using CHS mode must be in the first
8 gigabytes of a disk. Other partitions may contain more data and may
be accessed using operating systems which support LBA mode requests.

http://www.ibiblio.org/pub/micro/pc..._25.tx
t
http://www.ibiblio.org/pub/micro/pc...dos/udma/devel/
http://ftp.uni-sofia.bg/freedos/files/dos/udma/devel/

> Did you understand,

I only use Dos-Softints, so i am not familar to write my own driver
for access hdds from the ports(01F0../0170..).

> or need more explaining?

Yes of course.

Dirk


Report this thread to moderator Post Follow-up to this message
Old Post
Dirk Wolfgang Glomp
03-30-08 03:10 AM


Re: int 0x13 utility
"ArarghMail803NOSPAM" <spamtrap@crayne.org> wrote in message
 news:9h5ru3tdlgtbepj0kkjg8glf0oej9mf3rl@
4ax.com...
> On Fri, 28 Mar 2008 15:59:06 -0700, "H. Peter Anvin"
> <spamtrap@crayne.org> wrote:
>
> <snip> 

True, MS-DOS 6.22 doesn't have LBA...
 
> Correct.

Wrong.  You meant to say: LBA support *for FAT32* was...   LBA support was
first added to Windows 95 for FAT16 partition types 0x0E ("FAT16X") and 0x0F
(extended "FAT16X").  Windows 95 uses MS-DOS 7.00.


Rod Pemberton


Report this thread to moderator Post Follow-up to this message
Old Post
Rod Pemberton
03-30-08 09:23 AM


Re: int 0x13 utility
On Sat, 29 Mar 2008 23:04:27 -0400, "Rod Pemberton"
<spamtrap@crayne.org> wrote:

>
>"ArarghMail803NOSPAM" <spamtrap@crayne.org> wrote in message
> news:9h5ru3tdlgtbepj0kkjg8glf0oej9mf3rl@
4ax.com... 
>
>True, MS-DOS 6.22 doesn't have LBA...
> 
>
>Wrong.  You meant to say: LBA support *for FAT32* was...   LBA support was
>first added to Windows 95 for FAT16 partition types 0x0E ("FAT16X") and 0x0
F
>(extended "FAT16X").  Windows 95 uses MS-DOS 7.00.
Ok.  I never got that far into Win95.

I was mostly thinking about :

"Windows 95 OSR2, which I believe is MS-DOS 7.10."

when I said "Correct", not about which kind of LBA support was in what
version.  :-)

--
ArarghMail803 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html

To reply by email, remove the extra stuff from the reply address.


Report this thread to moderator Post Follow-up to this message
Old Post
ArarghMail803NOSPAM
03-30-08 09:23 AM


Re: int 0x13 utility
On Sat, 29 Mar 2008 14:36:11 +0000, examnotes
<spamtrap@crayne.org> wrote:

>Dirk Wolfgang Glomp wrote: 
>
>Nop. But I don't know whether DOS can have it's own drivers to control HDs.
>DOS usually calls the BIOS, so one can replace the BIOS HD driver and have
>DOS call it, thinking it's the original BIOS driver.
>
>Did you understand, or need more explaining?
>
>JJ
>

If you replace the INT 13h vector with a vector to your own
handler, you would effectively have a "DOS driver".  I have done this
long ago for a different reason than drive size:  The DOS INT 13h shut
off all interrupts during transfers to disk, but I needed to respond
to A/D sample interrupts on non-DMA data acquisition systems,
in order to allow Direct-to-Disk recording.  My INT 13h was pretty
much an ordinary CHS type, except it allowed the sample interrupts to
pass through during the block moves.  Worked great:  There was no
problem with sample rates of more than 100 kHz.  Above about 120 kHz
the sample timing was adversely affected, so I never tried to go
higher to see if or when disk transfers might have suffered.

Best regards,


Bob Masta

DAQARTA  v3.50
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Scope, Spectrum, Spectrogram, FREE Signal Generator
Science with your sound card!


Report this thread to moderator Post Follow-up to this message
Old Post
Bob Masta
03-30-08 01:00 PM



Check the new MP3 file storage, this is better than rapidshare and torrent!

You can download: "Max Romeo - PUBLIC ENEMY NUMBER ONE" free mp3 download, "Nicholas Gunn - Angel's Window" free mp3 download, "Matthew Shipp - Change Of Plans" f
ree mp3 download, "Muslimgauze and Apollon - Tangier Box." free mp3 download, "Motley Crue - Hammered" free mp3 download, "Evol - Sorrow Of The Witch" fre
e mp3 download, "Eva Cassidy - Autumn Leaves" free mp3 download, "Hed Kandi - Lamb - Hearts And Flowers" free mp3 download, "Ba
nda Maguey - Corazorazoncito" free mp3 download, "Osiris Rodriguez Castillos - 11-Corrales de Algorta" free mp3 download, "Electronic - Various Artists - In
dustrial Revelution Part 1 (J.M.Jarre)" free mp3 download, "Louis Prima - Oh Marie" free mp3 download, "Patrick Cassidy - Sailing To Byzantium" free mp3 download, "Marek Grechuta - Musze Dzis Wykonac Plan (bonus)" free mp3 download, "Girlschool - Secret" free mp3 download, "Enigma - 
Following The Sun" free mp3 download, "Edgar Froese - Blue Panther" free mp3 download, "Amy Nuttall - Greensleeves" free mp3 download, "Don Williams - Easy Touch" free mp3 download, "Cher - The Beat Goes On (Sonny & Cher)" free mp3 download, "Petersen Quartett - 2. Menurtto.Trio" free mp3 download, "Gyalwa Karmapa - Straight to the Heart" free mp3 download, "Butthole Surfers - Pittsburgh to Lebanon" free mp3 download, "Krayzie Bone - Get'chu Twisted" free mp3 download, "Faith
 and The Muse - Plague Dance" free mp3 download, "Wu-Tang Clan - raekwon-respect power-chr" free mp3 download, "Es
tradasphere - Medley #3" free mp3 download, "Los Tigres del Norte - mi sangre prisionera" free mp3 download, "Operation Ivy - Someday" free mp3 download, "Take 6 - Beautiful World" free mp3 download, "Laur
ent Ferlet - Munchies" free mp3 download, "Impellitteri - Secret Lover" free mp3 download, "John Lennon - Medley: Rip It Up/Ready Teddy" free mp3 download, "Loreena McKennitt - La Serenissima" free mp3 download, "Erik Truffaz - Tahun Bahu" free mp3 download, "Isaac Hayes - Walk On By" free mp3 download,
 "ZECCHINO D ORO - Arirang (Corea)" free mp3 download, "Magic Dimension - Variations Of The Sun [Theremin]" free mp3 download, "Al Di Meola - Splendido Sundance" free mp3 do
wnload, "Color Tango - Como flor de yuyo" free mp3 download, "Die Fantastischen Vier - Nonixnarretz" free mp3 download, "Drop De
ad - The March Of Empire" free mp3 download, "James Last - Adios Muchachos" free mp3 download, "Cybertribe - Mystic Peaks - Electric Flow By Mazino" free mp3 download, "The Living Legends - mercury rising - mystik journeymen ft. the 
grouch" free mp3 download, "Dance - Various Artists - Agen Sumo  Why" free mp3 
download, "Norel - Let Her Burn" free mp3 download, "Electronic - Various Artists - Always 2 Always (Anthea)" free mp3 download, "Fats Domino - im walkin" free mp3 download, "Wilson Simonal - Vamos S'imbora" free mp3 download, "Princessa - Anyone But You" free mp3 download, "Xorcist - Electric Cafe (TV Score)" free mp3 download, "Gros Nibar - Track 32" free mp3 download, "Ministry Of Sound - Animated - Container 
No. 2 (Ian Wilkie's Virtual Dog Dub)" free mp3 download, "Jah Mason - De Youths Dem Ballin" free mp3 download, "Joan Baez - Go 'Way From My Window" free mp3 download, "Pop - Various A
rtists - Den Harrow - Charleston" free mp3 download, "Riccardo Fogli - Una Donna Cosi'" free mp3 download, "Oceansize - Catalyst (EP
 Version)" free mp3 download, "Eliza Gilkyson - Sleep Tonight" free mp3 download, "Robert Fripp - 1985" free 
mp3 download, "Drum & Bass - Various Artists - Hear My Voi
ce (DJ Fresh)" free mp3 download, "Uncle Krac
ker - No Stranger To Shame (feat. Marc McGrath)" free mp3 download.

Report this thread to moderator Post Follow-up to this message
Old Post
Attax
03-30-08 06:33 PM


Re: int 0x13 utility
JJ "João Jerónimo" wrote:
 
 
 

> 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 support 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 ports e000h... without problems.

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

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

> 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.
 

> 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"/"portable" 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.
 

> If you don't want to run your PM32 OS on old PCs, you can even drop CHS
> support 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



Report this thread to moderator Post Follow-up to this message
Old Post
Wolfgang Kern
03-31-08 09:17 AM


Sponsored Links




Last Thread Next Thread Next
Pages (5): « 1 2 [3] 4 5 »
Search this forum -> 
Post New Thread

A86 Assembler archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:55 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.