diff options
| author | Irene Knapp <ireneista@irenes.space> | 2025-11-08 15:29:37 -0800 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2025-11-08 15:29:37 -0800 |
| commit | c95489053b54b36265041dda54129fa909e9a501 (patch) | |
| tree | a61ca670fc43b9f46af3e6a3bad62bbac4edcfb0 /quine.asm | |
| parent | f5a6ad84e6c3ae1efd2802a01044cc548968cee4 (diff) | |
assembly-in-Forth versions of the rest of the stack-manip words
Force-Push: yes Change-Id: I67f3a218ea3c0cbb362e2825adf200e7cca05edc
Diffstat (limited to 'quine.asm')
| -rw-r--r-- | quine.asm | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/quine.asm b/quine.asm index 9e5da26..cf6076d 100644 --- a/quine.asm +++ b/quine.asm @@ -2053,23 +2053,40 @@ cold_start: ; This was "roll3". dq litstring, "3roll", early_create, early_self_codeword, early_here, fetch - ; TODO - dq lit, 8, packalign, early_here_store + dq rax, pop_reg64 + dq rbx, pop_reg64 + dq rcx, pop_reg64 + dq rbx, push_reg64 + dq rax, push_reg64 + dq rcx, push_reg64 + dq pack_next, lit, 8, packalign, early_here_store ; This was "unroll3". dq litstring, "3unroll", early_create, early_self_codeword, early_here dq fetch - ; TODO - dq lit, 8, packalign, early_here_store + dq rax, pop_reg64 + dq rbx, pop_reg64 + dq rcx, pop_reg64 + dq rax, push_reg64 + dq rcx, push_reg64 + dq rbx, push_reg64 + dq pack_next, lit, 8, packalign, early_here_store dq litstring, "dup", early_create, early_self_codeword, early_here, fetch - ; TODO - dq lit, 8, packalign, early_here_store + dq rax, pop_reg64 + dq rax, push_reg64 + dq rax, push_reg64 + dq pack_next, lit, 8, packalign, early_here_store ; This was "dup2". dq litstring, "2dup", early_create, early_self_codeword, early_here, fetch - ; TODO - dq lit, 8, packalign, early_here_store + dq rax, pop_reg64 + dq rbx, pop_reg64 + dq rbx, push_reg64 + dq rax, push_reg64 + dq rbx, push_reg64 + dq rax, push_reg64 + dq pack_next, lit, 8, packalign, early_here_store ; This was "add". dq litstring, "+", early_create, early_self_codeword, early_here, fetch |