Another question about MBR of DOS

Programming, for all ages and all languages.
Post Reply
User avatar
david
Member
Member
Posts: 93
Joined: Tue Aug 21, 2007 4:22 am
Location: Beijing.China
Contact:

Another question about MBR of DOS

Post 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 ?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post 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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
david
Member
Member
Posts: 93
Joined: Tue Aug 21, 2007 4:22 am
Location: Beijing.China
Contact:

Post 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.
User avatar
XCHG
Member
Member
Posts: 416
Joined: Sat Nov 25, 2006 3:55 am
Location: Wisconsin
Contact:

Post 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.
On the field with sword and shield amidst the din of dying of men's wails. War is waged and the battle will rage until only the righteous prevails.
User avatar
david
Member
Member
Posts: 93
Joined: Tue Aug 21, 2007 4:22 am
Location: Beijing.China
Contact:

Post 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.
Just For Fun
Post Reply