Add support for user callbacks

This commit is contained in:
Igor Pissolati
2026-01-03 20:26:31 -03:00
parent 7c912146fb
commit 9fdc2a4ce6
13 changed files with 413 additions and 18 deletions

View File

@@ -59,6 +59,12 @@ class typed_emulator : public emulator
return result;
}
void write_stack(const size_t index, const pointer_type& value)
{
const auto sp = this->read_stack_pointer();
this->write_memory(sp + (index * pointer_size), &value, sizeof(value));
}
void push_stack(const pointer_type& value)
{
const auto sp = this->read_stack_pointer() - pointer_size;