diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2024-11-29 21:54:29 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2024-11-29 21:54:29 -0500 |
commit | 9b90d6fe67e80a782c69791a8e3ef916cb6a4499 (patch) | |
tree | 28d35804d005422800ec8d9684c994c7fa9a841e /core.fth | |
parent | 08e9b769f40bb8835ac6c9c10021f472b5aa197c (diff) |
compile time parsing
Diffstat (limited to 'core.fth')
-rw-r--r-- | core.fth | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -1,23 +1,20 @@ -: cell+ cell + ; -: cells cell * ; -: char+ 1 + ; : chars ; : state [ _d 7 cells + ] literal ; \ : [ 0 state ! ; immediate \ : ] -1 state ! ; -: sp _d ; -: rp [ _d cell+ ] literal ; -: dp [ _d 3 cells + ] literal ; +: sp [ _d cell+ ] literal ; +: rp [ _d 2 cells + ] literal ; +: dp [ _d 4 cells + ] literal ; : sp@ sp @ ; : rp@ rp @ cell+ ; -: ip [ _d cell+ cell+ ] literal ; +: ip [ _d 3 cells + ] literal ; : here dp @ ; : unused [ _d 8 cells + ] literal @ here - ; : base [ _d 9 cells + ] literal ; -: latest [ _d 4 cells + ] literal @ ; +: latest _d @ ; \ : dup sp@ @ ; \ : drop sp@ cell+ sp ! ; |