LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-22-2012, 02:19 PM   #1
saeedsssss
Member
 
Registered: Apr 2012
Posts: 43

Rep: Reputation: Disabled
How read 3mb with int 13h ah 42h


HI
I try read 3mb(6144 sector) from harddisk.
my harddisk support from INT 13h AH=42h: Extended Read Sectors From Drive

#-------part from site http://wiki.osdev.org/ATA_in_x86_Rea...29------------
DAPACK:
db 0x10
db 0
blkcnt: dw 16 ; int 13 resets this to # of blocks actually read/written
db_add: dw 0x7C00 ; memory buffer destination address (0:7c00)
dw 0 ; in memory page zero
d_lba: dd 1 ; put the lba to read in this spot
dd 0 ; more storage bytes only for big lba's ( > 4 bytes )

mov si, DAPACK ; address of "disk address packet"
mov ah, 0x42 ; AL is unused
mov dl, 0x80 ; drive number 0 (OR the drive # with 0x80)
int 0x13
jc short .error
#-----------------------------------
IF i change part of red with 6144 , i can read 3mb from harddisk?

Last edited by saeedsssss; 12-22-2012 at 02:31 PM.
 
Old 12-22-2012, 03:47 PM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by saeedsssss View Post
IF i change part of red with 6144 , i can read 3mb from harddisk?
No. In "real mode" you can't even address 3mb.

With some BIOS's you would be limited to 64KB. With other BIOS's you could transfer more than 64KB. I don't know how much more. But not more than the amount of ram you can address in "real mode". Under boot up conditions that would be at most 640KB.

Last edited by johnsfine; 12-22-2012 at 03:49 PM.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] specifying output int based on input int and source IP on multiple 802.1q, tacorama Linux - Networking 1 05-05-2011 07:30 AM
plz need help on C++ about read int from a TXT to array. cyborgt Programming 5 02-20-2008 02:11 PM
invalid types ‘int[int]’ for array subscript medha Programming 16 08-25-2006 08:30 AM
C++ file I/O, read content as int value Artanicus Programming 7 12-18-2005 01:31 PM
invalid types int[int] for array subscript scuzzman Programming 2 11-16-2004 09:34 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration