corecode has written: >On Thu, 20 Dec 2001 14:2:16 +0800 Leslie Jackson <[EMAIL PROTECTED]> >wrote: > >> Now i think i've got a basic knowledge about the BIOS data area. >> But reading the code of boot0.s, i got another question as in the >> following code: >> >> main.5: incw dx # Next item >> addb $0x10,bl # Next entry >> jnc main.3 # Till done >> >> The partition table in MBR only has 4 items, why check for 16 times?? > >it doesn't check for 16. it adds 0x10 to bl and if bl overflows (prolly >the end of the partition table. as sizeof(ever entry) == 0x10 and the 4th >ends at 0x1fc another (a 5th) increment will overflow bl and result in a >set carry flag. >
Thanks for your insight! And i've got the point. Before the loop around on the partition table, the register %dx has been assigned the value $0x7c2(That is: 0x600 + 0x1be + 4) as in the code: movw $(partbl+0x4), %bx So 4 items of the partition table has been checked, %bl has the value $0xf2. And the following increment(addb $0x10, %bl) will result in a carry flag. Am i right?? Thanks a lot. BTW: the more i read it(boot0.s), the more i find it's worth reading. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message