diff --git a/asm/asm.r8asm b/asm/asm.r8asm index 6d4dc5d..15fe61a 100644 --- a/asm/asm.r8asm +++ b/asm/asm.r8asm @@ -7,7 +7,13 @@ .tp 4 flb -add 0 2 4 6 8 +%var A 0 +%var B 2 +%var Ci 4 +%var S 6 +%var Co 8 + +add A B Ci S Co .tp 0 out diff --git a/src/r8asm_parse.cc b/src/r8asm_parse.cc index e9d06e6..c7214fa 100644 --- a/src/r8asm_parse.cc +++ b/src/r8asm_parse.cc @@ -112,7 +112,7 @@ void R8Src::preprocess_lines() { auto tmp_i = i; if ((*i)[0] == r8asm_parsemap[r8asm_parse::VAR]) { datas.insert_or_assign( - (*i)[1], std::get(r8asm_arg_stoi((*i)[1]))); + (*i)[1], std::get(r8asm_arg_stoi((*i)[2]))); i = this->raw_src.erase(i); } else if ((*i)[0] == r8asm_parsemap[r8asm_parse::INCLUDE]) { tmp_src = read_src((*i)[1]);