My understanding of basic architecture of bochs is to set aside a large block of memory
and interpret the instruction one after another .... what I want to know is how to emulate interrupts, like clock signal, keyboard etc?
how does bochs emulate all those interrupts?
-
- Member
- Posts: 5572
- Joined: Mon Mar 25, 2013 7:01 pm
Re: how does bochs emulate all those interrupts?
Every so often, take a break from interpreting instructions to see if an interrupt should happen.
Re: how does bochs emulate all those interrupts?
Like Octocontrabass said, but it is checked after each and every instruction. The main cpu loop is here, and the "interrupt pending" internal flags are checked in event.cc (where each interrupt source is hardwired in the code, like "is_pending(BX_EVENT_PENDING_LAPIC_INTR)" or "is_unmasked_event_pending(BX_EVENT_SMI)").ITchimp wrote:My understanding of basic architecture of bochs is to set aside a large block of memory
and interpret the instruction one after another .... what I want to know is how to emulate interrupts, like clock signal, keyboard etc?
Use the source, Luke
Cheers,
bzt