diff options
author | bd <bdunahu@operationnull.com> | 2025-03-21 16:06:07 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-03-21 16:06:07 -0400 |
commit | 75f78c215131499165101a499197313ba77ea230 (patch) | |
tree | 178eefa29cd9ac5ba88efd989364e1bbf591189e /src/utils/utils.cc | |
parent | 7e01ac0891452dfda93c2dcfd0817a4d43871c4b (diff) |
Small cleanups to up a lot of inplementation details
Diffstat (limited to 'src/utils/utils.cc')
-rw-r--r-- | src/utils/utils.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils/utils.cc b/src/utils/utils.cc index ebbc1e9..3a11c2c 100644 --- a/src/utils/utils.cc +++ b/src/utils/utils.cc @@ -34,3 +34,9 @@ int wrap_address(int address) { } return address % MEM_WORDS; } + +void get_memory_index(int address, int &line, int &word) +{ + line = wrap_address(address) / LINE_SIZE; + word = address % LINE_SIZE; +} |