X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/blobdiff_plain/336369a5b94ae6588fb891606d37053f9fb8c2d6..90975d261c7ab39186c75d8700261faab3427de7:/fth/history.fth diff --git a/fth/history.fth b/fth/history.fth index 5e5409e..574d6a6 100644 --- a/fth/history.fth +++ b/fth/history.fth @@ -50,6 +50,8 @@ KH-HISTORY kh_history_size erase \ \ The most recent entry is put at the beginning, \ older entries are shifted up. + +4 constant KH_LINE_EXTRA_SIZE ( 2 count bytes plus 2 size bytes ) : KH-END ( -- addr , end of history buffer ) kh-history kh_history_size + @@ -131,8 +133,10 @@ variable KH-INSIDE ( true if we are scrolling inside the history buffer ) ELSE >r ( save count ) \ Set look pointer to point to first count byte of last string. - 0 kh-look ! - r@ cell+ kh.make.room + 0 kh-look ! +\ Make room for this line of text and line header. +\ PLB20100823 Was cell+ which broke on 64-bit code. + r@ KH_LINE_EXTRA_SIZE + kh.make.room \ Set count bytes at beginning and end. r@ kh-history c! ( start count ) r@ kh.endcount.addr c!