Namespaces unified (sal+fi -> fail), Code cleanups (-> coding-style.txt), Doxygen-comments fixed.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1319 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -1,9 +1,17 @@
|
||||
/**
|
||||
* \brief This experiment demonstrates the fireInterrupt feature.
|
||||
*
|
||||
* The keyboard-interrupts are disabled. So nothing happens if you press a button
|
||||
* on keyboard. Only the pressed button will be stored in keyboard-buffer. With
|
||||
* the fireInterrupt feature keyboard-interrupts are generated manually. The result
|
||||
* is that the keyboard interrupts will be compensated manually. bootdisk.img can
|
||||
* be used as example image (Turbo-Pacman :-) ).
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "experiment.hpp"
|
||||
#include "SAL/SALInst.hpp"
|
||||
#include "SAL/bochs/BochsRegister.hpp"
|
||||
#include "controller/Event.hpp"
|
||||
#include "util/Logger.hpp"
|
||||
#include "config/FailConfig.hpp"
|
||||
@ -13,35 +21,27 @@
|
||||
#error This experiment needs: breakpoints, disabled keyboard interrupts and fire interrupts. Enable these in the configuration.
|
||||
#endif
|
||||
|
||||
/* This experiment demonstrates the fireInterrupt feature.
|
||||
* The keyboard-interrupts are disabled. So nothing happens if you press a button on keyboard.
|
||||
* Only the pressed button will be stored in keyboard-buffer.
|
||||
* With the fireInterrupt feature keyboard-interrupts are generated manually.
|
||||
* The result is that the keyboard interrupts will be compensated manually.
|
||||
* bootdisk.img can be used as example image. (turbo-pacman :) )
|
||||
*/
|
||||
|
||||
using std::endl;
|
||||
using namespace std;
|
||||
using namespace fail;
|
||||
|
||||
bool fireinterruptExperiment::run()
|
||||
{
|
||||
Logger log("FireInterrupt", false);
|
||||
log << "experiment start" << endl;
|
||||
|
||||
#if 1
|
||||
while(1){
|
||||
while (true) {
|
||||
int j = 0;
|
||||
for(j=0 ; j<=100 ; j++){
|
||||
fi::BPSingleEvent mainbp(0x1045f5);
|
||||
sal::simulator.addEventAndWait(&mainbp);
|
||||
for (j = 0; j <= 100; j++) {
|
||||
BPSingleEvent mainbp(0x1045f5);
|
||||
simulator.addEventAndWait(&mainbp);
|
||||
}
|
||||
sal::simulator.fireInterrupt(1);
|
||||
simulator.fireInterrupt(1);
|
||||
}
|
||||
#elif 1
|
||||
|
||||
sal::simulator.dbgEnableInstrPtrOutput(500);
|
||||
|
||||
simulator.dbgEnableInstrPtrOutput(500);
|
||||
#endif
|
||||
|
||||
sal::simulator.clearEvents(this);
|
||||
|
||||
simulator.clearEvents(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user