Questions tagged [bochs]

A highly portable open source IA-32 (x86) PC emulator written in C++, that runs on most popular platforms.

Bochs is a highly portable open source IA-32 (x86) PC emulator written in C++, that runs on most popular platforms. It includes emulation of the Intel x86 CPU, common I/O devices, and a custom BIOS. Currently, Bochs can be compiled to emulate a 386, 486, Pentium/PentiumII/PentiumIII/Pentium4 or x86-64 CPU including optional MMX, SSEx and 3DNow! instructions.

Official website is http://bochs.sourceforge.net/

150 questions
4
votes
1 answer

Why isn't my interrupt handler firing?

I'm trying to install an interrupt handler in Bochs, but for some reason my interrupt handler isn't firing. First I set a breakpoint: 00036440222i[CPU0 ] [36440222] Stopped on MAGIC BREAKPOINT (0) [0x0000000000703044] 0008:00000000c0003044 (unk.…
user541686
  • 205,094
  • 128
  • 528
  • 886
3
votes
1 answer

How to understand and change CPU register FLAG in bochsdbg?

I can use 'r' to get the info of CPU register FLAG. 1.Can I understand by this? eflags 0x00000082: id vip vif ac vm rf nt IOPL=0 of df if tf SF zf af pf cf 0x00000082= 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 2.How to…
sam
  • 2,049
  • 3
  • 20
  • 27
3
votes
3 answers

bochs: can not load bootloader using a floppy image

I have a simple (probably the simplest) bootloader. Very similar to this and this. The code is shown below [org 0x7c00] mov ah, 0x0e mov al, 'h' int 0x10 jmp $ times 510-($-$$) db 0 dw 0xaa55 The code is taken from the video series…
SRC
  • 2,123
  • 3
  • 31
  • 44
3
votes
1 answer

How to manually insert a breakpoint that Bochs's built-in debugger will stop at? INT3 doesn't work

I am using bochs enhanced debugger (bochs debugger with gui), but it's also debugging the BIOS code, and this is too complicated for me. So how can I set a breakpoint manually at the start of my code? I tried int3 but it doesn't stop on it.
3
votes
1 answer

Using grub in floppy image file to start your own kernel inside bochs

Basically I've followed the instructions here http://sig9.com/bochs-grub to create a bare image file which does nothing but lets the BIOS start GRUB. The problems are: The kernel I am writing will be 32-bit, using…
Flavius
  • 13,566
  • 13
  • 80
  • 126
3
votes
1 answer

Second stage bootLoader not loading in bochs, LINUX (ubuntu 16.04), Brokenthorn osdev series

I am following brokenthorn OS development series, until now I am able sucessfully run bootloader stage1 but there is some issue with loading second stage bootloader from FAT12 floppy in bochs emulator on linux machine(ubuntu 16.04) (It works fine in…
snehm
  • 223
  • 3
  • 13
3
votes
1 answer

int 13h 42h doesn't load anything in Bochs

I changed my bootloader from CHS to LBA, so I replaced int 13h 02h with int 13h 42h. It works correctly in QEMU, however, I have troubles running it with Bochs and my laptop. I wrote bootloader to USB flash drive with dd if=main.bin of=/dev/sdb…
trexxet
  • 176
  • 3
  • 14
3
votes
1 answer

Floppy Read (AH=0x2, int 0x13) doesn't complete

In the second stage of my bootloader I'm trying to load some sectors off a virtual floppy disk into memory in bochs, but upon invoking int 0x13, the routine just does not return. I believe the relevant code from my second stage is: bootsys_start: …
cadaniluk
  • 15,027
  • 2
  • 39
  • 67
3
votes
1 answer

Why the opcodes I get using NASM can't be executed correctly by bochs i386 CPU?

Abstract: I found many output formats supported in NASM generate very sparse machine-code interlaced with 0s. Most importantly, they can't be correctly understood by bochs' i386 cpu. I believe the fault is on myself, but don't know where and…
Chiron
  • 974
  • 1
  • 8
  • 20
3
votes
1 answer

Error After Switching to Protected Mode and Making a Far Jump

I am writing a boot loader using FASM (the Flat Assembler). I was successful in 16-bit mode but I am facing an error in switching to 32-bit mode. I looked at an answer to a similar (infact same problem at GPF after far jump to protected mode) but…
Anish Sharma
  • 314
  • 3
  • 18
3
votes
1 answer

PintOS: schedule() Kernel Panic at ASSERT(is_thread(next))

Schedule() in thread.c takes the current running thread and the next thread in the ready list, and does an ASSERT that the next thread is a thread (is_thread(t) checks that t != NULL and that t->magic == THREAD_MAGIC). I'm currently getting this…
MLE
  • 51
  • 1
  • 5
3
votes
1 answer

bochs on Fedora 22: Failed loading module libbx_usb_uhci.so

I ran into some trouble using BOCHS (Paket bochs-2.6.2-7.fc22.x86_64) on my brand new installed Fedora 22 AMD64 system. I used yum to get bochs but if I try to start a simulation I get an error message: 00000000000p[ ] >>PANIC<< dlopen failed for…
Simon Friese
  • 101
  • 5
3
votes
3 answers

Bochs (2.4.6)/GRUB (0.97) "Error 13 Invalid or unsupported executable format" when passing char string in C function call

I'm trying to follow the "The little book about OS development" and doing a small OS that I'm booting in bochs. But I've run into a problem that I can't solve or explain. In short when passing a char string (in C), the kernel boot ok and works when…
max7
  • 43
  • 4
3
votes
2 answers

nasm - error: label or instruction expected at the start of line

Hello I am very new to assembly(just started today) and ran into this problem when doing exactly what is said in this tutorial. I made an asm file with this text: bits 16 org 0x7c00 jmp Main :In= si = string, ah = 0eh, al = char, Out=…
pokeyOne
  • 312
  • 1
  • 2
  • 12
3
votes
2 answers

running OS on bochs returned error

I'm working on an OS programming project called pintos. It is run on bochs following the command pintos run nameOfProcess And here's the error message I get Writing command line to /tmp/eKW3NMXoGT.dsk... squish-pty bochs…
manuzhang
  • 2,995
  • 4
  • 36
  • 67
1
2
3
9 10