diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-05-25 00:45:31 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-05-25 00:45:31 -0700 |
commit | bd31dbe85418b05a5f9e101525a829c48aa9bf37 (patch) | |
tree | a996945a344c22beea3f73fdcdb3686a523ebe04 /subx/075array-equal.subx | |
parent | 6c03f2edab211d90405187eafa9a0243bbd64c39 (diff) | |
download | mu-bd31dbe85418b05a5f9e101525a829c48aa9bf37.tar.gz |
.
hoist 'Heap' variable into the std library in anticipation of the parse-array-of-ints primitive.
Diffstat (limited to 'subx/075array-equal.subx')
-rw-r--r-- | subx/075array-equal.subx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/subx/075array-equal.subx b/subx/075array-equal.subx index ebc446d8..24f99b0c 100644 --- a/subx/075array-equal.subx +++ b/subx/075array-equal.subx @@ -6,6 +6,15 @@ # . 1-3 bytes 3 bits 2 bits 3 bits 3 bits 3 bits 2 bits 2 bits 0/1/2/4 bytes 0/1/2/4 bytes Entry: + # initialize heap + # . Heap = new-segment(64KB) + # . . push args + 68/push Heap/imm32 + 68/push 0x10000/imm32/64KB + # . . call + e8/call new-segment/disp32 + # . . discard args + 81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP # for debugging: run a single test #? e8/call test-compare-inequal-arrays-equal-lengths/disp32 @@ -244,4 +253,12 @@ test-compare-inequal-arrays-equal-lengths: 5d/pop-to-EBP c3/return +== data + +Heap: + # curr + 0/imm32 + # limit + 0/imm32 + # . . vim:nowrap:textwidth=0 |