HALT and RESET only in kernel mode
This commit is contained in:
parent
ae00c95679
commit
5251cde04c
1 changed files with 9 additions and 3 deletions
6
cpu.cpp
6
cpu.cpp
|
@ -1627,7 +1627,10 @@ bool cpu::misc_operations(const uint16_t instr)
|
|||
{
|
||||
switch(instr) {
|
||||
case 0b0000000000000000: // HALT
|
||||
if (getPSW_runmode() == 0) // only in kernel mode
|
||||
*event = EVENT_HALT;
|
||||
else
|
||||
trap(4);
|
||||
return true;
|
||||
|
||||
case 0b0000000000000001: // WAIT
|
||||
|
@ -1681,8 +1684,11 @@ bool cpu::misc_operations(const uint16_t instr)
|
|||
return true;
|
||||
|
||||
case 0b0000000000000101: // RESET
|
||||
if (getPSW_runmode() == 0) { // only in kernel mode
|
||||
b->init();
|
||||
|
||||
init_interrupt_queue();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue