diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-06-30 09:41:22 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-06-30 09:41:22 -0700 |
commit | b141a448ce0964f2a854b59a799875b94d2f1ec0 (patch) | |
tree | a8b9498262f3e1652ddb299eb11c583fd69116c5 /subx/010core.cc | |
parent | e1eefb8a8a25312754b64f7b74f76c0ee05cace7 (diff) | |
download | mu-b141a448ce0964f2a854b59a799875b94d2f1ec0.tar.gz |
4289 - beginnings of a translator to ELF
The source 'language' is still entirely open. We'll see how it evolves as I write programs in machine code.
Diffstat (limited to 'subx/010core.cc')
-rw-r--r-- | subx/010core.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/subx/010core.cc b/subx/010core.cc index 050ac932..07029ff0 100644 --- a/subx/010core.cc +++ b/subx/010core.cc @@ -152,8 +152,10 @@ void run_one_instruction() { } void load_program(const string& text_bytes) { - uint32_t addr = 1; istringstream in(text_bytes); + load_program(in, 1); +} +void load_program(istream& in, uint32_t addr) { in >> std::noskipws; while (has_data(in)) { char c1 = next_hex_byte(in); |