Bochs - Real Mode int 13h extension support

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
deph
Posts: 13
Joined: Sun Jun 22, 2008 6:04 am

Bochs - Real Mode int 13h extension support

Post by deph »

Can anyone explain why Bochs sets CF 1 when I use int 13h, ah = 41 on dl=0x80 (hdd) ... Yes, I know - it says it does not support extensions ... but WHY ?! shouldn't it ?
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:

Re: Bochs - Real Mode int 13h extension support

Post by Combuster »

ah=41 and ah=41h kindof makes a big difference :wink:
"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 ]
deph
Posts: 13
Joined: Sun Jun 22, 2008 6:04 am

Re: Bochs - Real Mode int 13h extension support

Post by deph »

Yes, it does

Code: Select all

    movb $0x41, %ah
    movb $0x80, %dl
    movw $0x55AA, %bx
    int $0x13

    jnc 1f
    movw $0xFFFF, %ax

1:
    ...
Hmm ... AX is 0xFFFF at the end ... shouldn't be like that ...
deph
Posts: 13
Joined: Sun Jun 22, 2008 6:04 am

Re: Bochs - Real Mode int 13h extension support

Post by deph »

Sorry, it's my fault ... :( I had no hdd set in bochs.conf ;
deph
Posts: 13
Joined: Sun Jun 22, 2008 6:04 am

Re: Bochs - Real Mode int 13h extension support

Post by deph »

Ok, now I created a disk image, and after calling int 0x13 ah=0x41 result is CF=0, AH=0x30 (i think it's the major version number ... ?); but now when I call int 0x13 with AH=0x48, it sets CF=1 (...and AH=0x01 !) ... Does anyone have an idea why ?

From bochs.conf:

Code: Select all

ata0: enabled=1, ioaddr1=0x1F0, ioaddr2=0x3F0, irq=14
ata0-master: type=disk, path="./hdd.img", mode=flat, cylinders=20805, heads=16, spt=63, translation=lba
Where hdd.img is a 10GB hard image
Post Reply