Yes, I'm sorry to bother you with this, but I think some of you know this, and since I didn't want to register in osdev just for one clarification I thought I'd post here.
I'm writing a "bootloader", Take a look at this:
http://www.osdever.net/tutorials/loading_sectors.php[ QUOTE ]
al = Number of sectors to read (To be safe I wouldn't cross the cylinder boundary)
dh = Head to read from (aka side) - Addressing registers eg: Town/City
dl = Drive to read from. - Country
ch = Cylinder (aka track) to read from - Street name
cl = Sector to read - House number
es = Segment to put loaded data into - Output address in eg: Street name
bx = Offset to put loaded data into - House number in the street
An example to load the first sector of a floppy disk would be:
ah=2(Function number),al=1(1 sector to read),dh=1(First head)
dl=0(default for floppy drive),ch=1(First cylinder),cl=1(First sector)
es=1000h(Put the output at 1000h in memory), bx=0(Offset of 0)
[ END QUOTE ]
And here's the contradiction:
[ CODE ]
; Load kernel procedure
LoadKern:
mov ah, 0x02 ; Read Disk Sectors
mov al, 0x01 ; Read one sector only (512 bytes per sector)
mov ch, 0x00 ; Track 0
mov cl, 0x02 ; Sector 2
mov dh, 0x00 ; Head 0
mov dl, 0x00 ; Drive 0 (Floppy 1) (This can be replaced with the value in BootDrv)
mov bx, 0x2000 ; Segment 0x2000
mov es, bx ; again remember segments bust be loaded from non immediate data
mov bx, 0x0000 ; Start of segment - offset value
.readsector
int 0x13 ; Call BIOS Read Disk Sectors function
jc .readsector ; If there was an error, try again
[ END CODE ]
So, does the disk interrupt (0x13) treat 1's as first sector/head/cylinder or 0's ?! o_O
I'll be thankful for some clarification, despite the offtopicness (sorry).