We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2c06bf0 + 56678b4 commit cebb8c4Copy full SHA for cebb8c4
masm_shc/main.cpp
@@ -196,8 +196,12 @@ bool process_file(t_params ¶ms)
196
ofile << consts_lines[curr_const] << "\n";
197
ofile << label_after << ":\n";
198
if (tokens.size() > 2 && (tokens[0] == "lea" || tokens[0] == "mov")) {
199
- std::string reg = tokens[1];
200
- ofile << "\tPOP " << reg << "\n";
+ auto offset_index = find(tokens.begin() + 1, tokens.end(), "OFFSET");
+ std::string instructions = tokens[1];
201
+ if(std::distance(tokens.begin(), offset_index) == 4) {
202
+ instructions = tokens[1] + " " + tokens[2]+ " " + tokens[3];
203
+ }
204
+ ofile << "\tPOP " << instructions << "\n";
205
}
206
ofile << "\n";
207
ofile << "; " << line << "\n"; //copy commented out line
0 commit comments