The Ikarus _@ / MEM_GetIntAddress functions (e.g., _@s, _@f, ...) return the virtual address of a Daedalus variable. They work by inspecting the raw VM stack to retrieve a symbol reference before it is consumed as a value. This requires two APIs that are not currently exposed in the C# wrapper.
auto _takeref(zenkit::DaedalusVm& vm) -> zenkit::DaedalusNakedCall {
if (vm.top_is_reference()) {
auto [ref, idx, context] = vm.pop_reference();
...
}
...
}
vm.override_function("_@", [this](zenkit::DaedalusVm& vm) { return _takeref(vm); });
vm.override_function("_@s", [this](zenkit::DaedalusVm& vm) { return _takeref(vm); });
vm.override_function("_@f", [this](zenkit::DaedalusVm& vm) { return _takeref(vm); });
Requested C# API:
- DaedalusVm.TopIsReference
- DaedalusVm.PopReference();
The Ikarus _@ / MEM_GetIntAddress functions (e.g., _@s, _@f, ...) return the virtual address of a Daedalus variable. They work by inspecting the raw VM stack to retrieve a symbol reference before it is consumed as a value. This requires two APIs that are not currently exposed in the C# wrapper.
Reference OpenGothic (directmemory.cpp):
Requested C# API: