summary refs log tree commit diff stats
path: root/results/classifier/118/boot/2959
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-06-16 16:59:00 +0000
committerChristian Krinitsin <mail@krinitsin.com>2025-06-16 16:59:33 +0000
commit9aba81d8eb048db908c94a3c40c25a5fde0caee6 (patch)
treeb765e7fb5e9a3c2143c68b0414e0055adb70e785 /results/classifier/118/boot/2959
parentb89a938452613061c0f1f23e710281cf5c83cb29 (diff)
downloadqemu-analysis-9aba81d8eb048db908c94a3c40c25a5fde0caee6.tar.gz
qemu-analysis-9aba81d8eb048db908c94a3c40c25a5fde0caee6.zip
add 18th iteration of classifier
Diffstat (limited to 'results/classifier/118/boot/2959')
-rw-r--r--results/classifier/118/boot/2959107
1 files changed, 107 insertions, 0 deletions
diff --git a/results/classifier/118/boot/2959 b/results/classifier/118/boot/2959
new file mode 100644
index 000000000..5a137acff
--- /dev/null
+++ b/results/classifier/118/boot/2959
@@ -0,0 +1,107 @@
+i386: 0.981
+boot: 0.949
+assembly: 0.936
+graphic: 0.838
+files: 0.836
+device: 0.835
+debug: 0.799
+performance: 0.793
+architecture: 0.771
+mistranslation: 0.735
+semantic: 0.733
+kernel: 0.730
+virtual: 0.649
+peripherals: 0.618
+vnc: 0.618
+socket: 0.608
+arm: 0.592
+PID: 0.573
+permissions: 0.543
+register: 0.529
+ppc: 0.506
+network: 0.474
+hypervisor: 0.430
+risc-v: 0.411
+VMM: 0.409
+user-level: 0.391
+TCG: 0.342
+x86: 0.325
+KVM: 0.265
+
+int 0x10 teletype output cuts final character in custom MBR on QEMU (i386 real mode)
+Description of problem:
+When using QEMU to test a custom bootloader in 16-bit real mode (i386), the BIOS interrupt `int 0x10` with AH=0x0E (teletype output) fails to display the last character of the printed message. For example, printing `"hello"` only renders `"hell"`.
+
+This happens only with this exact combination:
+
+real mode `int 0x10` teletype output
+
+message ends with `13, 10, 0`
+
+`QEMU` output cuts off the last character consistently
+
+All buffer and code logic has been verified to be correct. The same code, when run on Bochs or physical hardware, prints properly.
+Steps to reproduce:
+1.Assemble the following boot.asm:
+```nasm
+[org 0x7C00]
+[BITS 16]
+
+_start:
+    cli
+    xor ax, ax
+    mov ds, ax
+    mov es, ax
+    mov ss, ax
+    mov sp, 0x7C00
+
+    mov si, msg
+    call print
+
+    hlt
+    jmp $
+
+print:
+    pusha
+.loop:
+    lodsb
+    or al, al
+    jz .done
+    mov ah, 0x0E
+    int 0x10
+    jmp .loop
+.done:
+    popa
+    ret
+
+msg db 'hello', 13, 10, 0
+times 510 - ($ - $$) db 0
+dw 0xAA55
+```
+
+2. Compile and run:
+```bash
+$ nasm -f bin boot.asm -o boot.img
+$ qemu-system-i386 -nographic -boot a -drive format=raw,file=boot.img,index=0,if=floppy
+```
+
+3. Output will be:
+```text
+Booting from Floppy...
+hell
+```
+Expected output:
+```text
+Booting from Floppy...
+hello
+```
+Additional information:
+- Adding padding (extra 13, 10) does not solve the problem.
+
+- Confirmed that boot.img includes all bytes (xxd dump is correct).
+
+- Tested on multiple machines with same QEMU version.
+
+- May relate to VGA character output buffer not flushing after last INT 0x10?
+
+- This makes QEMU inaccurate for BIOS-level debugging of bootloaders.