From 3c5dc89e436d15e598c279db5ec67f39417c03ca Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Sat, 8 Nov 2025 17:24:16 -0800 Subject: bitwise operations Force-Push: yes Change-Id: Idf4fe951fa583946f0a51a53f15eff7f1138b7c6 --- quine.asm | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'quine.asm') diff --git a/quine.asm b/quine.asm index b67842b..0525f23 100644 --- a/quine.asm +++ b/quine.asm @@ -2186,20 +2186,31 @@ cold_start: dq pack_next, lit, 8, packalign, early_here_store dq litstring, "and", early_create, early_self_codeword, early_here, fetch - ; TODO - dq lit, 8, packalign, early_here_store + dq rbx, pop_reg64 + dq rax, pop_reg64 + dq rbx, rax, and_reg64_reg64 + dq rax, push_reg64 + dq pack_next, lit, 8, packalign, early_here_store dq litstring, "or", early_create, early_self_codeword, early_here, fetch - ; TODO - dq lit, 8, packalign, early_here_store + dq rbx, pop_reg64 + dq rax, pop_reg64 + dq rbx, rax, or_reg64_reg64 + dq rax, push_reg64 + dq pack_next, lit, 8, packalign, early_here_store dq litstring, "xor", early_create, early_self_codeword, early_here, fetch - ; TODO - dq lit, 8, packalign, early_here_store + dq rbx, pop_reg64 + dq rax, pop_reg64 + dq rbx, rax, xor_reg64_reg64 + dq rax, push_reg64 + dq pack_next, lit, 8, packalign, early_here_store dq litstring, "invert", early_create, early_self_codeword, early_here, fetch - ; TODO - dq lit, 8, packalign, early_here_store + dq rax, pop_reg64 + dq rax, not_reg64 + dq rax, push_reg64 + dq pack_next, lit, 8, packalign, early_here_store dq litstring, "lit", early_create, early_self_codeword, early_here, fetch ; TODO -- cgit 1.4.1