DIsk IO
Posted: Sat Nov 01, 2003 12:00 am
I am new at OS Programming, and do not know a whole lot about about x86 Assembly. I have been trying to access read data from a floppy drive using the following code (compiled with GCC):
asm(" movb $2, %ah
movb $4, %al
movb $0, %ch
movb $2, %cl
movb $0, %dh
movb $0, %dl
movw buffer, %bx
movw %bx, %es
mov $0, %bx
int $0x13
buffer: .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
");
It compiles correctly, but when I run it in the emulator Bochs, it exits and says:
Bochs is exiting with the following message:
[CPU ] exception(): 3rd (13) exception with no resolution
I do not have any idea about diskio or anything like that. Thanks.
asm(" movb $2, %ah
movb $4, %al
movb $0, %ch
movb $2, %cl
movb $0, %dh
movb $0, %dl
movw buffer, %bx
movw %bx, %es
mov $0, %bx
int $0x13
buffer: .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
");
It compiles correctly, but when I run it in the emulator Bochs, it exits and says:
Bochs is exiting with the following message:
[CPU ] exception(): 3rd (13) exception with no resolution
I do not have any idea about diskio or anything like that. Thanks.