add depth and unused
This commit is contained in:
+11
-1
@@ -985,7 +985,15 @@ static enum fh_error w_depth(struct fh_thread_s *fh, const struct fh_word_s *w)
|
||||
{
|
||||
(void) w;
|
||||
enum fh_error rv;
|
||||
TRY(ds_push(fh, w->param));
|
||||
TRY(ds_push(fh, fh->data_stack_top));
|
||||
return FH_OK;
|
||||
}
|
||||
|
||||
static enum fh_error w_unused(struct fh_thread_s *fh, const struct fh_word_s *w)
|
||||
{
|
||||
(void) w;
|
||||
enum fh_error rv;
|
||||
TRY(ds_push(fh, HEAP_SIZE - fh->heap_top));
|
||||
return FH_OK;
|
||||
}
|
||||
|
||||
@@ -1123,6 +1131,8 @@ enum fh_error register_builtin_words(struct fh_thread_s *fh)
|
||||
{"aligned", w_aligned, 0, 0},
|
||||
{"allot", w_allot, 0, 0},
|
||||
{"align", w_align, 0, 0},
|
||||
{"depth", w_depth, 0, 0},
|
||||
{"unused", w_unused, 0, 0},
|
||||
{",", w_comma, 0, 0},
|
||||
// TODO +!
|
||||
// TODO pictured numbers (#)
|
||||
|
||||
Reference in New Issue
Block a user