|
|
@ -9,12 +9,14 @@ |
|
|
|
|
|
|
|
|
|
|
|
enum fh_error ds_roll(struct fh_thread_s *fh, int n); |
|
|
|
enum fh_error ds_roll(struct fh_thread_s *fh, int n); |
|
|
|
|
|
|
|
|
|
|
|
/** Peek n-th element of data stack */ |
|
|
|
/** Peek n-th element of data stack, 0=topmost */ |
|
|
|
enum fh_error ds_peek_n(struct fh_thread_s *fh, uint32_t *out, int n); |
|
|
|
enum fh_error ds_peek_n(struct fh_thread_s *fh, uint32_t *out, int n); |
|
|
|
/** Peek n-th element of return stack */ |
|
|
|
/** Peek n-th element of return stack, 0=topmost */ |
|
|
|
enum fh_error rs_peek_n(struct fh_thread_s *fh, uint32_t *out, int n); |
|
|
|
enum fh_error rs_peek_n(struct fh_thread_s *fh, uint32_t *out, int n); |
|
|
|
/** Peek n-th element of control stack */ |
|
|
|
/** Peek n-th element of control stack, 0=topmost */ |
|
|
|
enum fh_error cs_peek_n(struct fh_thread_s *fh, uint32_t *out, int n); |
|
|
|
static inline enum fh_error cs_peek_n(struct fh_thread_s *fh, uint32_t *out, int n) { |
|
|
|
|
|
|
|
return ds_peek_n(fh, out, n); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** Peek top of data stack */ |
|
|
|
/** Peek top of data stack */ |
|
|
|
static inline enum fh_error ds_peek(struct fh_thread_s *fh, uint32_t *out) |
|
|
|
static inline enum fh_error ds_peek(struct fh_thread_s *fh, uint32_t *out) |
|
|
@ -36,10 +38,14 @@ static inline enum fh_error cs_peek(struct fh_thread_s *fh, uint32_t *out) |
|
|
|
|
|
|
|
|
|
|
|
enum fh_error ds_pop(struct fh_thread_s *fh, uint32_t *out); |
|
|
|
enum fh_error ds_pop(struct fh_thread_s *fh, uint32_t *out); |
|
|
|
enum fh_error rs_pop(struct fh_thread_s *fh, uint32_t *out); |
|
|
|
enum fh_error rs_pop(struct fh_thread_s *fh, uint32_t *out); |
|
|
|
enum fh_error cs_pop(struct fh_thread_s *fh, uint32_t *out); |
|
|
|
static inline enum fh_error cs_pop(struct fh_thread_s *fh, uint32_t *out) { |
|
|
|
|
|
|
|
return ds_pop(fh, out); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
enum fh_error ds_push(struct fh_thread_s *fh, uint32_t in); |
|
|
|
enum fh_error ds_push(struct fh_thread_s *fh, uint32_t in); |
|
|
|
enum fh_error rs_push(struct fh_thread_s *fh, uint32_t in); |
|
|
|
enum fh_error rs_push(struct fh_thread_s *fh, uint32_t in); |
|
|
|
enum fh_error cs_push(struct fh_thread_s *fh, uint32_t in); |
|
|
|
static inline enum fh_error cs_push(struct fh_thread_s *fh, uint32_t in) { |
|
|
|
|
|
|
|
return ds_push(fh, in); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#endif //FORTH_FH_STACK_H
|
|
|
|
#endif //FORTH_FH_STACK_H
|
|
|
|