|
-
September 11th, 2010, 07:10 AM
#1
INT 13h in Windows
Hello all, this is my first post. Well its silly to ask as it may be the fact that u can't use INT 13h under windows (sorry for being silly). well i intend to read write sectors of ntfs formatted hard-drive (total size 320 GB volume size 70 GB) in pure assembly (plz don't suggest anything about winapi in MASM). well here is what i gave as a first try, and after googling here and thre resort to asking. plz help. Is there any way to make 13h work under windows ?? Or any other way than int 13h, 25h.(Tried both gave me a message of a program is attempting to access hardisk directly, this may be due to a ... blah blah)
Code:
.model small
.stack 100h
.data
buffer db 2048 dup(?)
err_msg db "error occured$"
.code
start:
mov ax, @data
mov ds, ax
mov es, ax
mov ah, 02h
mov al, 01h
mov bx, offset buffer
mov cx, 1
mov dx, 80h
int 13h
mov ah, 4ch
int 21h
end start
Thanx in advance. Regards. And sorry for being stupid.
-
September 11th, 2010, 08:26 AM
#2
Re: INT 13h in Windows
Under Windows NT there is no way to get direct disk access to work other than writing a driver.
If you want to play around with this you have to use DOS. I don't remember how things were in Win95 but I guess that even though most stuff was allowed, direct disk access was probably denied.
-
September 11th, 2010, 09:58 AM
#3
Re: INT 13h in Windows
 Originally Posted by S_M_A
Under Windows NT there is no way to get direct disk access to work other than writing a driver.
If you want to play around with this you have to use DOS. I don't remember how things were in Win95 but I guess that even though most stuff was allowed, direct disk access was probably denied.
Well sir then could u provide me some link about developing VxD, but plz try to avoid winapi and winddk as much as possible).
-
September 11th, 2010, 10:44 AM
#4
Re: INT 13h in Windows
 Originally Posted by dumb_terminal
Well sir then could u provide me some link about developing VxD, but plz try to avoid winapi and winddk as much as possible).
Huh... how could you even think about writing a driver without using the ddk? If I were you I'd either forget about this or explain what you want to achieve, someone might have a better approach.
-
September 11th, 2010, 12:04 PM
#5
Re: INT 13h in Windows
Well i was trying to read the boot sector of c drive, and if succeeded i would have moved forward to write the 0 sector of an usb stick, which would launch a program to read the FAT of each drive and if i were successful i wud have tried to show the files. thats all. Well i really need to do this manually because i am keen to learn sir. Thats all. Regards.
-
September 11th, 2010, 02:28 PM
#6
Re: INT 13h in Windows
Well, do it the normal way instead. You don't have to read the boot sector to display the files.
-
September 11th, 2010, 03:18 PM
#7
Re: INT 13h in Windows
Sorry to bother u again, Sir do u mean i get the INT 21 services to get file names during boot time ?? I Thought i even need a bios 10h service even to write hello world. Then again i need some way to write the 0 sector of USB (without the linux dd command -- yeah i have written a boot time hello world then just restart). Well sorry to disturb u sir. But at least u tried to help.
Last edited by dumb_terminal; September 11th, 2010 at 03:33 PM.
-
September 11th, 2010, 03:31 PM
#8
Re: INT 13h in Windows
Int 21 is a DOS service and int 10 BIOS service so both are available in a system booting DOS. As in previous post, what are you trying to accomplish?
-
September 11th, 2010, 03:45 PM
#9
Re: INT 13h in Windows
 Originally Posted by S_M_A
Int 21 is a DOS service and int 10 BIOS service so both are available in a system booting DOS. As in previous post, what are you trying to accomplish?
Sir i am a student, and just experimenting with things. My teacher said, before dos botstrap is called (which i prevented by placing my code to 7C00 ) none of the dos service is available, and i am just trying to use int 13h for testing purpose as i can't debug during boottime do i (if somehing goes wrong)?? as for my main purpose i have said, to write to sector 0 of usb manually (ms debug is not letting me and can't find any alternative way, and i won't use linux DD if i mustn't), the code inside it will prevent the dos bootup, instead bring out a terminal of my own.
Thank u for hearing sir.
Regards.
-
September 11th, 2010, 04:14 PM
#10
Re: INT 13h in Windows
All I can think of is to install DOS (or your own OS) in a virtual machine and play around with it. Before the OS boots you have all access to int13.
-
September 11th, 2010, 04:20 PM
#11
Re: INT 13h in Windows
 Originally Posted by S_M_A
All I can think of is to install DOS (or your own OS) in a virtual machine and play around with it. Before the OS boots you have all access to int13.
Thank u for ur excellent idea sir, yeah VM that completely got out of my mind, but where to download dos and run it in VM ?? anyway i'll google my way through. Thank u for all ur help sir. Next time i encounter a problem i'll know where to seek guidence, u r being patient sir. that will encourage newbies like me to post more and more. Regards.
-
September 12th, 2010, 03:09 PM
#12
Re: INT 13h in Windows
I searched MS home but didn't find any public DOS download page. I found some other locations but of course I can neither guarantee the legality nor that the download is free of virus. Anyway here's one http://www.brothersoft.com/ms-dos-download-226177.html
Another way could be to create a DOS boot diskette in XP, create a VM and boot it using the diskette and then transfer the system onto the virtual drive (sys c:, copy rest of the files)
Another thing that I suddenly realised that I had forgot is that you have to get yourself an assembler that is capable of creating 16-bit programs. I guess that's not a problem judging from your code but I think I should mention it if other people stumble upon this thread.
EDIT: This might be a good solution to the download issue http://www.drdos.net/download.htm or maybe post #7 here http://www.neowin.net/forum/topic/32...ad-ms-dos-622/
Last edited by S_M_A; September 12th, 2010 at 03:18 PM.
-
September 12th, 2010, 03:37 PM
#13
Re: INT 13h in Windows
Thank u again Sir, u have been really helpful.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|