From 85f90aad37a469a65efd44deaafd48123c3fd59a Mon Sep 17 00:00:00 2001 From: kitty Date: Fri, 17 Apr 2026 01:39:34 +1000 Subject: loouping and start of wordlist --- sanctuary.fs | 45 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 36 insertions(+), 9 deletions(-) (limited to 'sanctuary.fs') diff --git a/sanctuary.fs b/sanctuary.fs index 8880ccb..018da63 100644 --- a/sanctuary.fs +++ b/sanctuary.fs @@ -349,30 +349,57 @@ privatise \ DO LOOP {{{ \ todo doc -: do postpone swap postpone >r postpone >r ?branch >mark -\ postpone swap postpone >r postpone >r postpone + postpone r@ +: do ( comp: -- mark f ) + postpone swap postpone >r postpone >r ?branch >mark + postpone swap postpone >r postpone >r r + postpone r> postpone + postpone r@ postpone over postpone >r ( n+i lim , R: lim n+i ) postpone >= ?branch ( ?domark t | f -- ) true = if + >resolve + then ; immediate compile-only \ todo -loop -: loop postpone r> postpone 1+ postpone r@ +: loop ( ? ) >r + postpone r> postpone 1+ postpone r@ postpone over postpone >r ( n+i lim , R: lim n+i ) postpone >= ?branch ( ?domark t | f -- ) true = if + >resolve + then ; immediate compile-only +: i rp cell+ @ ; \ }}} +bye + \ VOCABULARY {{{ -\ do this after user input and stuff is Working +\ todo doc \ words in asm that use latest directly: \ find (header) : ; smudge immediate compile-only +\ the easiest (altho kind of ugly) way i'll probably do this +\ is to just redefine all of these here +\ we don't need to redo ; because we already did it above 32 constant #vocs \ #context better name ? variable #order create context #vocs cells allot + +: wordlist here 0 , ; +: vocabulary wordlist create , does> ( todo ) ; + +: get-order ( -- widn ... wid1 n ) ; +: set-order ( widn ... wid1 n -- ) ; + +\ private{ +\ }private +\ \ the actual setup is in a compiled word to prevent +\ \ the system from shitfucking itself when its only halfway done setting up +\ :noname ; execute +\ privatise \ }}} \ PROGRAMMING TOOLS {{{ -- cgit v1.2.3