   Fews asm questions
  Hi, i want to start a little project in assembler, but i need some help understanding more advanced features or stuffs like:1-How to check(and test) the error bit flag?2-How to know if there is a floppy disc in the a:\ driveI triyed:mov AH, 01h ; Check Drive Statusmov DL, 00h ; 1st floppy disk ( "drive A:" )int 13hcmp al, 00h ; result in albut i think that only tell me if the floppy drive is connected, so to know if there is a floppy in it, do i just try to read, for example, the first sector, then look at the error flag or the number of bytes read return value?3-How to read or write into memory using some offset Ex: Suppose id want to read and write the floppy 1st sector into 200h in memory,  how do i do that?4- What is the smallest memory block a program can use? 64k?   
Quote:Original post by Vortez2-How to know if there is a floppy disc in the a:\ driveFor details like this, please see Ralf Brown's Interrupt List. It's the best reference for such low level/old school stuff.   ;Quote:Original post by Vortez1-How to check(and test) the error bit flag?Error bit flag? As far as I can tell, if you're running on an Intel processor, you just made that up.Quote:2-How to know if there is a floppy disc in the a:\ driveQuote:3-How to read or write into memory using some offsetQuote:4- What is the smallest memory block a program can use? 64k?Who has floppy drives any more?If you need file access, just use the standard C library. No one ever writes a program that communicates directly with a device -- you go through the operating system. It has a device driver that knows way more about hard drives than you.If you want to learn how to write a device driver, check out http://www.osdever.net/tutorials/index There's a few tutorials on there which talk about BIOS calls, which is what it looks like you're trying to do. You could also check out how the Linux kernel does things (it doesn't use the BIOS interrupts at all, if I recall).The question you're asking is about hard drives, not assembly. You could just as easily write the software in C or any other language that can twiddle bits.;  Sorry for not precising it before, but im coding a boot sector so asm is pretty much mandatory for this kind of task. As for the "error flag", i meant, how do you test if the CF bit flag is 1 or 0? As for the floppy thing, i think i got it working.   ;  You'd use the jc/jnc (jump if carry flag set/not set) instruction for this. See for example here.   ;  oh i see, thx a lot.   