From b141a448ce0964f2a854b59a799875b94d2f1ec0 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 30 Jun 2018 09:41:22 -0700 Subject: 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. --- subx/010core.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'subx/010core.cc') 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); -- cgit 1.4.1-2-gfad0