colocate compute-offsets with its globals
This commit is contained in:
parent
de3d48163e
commit
01b45300ed
BIN
subx/apps/survey
BIN
subx/apps/survey
Binary file not shown.
|
@ -317,6 +317,20 @@ test-convert-computes-addresses:
|
|||
5d/pop-to-EBP
|
||||
c3/return
|
||||
|
||||
# global scratch space for compute-offsets in the data segment
|
||||
== data
|
||||
|
||||
compute-offsets:curr-segment-name: 0/imm32/curr
|
||||
compute-offsets:curr-segment-name:end: 0/imm32/limit
|
||||
compute-offsets:file-offset: 0/imm32
|
||||
compute-offsets:segment-offset: 0/imm32
|
||||
compute-offsets:word-slice: 0/imm32/curr
|
||||
compute-offsets:word-slice:end: 0/imm32/limit
|
||||
compute-offsets:heap: 0/imm32/curr
|
||||
compute-offsets:heap:end: 0/imm32/limit
|
||||
|
||||
== code
|
||||
|
||||
compute-offsets: # in : (address buffered-file), segments : (address stream {string, segment-info}), labels : (address stream {string, label-info})
|
||||
# pseudocode:
|
||||
# var curr-segment-name = 0
|
||||
|
@ -2698,13 +2712,4 @@ $p_align:
|
|||
# compute the starting address for each segment
|
||||
0x1000/imm32
|
||||
|
||||
compute-offsets:curr-segment-name: 0/imm32/curr
|
||||
compute-offsets:curr-segment-name:end: 0/imm32/limit
|
||||
compute-offsets:file-offset: 0/imm32
|
||||
compute-offsets:segment-offset: 0/imm32
|
||||
compute-offsets:word-slice: 0/imm32/curr
|
||||
compute-offsets:word-slice:end: 0/imm32/limit
|
||||
compute-offsets:heap: 0/imm32/curr
|
||||
compute-offsets:heap:end: 0/imm32/limit
|
||||
|
||||
# . . vim:nowrap:textwidth=0
|
||||
|
|
Loading…
Reference in New Issue