Skip to content

Commit

Permalink
Mini improvment in README (#34)
Browse files Browse the repository at this point in the history
Co-authored-by: Pablo Deymonnaz <[email protected]>
  • Loading branch information
pablodeymo and pablodeymo authored Aug 2, 2023
1 parent b00a613 commit 11f3b8b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,25 +218,25 @@ For example, if we have this memory represented by address, value pairs:

Step 1: Calculate segment sizes:

0 -> 3
1 -> 5
2 -> 1
0 --(has size)--> 3
1 --(has size)--> 5
2 --(has size)--> 1

Step 2: Assign a base to each segment:

0 -> 1
1 -> 4 (1 + 3)
2 -> 9 (4 + 5)
0 --(has base value)--> 1
1 --(has base value)--> 4 (that is: 1 + 3)
2 --(has base value)--> 9 (that is: 4 + 5)

Step 3: Convert relocatables to integers

1 (base[0] + 0) -> 1
2 (base[0] + 1) -> 4
3 (base[0] + 2) -> 7
4 (base[1] + 0) -> 8
5 (base[1] + 1) -> 3 (base[0] + 2)
5 (base[1] + 1) -> 3 (that is: base[0] + 2)
.... (memory gaps)
8 (base[1] + 4) -> 2 (base[0] + 1)
8 (base[1] + 4) -> 2 (that is: base[0] + 1)
9 (base[2] + 0) -> 1

### Program parsing
Expand Down

0 comments on commit 11f3b8b

Please sign in to comment.