diff options
Diffstat (limited to 'alee-msp430.cpp')
-rw-r--r-- | alee-msp430.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/alee-msp430.cpp b/alee-msp430.cpp index e9fe19d..4116118 100644 --- a/alee-msp430.cpp +++ b/alee-msp430.cpp @@ -52,7 +52,6 @@ int main() static SplitMemDict<alee_dat_len> dict (alee_dat); State state (dict, readchar); - Parser parser; serputs("alee forth\n\r"); @@ -67,7 +66,7 @@ int main() serputs("\n\r"); - if (auto r = parser.parse(state, strbuf); r == 0) { + if (auto r = Parser::parse(state, strbuf); r == 0) { serputs(state.compiling() ? " compiled" : " ok"); } else { switch (r) { @@ -148,6 +147,13 @@ void user_sys(State& state) case 1: serput(state.pop()); break; + case 2: + { auto addr = state.pop(); + *((uint8_t *)addr) = state.pop(); } + break; + case 3: + state.push(*((uint8_t *)state.pop())); + break; default: break; } |