From: plugd Date: Tue, 16 Nov 2021 12:18:57 +0000 (+0100) Subject: Improved zstring function names. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=32d17abc28fc2ea0a15d701027f64a8d108c0358;p=ez.git Improved zstring function names. --- diff --git a/ez.el b/ez.el index 6e3b4bf..8ebed7b 100644 --- a/ez.el +++ b/ez.el @@ -64,7 +64,7 @@ (defvar ez-start-pc nil) (defvar ez-himem-base nil) -(defvar ez-dict-addr nil) +(defvar ez-dict-base nil) (defvar ez-objtab-addr nil) (defvar ez-abbrevtab-addr nil) (defvar ez-globalvartab-addr nil) @@ -238,7 +238,7 @@ (logand (lsh word -5) #b11111) (logand word #b11111))) -(defun ez-get-zstring-chars (base-addr) +(defun ez-get-zstring-chars-and-length (base-addr) (let ((addr base-addr) (chars nil) (not-done t) @@ -252,8 +252,8 @@ (setq not-done nil)))) (cons word-count chars))) -(defun ez-get-zstring (base-addr) - (let* ((word-count-and-chars (ez-get-zstring-chars base-addr)) +(defun ez-get-zstring-and-length (base-addr) + (let* ((word-count-and-chars (ez-get-zstring-chars-and-length base-addr)) (word-count (car word-count-and-chars)) (chars (cdr word-count-and-chars)) (cur 0) @@ -266,7 +266,7 @@ (let ((abbrev-addr (* 2 (ez-mem-ref-word (+ ez-abbrevtab-addr (* 2 (+ (* (- abbrev-char 1) 32) char))))))) - (setq s (concat s (cdr (ez-get-zstring abbrev-addr))))) + (setq s (concat s (cdr (ez-get-zstring-and-length abbrev-addr))))) (setq abbrev-char nil)) ((memq char '(1 2 3)) ;Abbreviation (setq abbrev-char char)) @@ -280,6 +280,9 @@ (setq cur lock)))) (cons word-count s))) +(defun ez-get-zstring (base-addr) + (cdr (ez-get-zstring-and-length base-addr))) + ;; Call stack @@ -708,7 +711,7 @@ t)) (defun ez-op-print (operands operand-types) - (let* ((word-count-and-string (ez-get-zstring (ez-get-pc))) + (let* ((word-count-and-string (ez-get-zstring-and-length (ez-get-pc))) (word-count (car word-count-and-string)) (string (cdr word-count-and-string))) (ez-print string)