From c95489053b54b36265041dda54129fa909e9a501 Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Sat, 8 Nov 2025 15:29:37 -0800 Subject: assembly-in-Forth versions of the rest of the stack-manip words Force-Push: yes Change-Id: I67f3a218ea3c0cbb362e2825adf200e7cca05edc --- quine.asm | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'quine.asm') 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 -- cgit 1.4.1