Skip to content

Commit

Permalink
registers are dumping correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-johnson-4 committed Jan 2, 2024
1 parent c923922 commit 536a2e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
10 changes: 2 additions & 8 deletions stdlib/helpers.lm
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,11 @@

::yield-cons := λhead tail. (
head # this is head
::show-cons
::close-this
::open-this
::show-cons

\t mov %r8, %r9 \n # %r9 is head

tail # this is tail
::show-cons
::close-this
::open-this
::show-cons
::close-this # %r8 is tail

\t mov $0, %r12 \n # this.atom is NULL
\t mov %r9, %r13 \n # this.head is head
Expand Down
4 changes: 3 additions & 1 deletion stdlib/prelude.lm
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@
::push-this
\t mov %r13, %r8 \n
::open-this
::show-cons
::pop-this

# print head
# print tail
::push-this
\t mov %r14, %r8 \n
::open-this
::show-cons
::pop-this

\t ret \n
Expand Down

0 comments on commit 536a2e5

Please sign in to comment.