implemented CASE-OF

This commit is contained in:
2021-11-21 17:17:20 +01:00
parent f2d0d82eb3
commit e7d0053915
6 changed files with 128 additions and 4 deletions
+1
View File
@@ -32,5 +32,6 @@
#define MAGICADDR_STATE 0xFFFF57a7ULL
#define MAGICADDR_INPTR 0xFFFFF175ULL
#define MAGICADDR_UNRESOLVED 0xFFFFFBADULL
#define MAGICADDR_ENDCASE_UNRESOLVED 0xFFFC5BADULL
#endif //FORTH_FH_CONFIG_H
+7
View File
@@ -44,6 +44,13 @@ enum fh_instruction_kind {
/* Jump if zero */
FH_INSTR_JUMPZERO,
/* Jump if the two elements on stack do not equal, consuming the top one.
* Otherwise consume both and continue. */
FH_INSTR_OF,
/* Endcase, pop the testval from DS */
FH_INSTR_ENDCASE,
/* Loop exit */
FH_INSTR_LEAVE,