From 9922f43d213bb2f710f90cb5165a7580ef0326cd Mon Sep 17 00:00:00 2001 From: Irene Knapp Date: Sat, 16 May 2026 00:43:24 -0700 Subject: it's much closer, most of the labels work correctly now Force-Push: yes Change-Id: I45662e60c0035758a2cd57d971031eb0562eccb7 --- evoke.e | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) (limited to 'evoke.e') diff --git a/evoke.e b/evoke.e index 68645cb..86e79c8 100644 --- a/evoke.e +++ b/evoke.e @@ -2,9 +2,43 @@ ~ | ./quine > evoke && chmod 755 evoke && ./evoke 1024 read-to-buffer -: foo ;asm +~ Any word that ends with a normal semicolon will require this, so its +~ definition has to be near the start. +: exit + [ here @ + :rsi pack-popcontrol + here ! ] ;asm + +: lit + [ here @ + lods64 + :rax push-reg64 + here ! ] ;asm + +: sys-exit + [ here @ + 60 :rax mov-reg64-imm64 + :rdi pop-reg64 + syscall + hlt + here ! ] ;asm + +: happy-path 42 sys-exit ; + +~ : lods64 ; +~ : :rax ; +~ : push-reg64 ; +~ : mov-reg64-imm64 ; +~ : :rdi ; +~ : pop-reg64 ; +~ : syscall ; +~ : hlt ; +~ : here ; +~ : @ ; +~ : ! ; +~ : [ ; +~ : ] ; -: bar ;asm pyrzqxgl s" source-to-precompile" variable -- cgit 1.4.1