diff options
| Commit | c32eda4e697803824e79878c74d541b81fbd04d8 (patch) | |
|---|---|---|
| Author | 2018-11-15 11:35:44 +0200 | |
| Committer | 2018-11-15 11:35:44 +0200 | |
| Files | ace7bdc0df3791b6db8878d52ba98cb368e180b8 /spasm/src/spasm_impl.hpp | |
| IPL-c32eda4e697803824e79878c74d541b81fbd04d8.tar IPL-c32eda4e697803824e79878c74d541b81fbd04d8.tar.gz IPL-c32eda4e697803824e79878c74d541b81fbd04d8.zip | ||
| Parent | a7cd9d4f8d83024402bacb39786e5e1a018a0a04 (diff) | |
| Parent | d7b2e339ff06c64bcb1322eec396d4995da6b17a (diff) | |
Merge pull request #48 from SofiaCPP/feature/spasm_asm
Spasm tests and latest instruction set
1 files changed, 9 insertions, 8 deletions
| -rw-r--r-- | spasm/src/spasm_impl.hpp | 17 |
diff --git a/spasm/src/spasm_impl.hpp b/spasm/src/spasm_impl.hpp index 75fb4c4..7c2bd38 100644 --- a/spasm/src/spasm_impl.hpp +++ b/spasm/src/spasm_impl.hpp @@ -13,8 +13,8 @@ enum OpCodes : char Dup, Pop, PopTo, + PushFrom, Push, - Alloc, Print, Read, Call, @@ -45,14 +45,15 @@ class Spasm public: Spasm(); void Initialize(PC_t, - const byte*, - std::istream& = std::cin, - std::ostream& = std::cout); + const byte*, + std::istream& = std::cin, + std::ostream& = std::cout); ~Spasm(); Spasm(const Spasm&) = delete; Spasm& operator=(const Spasm&) = delete; - enum RunResult { + enum RunResult + { Success, Exception, NotImplemented, @@ -77,7 +78,8 @@ class Spasm //! Frame pointer - the start of the stack for the current function data_t* m_FP = nullptr; - struct Frame { + struct Frame + { PC_t ReturnAddress; PC_t FramePointer; PC_t StackPointer; @@ -94,8 +96,7 @@ class Spasm std::ostream* ostr; void push(reg_t reg); - void pop(reg_t reg); - void pop(); + void popto(reg_t reg); void dup(); void print(reg_t reg); |
