en:pfw:library
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:pfw:library [2025-03-20 17:13] – [The idea] willem | en:pfw:library [2025-04-01 15:56] (current) – [noForth t library use] willem | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== A library for Forth ====== | + | ====== A library for (no)Forth ====== |
| - | *W.O.* | + | *W.O. 2025* |
| Line 20: | Line 20: | ||
| * '' | * '' | ||
| * '' | * '' | ||
| - | * '' | + | * '' |
| ===== Pseudo code ===== | ===== Pseudo code ===== | ||
| Line 164: | Line 164: | ||
| LIB value LIBHERE | LIB value LIBHERE | ||
| - | : LIB-FIND | + | : FIND-CHAPTER |
| - | keyword place \ Save keyword | + | |
| - | | + | libhere lib |
| - | libhere | + | |
| - | begin | + | |
| - | | + | 2dup < throw |
| - | 0D scan nip over 1+ \ Get line with keywords, skip \ | + | dup c@ r@ c@ = until |
| - | | + | dup 2r@ over s<> 0= until \ Name ok? |
| - | 2dup > while | + | |
| - | bl skip dup >r \ Skip leading spaces | + | |
| - | bl scan \ After keyword | + | |
| - | r@ over r> - \ Keyword length | + | |
| - | keyword count s<> 0= \ Keyword found, leave source address | + | |
| - | if 2drop nip exit | + | |
| - | then | + | |
| - | | + | |
| - | 2drop 09 scan 1+ \ Find library section, skip 09 | + | |
| - | | + | |
| : LIB-REFILL | : LIB-REFILL | ||
| Line 200: | Line 192: | ||
| : NEEDED | : NEEDED | ||
| ['] lib-refill | ['] lib-refill | ||
| - | | + | |
| and lib-load ; | and lib-load ; | ||
| Line 303: | Line 295: | ||
| repeat | repeat | ||
| - | : LOOK-AT | + | : LOOK-AT |
| </ | </ | ||
en/pfw/library.1742487220.txt.gz · Last modified: 2025-03-20 17:13 by willem