Hi I'm doing boot loader with LBA addressing on Bochs.
When executing int 13h with AH = 42h, the terminal displayed the following information.
00017480939i[BIOS ] int13_diskette: unsupported AH=42
00017481022i[XGUI ] charmap update. Font is 9 x 16
Next at t=17481022
The registers before int 13h instruction are as follow:
<bochs:3> reg
CPU0:
rax: 00000000_00004200 rcx: 00000000_00090001
rdx: 00000000_00000000 rbx: 00000000_00008000
rsp: 00000000_00007be8 rbp: 00000000_00000000
rsi: 00000000_000e7be8 rdi: 00000000_00007fe0
r8 : 00000000_00000000 r9 : 00000000_00000000
r10: 00000000_00000000 r11: 00000000_00000000
r12: 00000000_00000000 r13: 00000000_00000000
r14: 00000000_00000000 r15: 00000000_00000000
rip: 00000000_00007d94
eflags 0x00000202: id vip vif ac vm rf nt IOPL=0 of df IF tf sf zf af pf cf
<bochs:4> sreg
es:0x0000, dh=0x00009300, dl=0x0000ffff, valid=1
Data segment, base=0x00000000, limit=0x0000ffff, Read/Write, Accessed
cs:0x0000, dh=0x00009300, dl=0x0000ffff, valid=1
Data segment, base=0x00000000, limit=0x0000ffff, Read/Write, Accessed
ss:0x0000, dh=0x00009300, dl=0x0000ffff, valid=7
Data segment, base=0x00000000, limit=0x0000ffff, Read/Write, Accessed
ds:0x0000, dh=0x00009300, dl=0x0000ffff, valid=1
Data segment, base=0x00000000, limit=0x0000ffff, Read/Write, Accessed
fs:0x0000, dh=0x00009300, dl=0x0000ffff, valid=1
Data segment, base=0x00000000, limit=0x0000ffff, Read/Write, Accessed
gs:0x0000, dh=0x00009300, dl=0x0000ffff, valid=1
Data segment, base=0x00000000, limit=0x0000ffff, Read/Write, Accessed
ldtr:0x0000, dh=0x00008200, dl=0x0000ffff, valid=1
tr:0x0000, dh=0x00008b00, dl=0x0000ffff, valid=1
gdtr:base=0x00000000000f9a37, limit=0x30
idtr:base=0x0000000000000000, limit=0x3ff
And the 16 Bytes DS:SI pointing at are:
<bochs:6> xp /16b 0x7be8
[bochs]:
0x0000000000007be8 <bogus+ 0>: 0x10 0x00 0x01 0x00 0x00 0x80 0x00 0x00
0x0000000000007bf0 <bogus+ 8>: 0x19 0x00 0x00 0x00 0x00 0x00 0x00 0x00
The return value on AH is 0x01, and the CF has been set.
I'm using disk as my boot option, and created a disk image file, part of my bochs configuration are as follow:
boot: disk
floppy_bootsig_check: disabled=0
# no floppya
# no floppyb
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, path="Boot.img", mode=flat, cylinders=0, heads=0, spt=0, model="Generic 1234", biosdetect=auto, translation=auto
ata0-slave: type=none
My platform is Ubuntu 18.4, Bochs 2.6.9, and the following is my configuration option:
./configure --enable-plugins --enable-debugger --enable-disasm --enable-readline --enable-cpu-level=6 --enable-smp --enable-x86-64 --enable-avx --enable-a20-pin --enable-fast-function-calls --enable-all-optimizations --enable-x86-debugger --enable-alignment-check --enable-sb16
Now my question would be how could I enable the AH=42h option for BIOS.
Thanks!