本文整理汇总了C++中Cpu::seti8253方法的典型用法代码示例。如果您正苦于以下问题:C++ Cpu::seti8253方法的具体用法?C++ Cpu::seti8253怎么用?C++ Cpu::seti8253使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cpu
的用法示例。
在下文中一共展示了Cpu::seti8253方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
{
std::cerr << s << std::endl;
return -1;
}
std::cout << "SDL initialized." << std::endl;
Cpu cpu;
cpu.Init(0x100000);
cpu.Reset();
cpu.SetBootDevice(boot);
std::cout << "CPU initialized." << std::endl;
Interval_Timer_8253 i8253;
std::cout << "8253 timer initialized." << std::endl;
Interrupt_Controller_8259a i8259a;
std::cout << "8259a Interrupt Controller initialized." << std::endl;
Video video;
video.setcpu(&cpu);
std::cout << "video device initialized." << std::endl;
Display display;
display.setcpu(&cpu);
display.setvideo(&video);
std::cout << "Display device initialized." << std::endl;
Keyboard keyboard;
keyboard.InitKeyboard(&i8259a);
std::cout << "Keyboard device initialized." << std::endl;
timer timing;
timing.seti8259a(&i8259a);
timing.seti8253(&i8253);
timing.setvideo(&video);
std::cout << "System timer initialized." << std::endl;
disk_handle Disk_handle;
Disk_handle.setcpu(&cpu);
if(floppyname != NULL)
{
fd1 = new Disk(floppyname, 0);
fd1->setcpu(&cpu);
Disk_handle.insert_disk(0, fd1);
}
if(harddiskname != NULL)
{
hd1 = new Disk(harddiskname, 0x80);
hd1->setcpu(&cpu);
Disk_handle.insert_disk(0x80, hd1);
}
std::cout << "Disk controller initialized." << std::endl;
port_handle ports_operate;
ports_operate.seti8259a(&i8259a);
ports_operate.seti8253(&i8253);
ports_operate.setvideo(&video);
ports_operate.setkeyboard(&keyboard);
cpu.setports_operate(&ports_operate);
cpu.seti8259a(&i8259a);
cpu.seti8253(&i8253);
cpu.setvideo(&video);
cpu.setDisk_handle(&Disk_handle);
cpu.settimer(&timing);