Page 1 of 1

Another question about MBR of DOS

Posted: Sun Feb 17, 2008 10:26 pm
by david
In the MBR of DOS

Code: Select all


...
mov dx, [si]          ; [si]=0180h
mov cx, [si+2]      ; [si+2]=0001h
...
mov di, 0005
mov bx, 7c00
mov ax, 0201
push di
int 13
pop di
jnb 0278
...

'0278' is offset in MBR of DOS .
'di=0005' means read disk 5 times .

'jnb 0278' , why use 'jnb' ?
In this case, after int 13, i always use 'jnc'.
'jnc 0278' is correct ?

Posted: Mon Feb 18, 2008 10:50 am
by Combuster
What is it that you are trying to achieve. Disassembling DOS' bootloader seems like a pointless exercise to me.

JNC = JNB. RTFM next time. The answer comes from exactly the same source as where your previous question got answered.

Posted: Mon Feb 18, 2008 11:14 pm
by david
i am writing a MBR for our software. i already finish it .
i think the MBR of DOS or Windows XP/2K is classic .
so i want to compare my code and the MBR of DOS, i find some difference.
i want to know which is better !
OK, it is my reason .
maybe it doesn't make any sense to you.

Posted: Tue Feb 19, 2008 4:46 am
by XCHG
JNB is Jump if Not Below. This conditional jump checks if the Carry Flag is zero or not. If yes, it will jump; else, it wont. So basically, JNB is the same as JNC.

Posted: Wed Feb 20, 2008 12:32 am
by david
the machine code is '730C' ,
i disassembled as 'jnb 0278' by MS-DEBUG's U command,
maybe disassemble as 'jnc 0278' by other debugger.
so i think it caused by MS-DEBUG' U command.