diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-09-28 23:08:27 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-09-29 10:20:13 -0700 |
commit | 630433cd9cb97cf71d24bfc8fab6fb54ce40382a (patch) | |
tree | cf4cffae8599489e5efcbc18b965f804d5e3a8e8 /subx/034compute_segment_address.cc | |
parent | fd0cf1cd07ce01c3d6fe709d55b60ff9d1d5d44f (diff) | |
download | mu-630433cd9cb97cf71d24bfc8fab6fb54ce40382a.tar.gz |
4614 - redo simulated RAM
Now simulated 'Memory' isn't just a single flat array. Instead it knows about segments and VMAs. The code segment will always be first, and the data/heap segment will always be second. The brk() syscall knows about the data segment. One nice side-effect is that I no longer need to mess with Memory initialization regardless of where I place my segments.
Diffstat (limited to 'subx/034compute_segment_address.cc')
-rw-r--r-- | subx/034compute_segment_address.cc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/subx/034compute_segment_address.cc b/subx/034compute_segment_address.cc index f5f383b6..71a18452 100644 --- a/subx/034compute_segment_address.cc +++ b/subx/034compute_segment_address.cc @@ -2,9 +2,7 @@ //: segment. //: This gives up a measure of control in placing code and data. -//: segment address computation requires setting Mem_offset in test mode to what it'll be in run mode :(scenario segment_name) -% Mem_offset = CODE_START; == code 05/add 0x0d0c0b0a/imm32 # add 0x0d0c0b0a to EAX # code starts at 0x08048000 + p_offset, which is 0x54 for a single-segment binary |