X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=main.asm;h=43eef7a7e52ab27a253ad343ec775ae83e0a8b22;hb=afb6afb35d212499a691c0168ad3f1e479792e18;hp=537d0e8e6fe3e3728bc06704d8925001e27f739e;hpb=e3bee6e77d04f68fe14e4a0106f02d9284d7dcac;p=rrq%2Fjonasforth.git diff --git a/main.asm b/main.asm index 537d0e8..43eef7a 100644 --- a/main.asm +++ b/main.asm @@ -160,6 +160,17 @@ forth_asm LIT, 'LIT' push rax next +;; When LITSTRING is encountered while executing a word, it instead reads a +;; string from the definition of that word, and places that string on the stack +;; as (buffer, length). +forth_asm LITSTRING, 'LITSTRING' + lodsb + push rsi ; Buffer + movzx rax, al + push rax ; Length + add rsi, rax ; Skip over string before resuming execution + next + ;; Given a string (a pointer following by a size), return the location of the ;; dictionary entry for that word. If no such word exists, return 0. forth_asm FIND, 'FIND'