Re: accessing hard disk with asm

From: Jonathan Bartlett (johnnyb_at_eskimo.com)
Date: 01/17/05


Date: Mon, 17 Jan 2005 09:58:45 -0500

I think you're missing some pieces. Also I think you should learn how
assembly language works before trying something like accessing hard
drive information.

For basic information on how assembly language programming works, and
how it interacts with the rest of the operating system see my book:

http://www.cafeshops.com/bartlettpublish.8640017

For information about getting hard drive information under Linux I would
check out the source code to fdisk.

Jon

----
Learn to program using Linux assembly language
http://www.cafeshops.com/bartlettpublish.8640017
yasumi wrote:
> Hello to group.
> I was wondering if the following program is possible, and if you can,
> tip would be really appreciated.
> I kind of know the real basic stuff in asm.
> 
> What I'm trying to do is to get the harddisk information with asm
> program.
> The environment is Fedora Core 3 linux, with NASM and I have su access
> to the machine.  Harddisk is connected via IDE.
> 
> I did some google research and some website shows that following is how
> you get the drive information from hd1:
> 
> Section .text
> global _start
> _start:
> mov eax, 4
> xor ebx, ebx
> mov ebx, 1
> 
> mov ah, 08h
> mov dl, 80h
> 
> But, how would I output this to terminal?
> Any kind of input would be appreciated.
> Thanks in advance.
>