MCPcopy Create free account
hub / github.com/cmuratori/computer_enhance / ExecInterrupt

Function ExecInterrupt

perfaware/sim86/sim86_execute.cpp:217–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217static void ExecInterrupt(segmented_access Memory, register_state_8086 *Registers, u16 InterruptType)
218{
219 PushFlags(Memory, Registers);
220 Push(Memory, Registers, Registers->cs);
221 Push(Memory, Registers, Registers->ip);
222
223 Registers->flags &= ~(Flag_TF | Flag_IF);
224
225 u16 InterruptAddress = 4*InterruptType;
226
227 Registers->ip = ReadU16(Memory, InterruptAddress);
228 Registers->cs = ReadU16(Memory, InterruptAddress + 2);
229}
230
231static void ConditionalJump(exec_result *Result, register_state_8086 *Registers, s8 Displacement, b32 ShouldJump)
232{

Callers 1

ExecInstructionFunction · 0.85

Calls 3

PushFlagsFunction · 0.85
PushFunction · 0.85
ReadU16Function · 0.85

Tested by

no test coverage detected