diff options
| Commit | 72d9bbcc3154142af79fb686d9dc7e4d1fa1badb (patch) | |
|---|---|---|
| Author | 2018-11-29 09:13:12 +0200 | |
| Committer | 2018-11-29 09:13:12 +0200 | |
| Files | 3cea4377cba9370f3f2248557f82831d617d89d1 /spasm/src/asm/bytecode.cpp | |
| IPL-72d9bbcc3154142af79fb686d9dc7e4d1fa1badb.tar IPL-72d9bbcc3154142af79fb686d9dc7e4d1fa1badb.tar.gz IPL-72d9bbcc3154142af79fb686d9dc7e4d1fa1badb.zip | ||
| Parent | cdfd42d72030a031e5c5d810fcd53441902b5cff (diff) | |
Feature/strings (#75)
* The assembler supports string opcode
* disabled the string test until implmented
* strings can be printed
1 files changed, 6 insertions, 0 deletions
| -rw-r--r-- | spasm/src/asm/bytecode.cpp | 6 |
diff --git a/spasm/src/asm/bytecode.cpp b/spasm/src/asm/bytecode.cpp index cc250ba..70e16c9 100644 --- a/spasm/src/asm/bytecode.cpp +++ b/spasm/src/asm/bytecode.cpp @@ -100,6 +100,12 @@ void Bytecode_Memory::push_location(size_t location) } } +void Bytecode_Memory::push_string(const char* s, size_t length, int size) +{ + push_integer(int64_t(length), size); + _bytecode.insert(_bytecode.end(), s, s + length); +} + const Bytecode_Memory::Bytecode& Bytecode_Memory::bytecode() const { return _bytecode; |
